nsandlin / linepig

ID resource for erigonine spiders, using KE Emu & IMu.
http://linepig.fieldmuseum.org/
4 stars 0 forks source link

Counts by sex in Collection Record screen #113

Closed nsandlin closed 6 months ago

nsandlin commented 6 months ago

It like the move to Preps & Parts has borked the counts by sex in the collection records for Field Museum specimens. The counts by sex are not longer showing up; instead they either show Wet with a low count, like Erigone dentosa, with "Total count: 8 Wet: 2" (see A) or gibberish instead of "Wet," like Souessa spinifera with "Total count: 1 • a:f" (see B). Of course, we don't need "Wet" at all; they're all wet.

A. https://linepig.fieldmuseum.org/catalogue/3474277 B. https://linepig.fieldmuseum.org/catalogue/4018477

To recap my earlier notes, it looks like the $record['semaphoronts'] value in catalog.php populates the "Total count" field in the collection record screen, and the the individual records in EMu do list the sex breakdowns under LotWetCount_tab - but probably that is not getting exported anymore, or not the same way.

Question: I have just rechecked all the counts by sex in the 90 EMu records, but I was checking the Lots tab semaphoront table. (All but about 5 there were correct; I fixed the others in Preps and Phenology.) Do you think I need to export a report to confirm that the Preps and Phenology counts match?

nsandlin commented 6 months ago

All the counts look good EMu in both the LotSemaphoront and the new Phe/Pre fields. Here are few examples (img). I did not spot the error in the code, but here are what look to be the relevant passages (text). Counts-by-sex--examples code excerpts.txt

peteherbst commented 6 months ago

Kate, could you take a look as well and see if, and where I should make adjustments on my end?

magpiedin commented 6 months ago

@nsandlin -- Could you confirm if this is how those two example records above should display Count-values on the front-end?

A. https://linepig.fieldmuseum.org/catalogue/3474277

Total count: 8

  • adult male: 3
  • adult female: 3
  • larva/juvenile: 2

B. https://linepig.fieldmuseum.org/catalogue/4018477

Total count: 1

  • adult female: 1

If so, this is how we could map the fields to fix the 'Count' display on the LinEpig catalog pages:

Total count: [PreTotalCount]

...All ears if questions or something else makes more sense (e.g. PheSex_tab instead of LotSemaphoront_tab if you want the counts by sex only, & not by life stage)

nsandlin commented 6 months ago

Yep, that's correct. (We don't technically need Total or Juvenile, but no problem to have it.)

magpiedin commented 6 months ago

Thanks Nina

@peteherbst -- Can you add/get these 2 ecatalogue fields (LotSemaphoront_tab & PreTotalCount) from Mongo/Elastic?

...&/or do you need us to add those to an EMu Export? -- e.g., there's a retired 'LinEpig-Catalog' eexport last run ~2022 June

(It didn't look like those fields are in the current list of catalog fields in the config here )

peteherbst commented 6 months ago

Fixed via pull request: https://github.com/nsandlin/linepig/pull/114

You can see the code changes here: https://github.com/nsandlin/linepig/pull/114/files