BiologicalRecordsCentre / SPRING

Repository for tracking issues for the SPRING (EU Pollinator Monitoring) project
GNU General Public License v3.0
0 stars 0 forks source link

SPRING - extend transect data entry to include bee and hoverfly species #110

Closed DavidRoy closed 7 months ago

DavidRoy commented 1 year ago

Transect recording in 2023 is extended to allow species level identification for bees and hoverflies. This requires the following updates:

  1. https://pollinator-monitoring.net/walk-data-entry?location_type_id=777&date=14/06/2023 Extend to six types of 'Transect walk type' a - Butterflies (rename to 'Butterflies recorded to species') b - Bees recorded to species (new category) c - Hoverflies recorded to species (new category) d - Bees recorded to morpho-groups e - Hoverflies recorded to morpho-groups f - Bees and hoverflies (single transect) recorded to morpho groups

  2. Based on the selection the following taxon lists are required a - list.id = 251 b. - list.id = 273 (and list.id = 257 if possible to include two lists) c. - list.id = 272 ((and list.id = 257 if possible to include two lists) d. - list.id = 257 e. - list.id = 257 f. - list.id = 257

andrewvanbreda commented 1 year ago

Hi @DavidRoy I think I could do this reasonably quickly because it is duplicating existing code so it is not completely new code which can get stuck on. There is possible sticking point, but I can't give you answer as to if it is a genuine sticking point until I try it. As the tabs will now use the same species lists in some cases, need to make sure existing data doesn't load on the wrong tab. This literally might not be a problem at all, or might be a bit of a pain if not already setup to work like that. I might be able to test that over the weekend and give you an answer.

Could I just clarify something. For example above you mention that tabs "d", "e" and "f" use species list 257. Am I correct in thinking those species grids literally going to be identical between those tabs with no other filtering?

Actually can you just double check the species list ID 257, I just checked it and it seems to be a River Mammal list https://warehouse1.indicia.org.uk/index.php/taxon_list/edit/257

DavidRoy commented 1 year ago

ooops, it should be list: https://warehouse1.indicia.org.uk/index.php/taxon_list/edit/275

Yes, d.e.f use the same list

andrewvanbreda commented 1 year ago

Hi @DavidRoy I got a test version of this working at the weekend.

The test site URL is here https://avbnewmodes-eu-pollinator.pantheonsite.io/

I think it is fully working, and apart from I didn't get the two tabs that use 2 species list to work with the second species list yet (which I think isn't mandatory for a go live going by your notes).

Note as I will be working to fix that, there may be times the test site doesn't work as expected. Also note if you do look at my test site, I had to use a new survey, so lot of the attributes will be missing, please ignore that. The site won't work at the moment anyway until Warehouse 1 is back online.

Also note that although I did run into that issue I mentioned where if you load existing data it can be loaded onto the wrong tab, I actually don't think it matter in practice, as this would only occur if you switched the mode on an existing sample. e.g. if you saved a sample as "Bees recorded to morpho-groups". If you loaded that existing sample and changed the mode to "Hoverflies recorded to morpho-groups" it would load the existing data onto that tab. However the user would need to switch the mode for this to behaviour occur which I think is unlikely. Perhaps we should even prevent the switching of the mode on existing samples? as I think actually it could cause other troubles.

Anyway, in summary, I think we can go live with this quickly if you need.

andrewvanbreda commented 1 year ago

Hi @DavidRoy I think we could start going live with this if you wanted. I got the it to work with more than one taxon list on that test site. I do not know if you want to check what I have done on that test site? (note: as mentioned previously, that test site uses a new survey for testing, so ignore that a lot of the attributes are missing).

The only real limitation I think is that for the two tabs that use more than one species list, the system mixes the two list ordering together. if you needed that change it would likely take a fair bit of coding. The only use way I could think to that simply, would be to change the 275 species list's sort orders in the warehouse so that supplying the taxonomic sort order option would result in them naturally being separated.

