BiologicalRecordsCentre / NPMS

NPMS
0 stars 0 forks source link

Indicator incorrectly using Widlfower organism keys #323

Closed andrewvanbreda closed 1 week ago

andrewvanbreda commented 3 weeks ago

It has been noticed the Indicator form has been incorrectly running the organism keys intended for the Wildflower form. "Ammophila arenaria" is an example of item not being available but is available the old (pre organism key) form.

Corrective actions.

  1. I will switch Indicator for old version of the form until this can be fixed.
  2. Oli to check the samples that have already been entered in case we need to contact users.

Part of the problem at the moment is I can't just add the organism keys as the warehouse fails to respond with that many (I think request too long). This results in the autocomplete not working.

andrewvanbreda commented 3 weeks ago

@sacrevert I have switched NPMS to use the old Indicator form. This should be transparent to the user. The only thing is if a user tries to edit a sample, they will still be shown the form they used to enter the data. So currently, editing a sample from the newer form will still result in the broken form opening in edit mode.

I will try to switch Plant Portal now

andrewvanbreda commented 3 weeks ago

Hi @sacrevert Plant portal now running the old form too.

I am going to switch the issue to Priority

Remaining tasks

  1. You to check the samples.
  2. I will try to find a way to get organism keys to work when there are 400, then switch back the newer form once am able to add the full 400 Indicator organism keys.
andrewvanbreda commented 2 weeks ago

Hi @BirenRathod

Are you able to get me the result from the attached query please. The problem is I don't think I can copy/paste from my machine to Warehouse1 pgAdmin,. As you can see from the query, it isn't practical to type it out.

Thanks

Andy

Indicator SQL.txt

BirenRathod commented 2 weeks ago

@andrewvanbreda I have attached the result here. data-1720084874727_npms_indicator.zip

andrewvanbreda commented 2 weeks ago

@BirenRathod Perfect, thank you

andrewvanbreda commented 2 weeks ago

Hi @sacrevert

Just too quickly summarise the situation. Using the organism keys to filter on the Indicator form isn't working because there are 403 keys and the request to the Warehouse is too long and is rejected by the Warehouse. This stops the species autocomplete from working at all.

I have just experimented with using taxon meaning IDs for filtering and this seems to work. We can use the taxon meaning IDs for filtering Indicator instead and that means the request to the Warehouse short enough because the meaning IDs are shorter than the organism keys.

I assume you are OK with this Oli? If so I can put live.

If unsure, I have created a page on test site that filters the list but shows one long static list for readability if you want to see the list.

https://avb-live-brc-npms-d10.pantheonsite.io/indicator-recording-form

andrewvanbreda commented 1 week ago

@sacrevert @NPMSSupport Fixed on both Plant Portal and NPMS. Both Indicator forms switched to use taxon meaning IDs as filter instead of organism keys. Also changed the buttons/links to the data entry forms, so that when adding new data, the most recent version of the data entry form is opened (the sites had previously been switched to the old 2015 version as a temporary measure because of these issues)