ArctosDB / arctos

Arctos is a museum collections management system
https://arctos.database.museum
60 stars 13 forks source link

empty-value attributes #6309

Closed dustymc closed 1 year ago

dustymc commented 1 year ago
          I am working through MVZ mammal records. I am finding some records with attributes with no values. This is certainly legacy since you can't enter data now with an attribute unpopulated. When I go to delete the attribute with a zero value and hit save, there is a big error thrown up by the attribute with no value. I then go back and delete both attributes. 

Should there be an effort to delete those attributes as well?

Originally posted by @cjconroy in https://github.com/ArctosDB/arctos/issues/6257#issuecomment-1553782522

dustymc commented 1 year ago

arctosprod@arctos>> select attribute_type, attribute_value from attributes where trim(coalesce(attribute_value,''))='';
       attribute_type       | attribute_value 
----------------------------+-----------------
 description                | 
 quadrant                   | 
 square                     | 
 description                | 
 stomach contents           | 
 provenience north          | 
 reproductive data          | 
 credit line                | 
 fat deposition             | 
 skull ossification         | 
 description                | 
 verbatim agent             | 
 verbatim agent             | 
 reproductive data          | 
 age                        | 
 description                | 
 description                | 
 verbatim agent             | 
 reproductive data          | 
 description                | 
 inscriptions and marks     | 
 materials                  | 
 description                | 
 verbatim agent             | 
 reproductive data          | 
 description                | 
 clutch size                | 
 skull ossification         | 
 clutch size                | 
 description                | 
 description                | 
 reproductive data          | 
 verbatim preservation date | 
 description                | 
 materials                  | 
 verbatim agent             | 
 dimensions                 | 
 verbatim agent             | 
 verbatim agent             | 
 verbatim agent             | 
 unformatted measurements   | 
 verbatim agent             | 
 credit line                | 
 description                | 
 verbatim preservation date | 
 materials                  | 
 verbatim agent             | 
 verbatim preservation date | 
 molt condition             | 
 molt condition             | 
 description                | 
 fat deposition             | 
 verbatim agent             | 
 fat deposition             | 
 verbatim agent             | 
 reproductive data          | 
 verbatim agent             | 
 verbatim agent             | 
 verbatim agent             | 
 verbatim agent             | 
 reproductive data          | 
 reproductive data          | 
 reproductive data          | 
 reproductive data          | 
 reproductive data          | 
 stomach contents           | 
 skull ossification         | 
 skull ossification         | 
 reproductive data          | 
(69 rows)
acdoll commented 1 year ago

This may be related: I have been experiencing something like this, but I think it is a UI issue. The attributes are in the record and display fine on the record page, but when I open the edit screen the value field just doesn't appear in that line. That then prevents saving any changes to or additions of other attribute resulting in an error page. I'll try to recreate and grab a screen shot.

acdoll commented 1 year ago

Example: https://arctos.database.museum/guid/DMNS:Mamm:21673 Ear from notch displays fine on the record page: image But the first time I hit Edit, the value field didn't appear: image

Then I reload and try Edit again and it is there.

jldunnum commented 1 year ago

Had this same issue and could edit everything except the value itself. Ended up deleting the attribute in question and adding a new one.


Jonathan L. Dunnum Ph.D. (he, him, his) Senior Collection Manager Division of Mammals, Museum of Southwestern Biology University of New Mexico Albuquerque, NM 87131 (505) 277-9262 Fax (505) 277-1351

Chair, Systematic Collections Committee, American Society of Mammalogists Latin American Fellowship Committee, ASM

MSB Mammals website: http://www.msb.unm.edu/mammals/index.html Facebook: http://www.facebook.com/MSBDivisionofMammals

Shipping Address: Museum of Southwestern Biology Division of Mammals University of New Mexico CERIA Bldg 83, Room 204 Albuquerque, NM 87131


