Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Contacts not loading in Location > View Location Contacts > Add Contact form #764

Open
lprivette opened this issue Dec 27, 2019 · 21 comments
Assignees

Comments

@lprivette
Copy link
Contributor

also, sometimes the location contacts "add contact" subform will open, but nothing happens when I click the "contact person" line. It's acting similar to how the staff list was behaving a couple of weeks ago. No drop down appears. However, if i refresh the web page and open it back up, it works.

Originally posted by @JChipault in #511 (comment)

@lprivette
Copy link
Contributor Author

@BlakeDraper did we do anything to resolve this for the staff list mentioned?

I haven't been able to recreate it in firefox/chrome yet, but with the size of that dropdown list it does struggle.

@JChipault
Copy link
Collaborator

It was spotty before but "add contact" does not seem to work at all in v2.11.0. Might be easier for you to recreate now?

@JChipault
Copy link
Collaborator

Actually, seems to work in chrome, but not working in firefox

@JChipault
Copy link
Collaborator

....aaaaannnnnd... when I test it out again in firefox, it works now. Didn't work like 7 times in a row on firefox earlier this morning

@BlakeDraper
Copy link
Contributor

I can confirm that it seems to be working as expected in both Chrome and Firefox. @JChipault when you observed it misbehaving, was it that the the Add contact dialog was not working at all, the issue of the Contact Person dropdown being empty, or something else?

@JChipault
Copy link
Collaborator

Currently working for me. It seems sporadic (though there's probably some pattern I haven't picked up on yet)
When it doesn't work, I get this, which functions fine:
image
and then I click "add contact" and I get this:
image
But when I click on the "Contact Person" row, nothing happens. The dropdown never shows up. I'll sometimes let it sit for a while and then click again and still nothing happens.

@BlakeDraper
Copy link
Contributor

@JChipault A few comments about this functionality - this is actually somewhat of a data issue. For legacy database reasons, the contacts imported from Epizoo all have NWHC as the owner organization. Thus anyone in the NWHC org has access to 3k+ contact records, which take a while to load. For the very reason of long load times, we long ago implemented the disabling of the Add Contact button until that list is fully loaded from the server. That loading actually happens (or more accurately: begins) in the background when a user arrives on the event details page.

That list is what populates that dropdown. Theoretically, if the "Add Contact" button is enabled, the list is ready. However, one thing I can see could be happening is that the request for your available contact is timing out or otherwise failing, likely due to the unusually large size of the response due to your organization and the legacy data issue. Currently, that button becomes enabled after any completed request, even if the outcome of the request is failure. That itself is somewhat of an oversight on my part.

But it now raises a question going forward - how to fix it in a graceful way? Bearing in mind that this outsize response for user contacts really only applies to NWHC users, we have a few options -

  1. Implement a button to manually trigger a request for the user contacts. The user would then have to wait again. I don't love this solution because it is clunky. But it could be effective. There is no guarantee this manually triggered request will succeed, but the performance there is a function of local network latency and maybe some server/hosting issues which is outside the scope of this fix.
  2. We do nothing for now, because this is likely a uniquely NWHC-user affliction due to the legacy data and likely does not effect many if any regular users.

I can think through some possible other options, but there is some food for thought.

@JChipault
Copy link
Collaborator

@BlakeDraper just hit this on my dashoboard on both the test and live site - related?
image

@JChipault
Copy link
Collaborator

If that last screen shot provides no insight, of your two options, I'd lean toward the latter for now

@JChipault
Copy link
Collaborator

just ran into the issue of not being able to get the drop down on the event details page again on the test site.... and I'm noticing now that it didn't seem to do the loading step at all actually (as shown below, which is a screen capture from when it does work).
image

@JChipault
Copy link
Collaborator

ok, now contacts are loading in the dashboard for both the live and test site. So maybe there are intermittent blips wherein the contacts table isn't communicating with the front end in the event details nor in the dashboard?? And maybe that's what you're well aware of and are trying to say in your statement re: the NWHC contact list being so long. That said, it's not as long as the NWHC event list and that loads in the dashboard.

@BlakeDraper
Copy link
Contributor

@JChipault I am confused by something: The screencapture you just shared above shows what the screen should look like while that contact list is still loading. Can you clarify what you mean when you say its not doing the loading step at all?

To answer your question - yes, the failure of the user contacts list to load is related/the same issue.

