Major
Nice to have
Bugfix
Major
Detail
#23406
The TLClass "Tag" should have a reference to the tagged object
The TLClass tag should be extended by a reference to the tagged object. This was already requested in #21498. However, the original problem was ultimately solved differently:
This ticket was implemented to use these tags in version comparison in #21402. But this has been changed later, so that revision's are used directly.
Therefore the ticket was closed. However, this is now also used for Kafka schema management in Codim. And in POS there is also such an attribute. Therefore, there should be this attribute directly in the base.
Situation in POS
- The file Tag.model.xml is overwritten. (In the sense of: copied to POS under the same name).
- Two additional types are defined:
- Tag.projectArchive
- ProjectArchiveTag
- Tag.projectArchive extends Tag.all with the taggedObj attribute and half a dozen other subject attributes.
- taggedObj is defined as:
{{#!xml <reference name="taggedObj" kind="forwards" mandatory="true" type="tl.tables:ObjectTableInterface" > <annotations> <delete-protected/> <storage-algorithm> <historic-storage/> </storage-algorithm> </annotations> </reference> }}}
Situation in Codim
- The Tag.model.xml in the base is extended with the Tag.all#businessObject attribute:
{{#!xml <reference name="businessObject" kind="forwards" type="tl.tables:ObjectTableInterface" > <annotations> <delete-protected/> <storage-algorithm> <historic-storage/> </storage-algorithm> </annotations> </reference> }}}
Proposed implementation.
- The attribute should be called taggedObj out of consideration for POS. This will save POS from having to migrate. Migration in Kafka schema management is probably much easier since the whole project is much smaller.
- The attribute should not be mandatory, so that one can also create a tag, if one does not want to tag a concrete object, but a whole dataset.
- In everything else the two variants are the same. Therefore, the attribute in the base should be defined exactly the same way.
Data migration
There is no automatic migration for this ticket, as it was decided at the Daily Scrum that there is currently no need for it, but more important topics and too little time.
Projects that do not depend on com.top_logic.project.pos need to perform the following migration:
- MetaAttribute Tag:Tag.all#taggedObj has been introduced.
- See: of a MetaAttribute]
- The tag#taggedObj KO attribute has been introduced.
- See: of a KO attribute]
Projects that depend on com.top_logic.project.pos must also perform the following migration:
- TLModel attribute Tag:Tag.projectArchive#taggedObj has been moved to class Tag.all after consultation with POS, so that it is analogous to the definition in base.
- See: of a MetaAttribute]
- Furthermore, the attribute was made non-mandatory.
- The MO reference taggedObj is now inherited from the MOClass tag. Previously, this reference was mapped in the ProjectTagMeta.xml using the following four MO attributes: taggedObj_BRC, taggedObj_REV, taggedObj_ID and taggedObj_TYPE. Instead, there is now only the inherited MO reference. This does not change anything in the database table definition. But since the definition of the MetaObject is stored in the database itself, it must be updated there accordingly.
In the context of this ticket #23639 has been created. It is the remnant of the attempt to create an automatic data migration for this.
Test
No test, because the ticket is to be finished and for a test for example new functions would have to be implemented in the demo to demonstrate the tagging of objects and test.