I'm trying to add some additional information to an organization which I want to show on all user requests/tickets for that organization. I've created an extension that on the organization adds:
<field id="org_debit_notes" xsi:type="AttributeText"></field>
And this works fine, I can view and edit that text on the organization page.
But now I want to show that text on the user request page as information for all requests linked to that organization. I've tried this:
And the deployment works but as soon as I try to open a request I just get an error:
iTop: An error occurred, check server error log for more information.
And the apache error is:
PHP Warning: Undefined array key "org_debit_notes_display" in /var/www/html/itop/core/metamodel.class.php on line 1478
Does anyone know how this should be done?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Any chance you generated this with an AI tool? This seems completely invalid XML for iTop.
You'd want to add an AttributeExternalField pointing to your org_debit_notes field of your organization; and add it properly in the presentation of the user request.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Jeffrey, yes I did, but it looked similar to other xml's I have for other purposes (this is not the complete code) but you're probably completly right in that something is off and I'm doing it wrong.
OK great tip, AttributeExternalField is the way I should go with then.. I'll give it a try to figure it out. Thanks for pointing out the direction :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to add some additional information to an organization which I want to show on all user requests/tickets for that organization. I've created an extension that on the organization adds:
<field id="org_debit_notes" xsi:type="AttributeText"></field>
And this works fine, I can view and edit that text on the organization page.
But now I want to show that text on the user request page as information for all requests linked to that organization. I've tried this:
And the deployment works but as soon as I try to open a request I just get an error:
iTop: An error occurred, check server error log for more information.
And the apache error is:
PHP Warning: Undefined array key "org_debit_notes_display" in /var/www/html/itop/core/metamodel.class.php on line 1478
Does anyone know how this should be done?
Any chance you generated this with an AI tool? This seems completely invalid XML for iTop.
You'd want to add an AttributeExternalField pointing to your org_debit_notes field of your organization; and add it properly in the presentation of the user request.
Hi Jeffrey, yes I did, but it looked similar to other xml's I have for other purposes (this is not the complete code) but you're probably completly right in that something is off and I'm doing it wrong.
OK great tip, AttributeExternalField is the way I should go with then.. I'll give it a try to figure it out. Thanks for pointing out the direction :)
https://www.itophub.io/wiki/page?id=latest:customization:xml_reference
That's a reference to the real XML possibilities :)
I did this and now it works:
The on ly problem now is that the text displayed is not the Label I have in the code, but seems to be rendered from the class and attribute name:
"Organization->Organization Debit Notes"
Fixed by adding entries in the dict file, I forgot that I had one HAHA...