As for why the much-longer Your Events table loads while contacts does not - how much time ya got? Ha - there is a fairly simple explanation to that, but not as simple a fix. The events table is actually paginated from the server, which means every time you click the arrow for the next 'page' of the table, you are actually doing a new request for just those 5 events (or 10, or 20, however you configure the page size) - this is a much more efficient way to handle a large list.

The contacts list is not paginated because the entire list needs to be available for the search-select feature. Now here is dirty secret: we could implement a search select that actually queries the server as the user types. We only did not do that originally for expediency's sake. I can create an issue to make that a wish-list type item for later development. It will mean a slightly different user experience as there will be a short loading wait when a letter is typed. But - it will get us around this large list loading issue.

@JChipault
Copy link
Collaborator

are you able to see this video? (hopefully it doesn't make you sea sick!): https://doimspp.sharepoint.com/sites/GS-NWHCWHISPers/Shared%20Documents/WIM-NWHC%20Shared%20Folder/IMG_1661.mp4

@JChipault
Copy link
Collaborator

JChipault commented Jan 3, 2020

the weird thing is that our contact list hasn't suddenly gotten much bigger and, prior to the last week or two, this hasn't been an issue when we go to add contacts. (though it does feel like when we were first building the event details page that we had a similar snag, but then it's been smooth sailing for many months)

@BlakeDraper
Copy link
Contributor

I can see that video, and I see what is happening, thanks. I cannot make that happen on my end for some reason. At this point I should probably jump on a screenshare session with you on MS Teams so I can walk you through showing me the errors in the dev console (if any) that appear when that failure is happening. Let me know when is good.

To the previous point about this (most likely) only affecting NWHC org users - have you received any recent reports from partners about this behavior?

@JChipault
Copy link
Collaborator

We have not heard about this from partners but we currently don't have many partners entering data, and even fewer listing contacts when they do enter events (like, probably 0, so pretty small sample size). I just sent out an email to see how many NWHC epi people are struggling. I am pretty available this week if you want to do an MS Teams walk through, but maybe it's best to table this for a bit as there are probably more pressing things on your plate and it works for me intermittently so I can get through and gather more data from other people's experiences.

@JChipault
Copy link
Collaborator

I was just trying to add a read/write collaborator on event details for 200293 on the live site and there was a contact associated with the event but nothing would happen when I selected the dropdown button that should have loaded the one contact I had on that event.

Simultaneously, got a call from an epi who was creating a new events (200294) and he wasn't able to get any contacts to show up in the dropdown when he was trying to add location contacts to his new event. He reports "No response from the "Contact Name" input. no drop down nor response to key inputs" and here's his screen shot
image

He had just finished creating 200293 in which he was able to select a contact.

So something happened with the contact drop down functionality between when he created 200293 and a bit later when I tried to add a collaborator to the already created 200293 and he was simultaneously creating 200294

@JChipault
Copy link
Collaborator

JChipault commented Apr 29, 2020

Just making note attached to this ticket that on 4/27 at 4:45p Anne Ballmann (NWHC epi) sent me this about the live site: "I have run into issues today with trying to add species to new events or adding contacts. WHISPers is not giving me a drop down list or allowing me to start typing species or contact names on the line. I can click on the line but no cursor appears to allow me to start typing. I can navigate to other fields in the record or can delete the offending section but am unable to try to add a new piece of info to the record. What's strange is that this error is not consistent among the 4 new records I have created/or tried creating this afternoon. Some were created without any problems, others I just left off the contacts field and it accepted species entries. RIght now, I'm stuck with trying to create a record for AWPE [American White Pelican] in Corpus Christi, TX but WHISPers isn't letting me chose any species to assign to this record although I can enter numbers dead or sick. Because I can't enter the species, it's not allowing me to save what I have and I fear I will have to re-enter everything again."

@BlakeDraper
Copy link
Contributor

@JChipault the explanation for this would be a failure of the Species list to load, which is the same root cause of the Contacts not loading on screen occasionally. The problem is network issues, and one solution could be a secondary load request if the user clicks the field and the options list is empty. Unfortunately we are out of hours right now to implement that. Is this consistent enough to be causing widespread loss of work, or is it it the occasional annoyance? Of course we'd love to eliminate even occasional annoyances, but unfortunately right now we have to be stingy and strategic with our negative balance of hours.

@JChipault
Copy link
Collaborator

yup, I wasn't expecting it to get fixed. Just capturing what's happening so we have data associated with this issue in one place in the future

@BlakeDraper
Copy link
Contributor

Ok cool, I do appreciate keeping the information tracked so please keep it up!

@BlakeDraper BlakeDraper self-assigned this Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants