I also tried to copy and paste the whole presentation structure from itop/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml and put the delta="define" into the details tag without success:
whenever I try to use redifine instead of define I get the following error in the toolkit:
Error loading module "incident-classification-field": /itop_design/classes/class[cmdbAbstractObject]/class[Ticket]/class[Incident]/fields/presentation/details at line 21: could not be modified (not found) - Loaded modules: ... , itop-incident-mgmt-itil , ...
even if the incident module is loaded (I set it as dependency)
Plenty of things seem wrong: there's no "ID" attribute for each value (also recommended to only use lowercase and underscore in their names for consistency; they get the translation from the dictionary files anyway).
Your "presentation" node is contained within fields; also not the proper place.
And I'm pretty sure it will need to be nested deeper in various "items" nodes or it will pop up in weird places.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi,
I added a new field and the field is created in the database as seen in the attachment.
When adding the presentation tags it has no effect. The new field does not show up. Here is my datamodel file for the extension:
I also tried to copy and paste the whole presentation structure from itop/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml and put the delta="define" into the details tag without success:
whenever I try to use redifine instead of define I get the following error in the toolkit:
even if the incident module is loaded (I set it as dependency)
Looking at other examples people did not do anything different:
https://www.itophub.io/wiki/page?id=latest:customization:add-attribute-sample
https://sourceforge.net/p/itop/discussion/customizing-itop/thread/c9c0597b0d/?limit=25#1c65
unless I'm missing something
Plenty of things seem wrong: there's no "ID" attribute for each value (also recommended to only use lowercase and underscore in their names for consistency; they get the translation from the dictionary files anyway).
Your "presentation" node is contained within fields; also not the proper place.
And I'm pretty sure it will need to be nested deeper in various "items" nodes or it will pop up in weird places.
Bless you,
I'm aware of the translation and nested locations for the item locations but I wanted to simplify it to find the error before going on.
The error was the closing Fields tag being beneath the Presentation tag. The presentation definition has to come after the fields are closed.
I must have copied the presentation definition into the wrong line. Maybe I would habe seen it after a night of sleep.
I will add proper nesting and IDs
.
Last edit: Kai Karger 2022-05-16