luomus / kotka-v3

Repository for the new Nest.js and Angluar-based version of kotka.
MIT License
0 stars 0 forks source link

Fix mapping for fields and add a new field on Label designer #3

Closed AnniinaK closed 4 days ago

AnniinaK commented 2 months ago

Hi, Taxon consept (sec) field doesn't show up on the labels even if it has been added to the label design.

Eli Taxon consept (sec) -kentän sisältö ei tule etiketteihin näkyviin vaikka kyseinen kenttä on valittavissa etikettipohjaan. Eli edelleen tämän tiedon joutuu ensin kopioimaan excelissä johonkin näkyviin tulevaan kenttään, jotta etiketit saa tehtyä ja sitten poistamaan tuplatiedon excelistä.

aorin commented 1 month ago

@AnniinaK Can be tested at https://kotkatest.luomus.fi. I added a field mapping for 4 fields that were missing it (bold, transcriberNotes, sec and higherGeography). There were still two label designer fields, objectID and samplePreparationID, that didn't seem to be mapped to any MY.document fields. Should we do something to them?

AnniinaK commented 1 month ago

@aorin Thanks! Yes I think those two need to be mapped too. If possible?

aorin commented 1 month ago

@AnniinaK so is the samplePreparationID the id of the MF.sample? How it differs from the label designer ID field? And what about objectID, I can't see anything like that in the schema

AnniinaK commented 1 month ago

@aorin Yes, samplePreparationID is the if for MF.sample, it is automatically generated on Kotka, as a derivative from the document ID. Example here: https://kotka.luomus.fi/view?uri=http://id.luomus.fi/LH.1, it has two samples, and they have identifiers http://id.luomus.fi/LH.1#P1 and http://id.luomus.fi/LH.1#P2.

Label designer other ID fields:

ObjectID is called MYObjectID on Kotka specimen entry form (https://kotka.luomus.fi/botany/specimens/add, fifth row) and Kotka excel template.

Sorry I don't know how these are technically handled and why they are not on schema :/

aorin commented 1 month ago

@AnniinaK Ok, so if we take the http://id.luomus.fi/LH.1 as an example, if you print labels through "Search specimens", you get one label with

If you print the labels through "Search preparations/samples", you get two labels and the first one has

It looks to me that the samplePreparationID field is unnecessary as it's the same as the ID field (if you print a sample label). And looking at the current logic, it's not clear if the objectID is 1 or 1#P1

AnniinaK commented 1 month ago

@aorin very good point! I had completely forgotten you can access Label designer also from "Search preparations/samples". So yes, samplePreparationID is unnecessary.

I would say 1#P1 would be the objectID, thinking it is just everything that comes after the dot after the namespace. But not sure though

aorin commented 3 weeks ago

@AnniinaK can be tested at https://kotkatest.luomus.fi. The objectID format can be changed later if needed but at least it's not empty now

AnniinaK commented 3 weeks ago

@aorin Tested all the fields (with preview, not actual PDF) and all good :)