bluegenes
bluegenes copied to clipboard
Use webconfig-model.xml headerconfig for report title
We should use the configuration already present for the legacy webapp for the report page title. In the webconfig-model.xml excerpt below, this would be <title mainTitles="secondaryIdentifier|primaryIdentifier" numberOfMainTitlesToShow="1" subTitles="*organism.name*|[strain.identifier]" />
for BioEntity
resulting in: Cc_08923 Cajanus cajan[ICPL87119]
This is currently not exposed as a WS, so this requires work on the IM backend.
Thanks to @sammyjava for feedback.
<class className="org.intermine.model.bio.BioEntity">
<headerconfig>
<titles>
<title mainTitles="secondaryIdentifier|primaryIdentifier" numberOfMainTitlesToShow="1"
subTitles="*organism.name*|[strain.identifier]" />
</titles>
</headerconfig>
<fields>
<fieldconfig fieldExpr="primaryIdentifier" label="Identifier"/>
<fieldconfig fieldExpr="secondaryIdentifier" label="Short identifier"/>
<fieldconfig fieldExpr="name" label="Name"/>
<fieldconfig fieldExpr="organism.name" label="Organism" />
<fieldconfig fieldExpr="strain.identifier" label="Strain" />
</fields>
</class>
And the really weird thing is on my mines a Gene page shows Gene.strain.identifier rather than Gene.anything. The existing code seems to "discover" Gene.strain.identifier rather than Gene.primaryIdentifier, etc.
That's because the attributes ("symbol" "identifier" "primaryIdentifier" "secondaryIdentifier" "name" "title" "id") are tried in order for all summary fields, including those of referenced classes (strain in your case). Identifier ends up matching before primaryIdentifier.
Not sure if this implementation detail was intentional. I guess there's no scenario we'd want to use a value of a referenced class' attribute as the report page title, so it can't be? If so I can tweak the logic so this doesn't happen (can be included in next minor release soon to come).
Yeah that would be fine. I'm not as concerned about hardcoded attributes as titles as I am about all my Gene pages having the same title. :)
all my Gene pages having the same title
Whoops, didn't realise that was the effect 😂
Edit: Tracked in #831