ome / omero-mapr

An OMERO.web app allowing to browse the data through attributes linked to the image
https://pypi.org/project/omero-mapr/
GNU Affero General Public License v3.0
5 stars 12 forks source link

bug: multi-record Key/Key URL favicon display error #68

Closed JoshuaFortriede closed 1 year ago

JoshuaFortriede commented 2 years ago

When a Key/Key URL key/value set is being used, and there can be multiple entities in this key set (i.e. the original data was split), favicon icons are being assigned to the last Key record (i.e. the recursively found N-1 record).

Because the code progresses through the key and key URLs in order, and the order for multi-entries are Key (1), Key (2), Key (3), Key URL (1), Key URL (2), Key URL (3), the following logic was used. Search for all keys with the correct text (logic unchanged), AND where the value TD (td:nth-child(2)) does not have a "span.favicon" element, as adding the span.favicon element indicates that a Key/Key URL has been processed. Finally, return only the first result as the $target.

will-moore commented 2 years ago

Sorry, I don't quite understand under what conditions you're seeing a bug (and what the bug is exactly).

E.g. I tried creating a MapAnnotation with these values (as shown in JSON for image like /webclient/api/annotations/?type=map&image=806):

"values": [
    [
        "Gene Identifier",
        "ENSG00000131462"
    ],
    [
        "Gene Identifier URL",
        "http://www.ensembl.org/id/ENSG00000131462"
    ],
    [
        "Gene Symbol",
        "TUBG1"
    ],
    [
        "Gene Identifier",
        "ENSG00000147400"
    ],
    [
        "Gene Identifier URL",
        "http://www.ensembl.org/id/ENSG00000147400"
    ],
    [
        "Gene Symbol",
        "Cen2"
    ]
]

But the Favicon link URLs look correct?

will-moore commented 2 years ago

Hi, In order to accept external contributions, could I ask you to sign and return the OME CLA as described in https://ome-contributing.readthedocs.io/en/latest/cla.html? Thanks.