I guess at this stage I have these questions:

  1. In your instruction you have said that Butterflies should be renamed to 'Butterflies recorded to species'. What Beeds and Hoverflies should be renamed to, should it be this one? 'Bees and hoverflies (single transect) recorded to morpho groups'

  2. Currently am guessing the short order types you want. Keeping it similar to the existing sort order rules I have used these. Let me know if you want something different. a - Butterflies (rename to 'Butterflies recorded to species') = Preferred taxon sort order b - Bees recorded to species (new category) = Preferred taxon sort order c - Hoverflies recorded to species (new category) = Preferred taxon sort order d - Bees recorded to morpho-groups = Taxonomic sort order e - Hoverflies recorded to morpho-groups = Taxonomic sort order f - Bees and hoverflies (single transect) recorded to morpho groups = Taxonomic sort order

  3. Do you want to go live with this yet?

DavidRoy commented 1 year ago

@andrewvanbreda A couple of things:

  1. The first page does not include the additional sample information to included, e.g. start-time, weather etc
  2. On the species grid, I tried out the 'Bees recorded to species' option and the 'Add species to list: ' autocomplete/drop-down did not find anything, e.g. when typing Bombus..
  3. Same for the hoverflies to species option
  4. The butteflies to species name search includes all variations of common names for the latin name. This makes the list very long
  5. For the 'Bees recorded to morpho-groups' would it be possible to remove some of the 'taxa', e.g. those relevant to hoverflies (Group 1 to 5)
  6. Similarly for the 'Hoverflies recorded to morpho-group' would it be possible to only have the Group 1 to 5 taxa?
andrewvanbreda commented 1 year ago

Hi @DavidRoy

For point 1, this is ok, those are the attributes that are missing, as mentioned above it is because I made a new test survey but that didn't include all the attributes.

I wasn't actually ever aware there was an autocomplete running on this site, I don't see that for some reason. I will try to masquerade to see it, so am not surprised that isn't working then.

For points 5 & 6, I think I will have to insert some kind of special case code.

I guess will let you know how I get on.

DavidRoy commented 1 year ago

Thanks. The taxon name search works for butterflies but not the other taxon lists (bees and hoverflies)

DavidRoy commented 1 year ago

@andrewvanbreda are you ok to look into this?

andrewvanbreda commented 1 year ago

@DavidRoy Yes will do this week, I am actually at CEH today for meeting with Oli, so won't be today.

andrewvanbreda commented 1 year ago

@DavidRoy

  1. See previous note about my test site using a different survey, so doesn't include the attributes.

  2. Fixed on my test site

  3. Fixed on my test site

  4. Am not sure how to deal with this. Do you mean in the autocomplete, we see lots of duplicates of the latin name, each displayed with a different common name. This is problematic to deal with. I don't get any information from the Warehouse about the common names it is returning. So if I try and limit to just 1 item for each latin name, the warehouse will return the default common name which could be Japanese for example if that is the only common name available, but then with another item the default common name could be English. I could tell the warehouse to return preferred only, so you only get latin names in the search with no common names displayed. Or could ask John for opinion. I think what he might say is we could change the data view to include a field "common_name_in_current_language". If you want this latter solution, I would suggest go live with the other changes first as I think the live site already has this problem anyway,

  5. Fixed on my test site

  6. Fixed on my test site

DavidRoy commented 1 year ago

Thanks @andrewvanbreda. Please release to the live site. For 4, yes that is the issue but we can live with this complexity and tackle it later

andrewvanbreda commented 1 year ago

@DavidRoy This is live now. Close if happy. Also if there are any side issues noted here, perhaps these need raising separately (number 4 above?)

DavidRoy commented 1 year ago

Thanks

andrewvanbreda commented 8 months ago

Whilst testing Drupal 10, I noticed a problem occuring on Drupal 9 live. While there are no saving issues related to the new modes, the My Walks report (poms_my_walks_list.xml) was never adjusted to include a label for the new modes (so a walk is correctly labelled as "Butterflies" on the grid correctly, but shows no label for the other selection types such as Hoverflies)

andrewvanbreda commented 7 months ago

Fixed