PhenoApps / Field-Book

https://fieldbook.phenoapps.org
GNU General Public License v2.0
51 stars 54 forks source link

[BUG]: Photo trait doesn't work if trait name contains "|" or ":" #998

Open ch728 opened 3 months ago

ch728 commented 3 months ago

Description

A trait name such as "fruit plot harvest picture [photo]|UNH_01:0001025" won't save a photo unless the name is changed to exclude both the ":" and "|". Unfortunately, both of those characters are standard for trait imports from Breedbase due to the ontology format they use.

Expected behavior

No response

Field Book version

No response

trife commented 3 months ago

This is fixed in #945 but we're working through a few other issues before merging. I'll leave the issue open for now.

ch728 commented 3 months ago

I saw that this issue is fixed in 5.6; however, even though I have the trait format set to photo in breedbase

image

It imports via brapi as a text trait.

image

There isn't a way to edit the trait type of an existing trait (which seems like a good idea) in version 5.6, so the trait can't be fixed after importing.

The brapi import works for categorical and numeric traits set in breedbase, but not for many of the other types of traits. I assume this is some kind of brapi issue on the breedbase side of things.

trife commented 3 months ago

It's editable, when you go to the edit page you have to press back and select the different format. Making it slightly harder because in general, editing trait formats breaks a bunch of other things. We'll be working on updating the traits page further in v6 to make this a little more obvious.