From: Andrew Doll @.> Sent: Friday, May 19, 2023 9:59 AM To: ArctosDB/arctos @.> Cc: Subscribed @.***> Subject: Re: [ArctosDB/arctos] empty-value attributes (Issue #6309)

[EXTERNAL]

This may be related: I have been experiencing something like this, but I think it is a UI issue. The attributes are in the record and display fine on the record page, but when I open the edit screen the value field just doesn't appear in that line. That then prevents saving any changes to or additions of other attribute resulting in an error page. I'll try to recreate and grab a screen shot.

— Reply to this email directly, view it on GitHubhttps://github.com/ArctosDB/arctos/issues/6309#issuecomment-1554789751, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AED2PA7THWGSW2PXQ5CAXELXG6KHXANCNFSM6AAAAAAYHCRWMY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

acdoll commented 1 year ago

It seems to be totally sporadic, but does happen fairly often.

dustymc commented 1 year ago

That sounds like potentially something has escaped the controlled vocabulary (what https://github.com/ArctosDB/arctos/issues/3452 is meant to address), but if reload (eventually) fixes it then maybe it's just https://github.com/ArctosDB/internal/issues/187?? I'll dig....

jldunnum commented 1 year ago

It was actually happening to some of the virus: Orthohantavirus values I had uploaded a couple days ago.


Jonathan L. Dunnum Ph.D. (he, him, his) Senior Collection Manager Division of Mammals, Museum of Southwestern Biology University of New Mexico Albuquerque, NM 87131 (505) 277-9262 Fax (505) 277-1351

Chair, Systematic Collections Committee, American Society of Mammalogists Latin American Fellowship Committee, ASM

MSB Mammals website: http://www.msb.unm.edu/mammals/index.html Facebook: http://www.facebook.com/MSBDivisionofMammals

Shipping Address: Museum of Southwestern Biology Division of Mammals University of New Mexico CERIA Bldg 83, Room 204 Albuquerque, NM 87131


From: dustymc @.> Sent: Friday, May 19, 2023 10:12 AM To: ArctosDB/arctos @.> Cc: Jonathan Dunnum @.>; Comment @.> Subject: Re: [ArctosDB/arctos] empty-value attributes (Issue #6309)

[EXTERNAL]

That sounds like potentially something has escaped the controlled vocabulary (what #3452https://github.com/ArctosDB/arctos/issues/3452 is meant to address), but if reload (eventually) fixes it then maybe it's just ArctosDB/internal#187https://github.com/ArctosDB/internal/issues/187?? I'll dig....

— Reply to this email directly, view it on GitHubhttps://github.com/ArctosDB/arctos/issues/6309#issuecomment-1554804491, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AED2PA4H62ZSDP6RLFTTI3LXG6LWLANCNFSM6AAAAAAYHCRWMY. You are receiving this because you commented.Message ID: @.***>

acdoll commented 1 year ago

I just tried again with another record (https://arctos.database.museum/guid/DMNS:Mamm:21696) and added a new attribute and saved. This time the reproductive data value didn't appear in the Edit window, but when I saved new attribute, it deleted the existing repro value. image This may be where all the empty-values above have come from.

dustymc commented 1 year ago

I have removed attributes with blank values and added a constraint which should prevent this going forward. Please let me know if I can with anything else.

Data:

temp_noval_attr.csv.zip

Summary:


       attribute_type       | guid_prefix | count 
----------------------------+-------------+-------
 verbatim agent             | CHAS:Bird   |     2
 description                | CHAS:Herb   |     7
 verbatim agent             | CHAS:Herb   |    16
 verbatim preservation date | CHAS:Herb   |     6
 fat deposition             | DMNS:Bird   |     3
 molt condition             | DMNS:Bird   |     3
 reproductive data          | DMNS:Bird   |     3
 verbatim agent             | DMNS:Bird   |     1
 reproductive data          | DMNS:Mamm   |     1
 verbatim agent             | HWML:Para   |     1
 clutch size                | JSNM:Egg    |     2
 reproductive data          | MLZ:Bird    |     1
 skull ossification         | MLZ:Bird    |     1
 verbatim agent             | MMNH:Mamm   |     2
 fat deposition             | MSB:Bird    |     1
 reproductive data          | MSB:Bird    |     1
 skull ossification         | MSB:Bird    |     3
 stomach contents           | MSB:Bird    |     2
 age                        | MSB:Mamm    |     1
 reproductive data          | MSB:Mamm    |     3
 reproductive data          | MVZ:Bird    |     1
 reproductive data          | MVZ:Mamm    |     5
 description                | UAM:Arc     |     2
 provenience north          | UAM:Arc     |     1
 quadrant                   | UAM:Arc     |     1
 square                     | UAM:Arc     |     1
 credit line                | UAM:Art     |     2
 description                | UAM:Art     |     1
 inscriptions and marks     | UAM:Art     |     1
 materials                  | UAM:Art     |     2
 unformatted measurements   | UAM:Bird    |     1
 verbatim agent             | UAM:Bird    |     1
 description                | UAM:EH      |     1
 dimensions                 | UAM:EH      |     1
 fat deposition             | UMZM:Bird   |     1
 age                        | UMZM:Mamm   |     1
 molt condition             | UMZM:Mamm   |     2
 verbatim agent             | UMZM:Mamm   |     2

Users:

@mkoo @DellaCHall @AJLinn @campmlc @ccicero @barke042 @catherpes @gracz-UNL @cjconroy @sjshirar @wellerjes @adhornsby @droberts49 @AdrienneRaniszewski @acdoll @jldunnum @jrdemboski

cjconroy commented 1 year ago

In our case, these were probably created when we had an accession with specimens with and without reproductive data. Rather than have to remove the attribute name each time, we have left it in and left the value blank, hoping the internal guts in Arctos would just ignore it. Will that be the case going forward? It will be a hassle to have to add and remove this attribute each time it comes up. It would be far easier if the attribute were ignored if value is blank.

dustymc commented 1 year ago

If you mean from the data entry form, see https://docs.google.com/spreadsheets/d/1VbNC3k17WAHMum_qD5UYoXxUUWwXXh5gZSM5vfGvRzU - blank-value attributes should be ignored.