Hi,
I'm wondering is there a option to change datamodel and more specific I want to link User Request with Physical Device?
I want to add physical info for a specific CI in User Request.
Cheers
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, there is a link to "functional CI" ( via lnkFunctionalCIToTicket) but it can give you only list of functional CIs. I want to add info about Physical Device (brand_id, model_id, ...). Now there isn't such link.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The physical devices are a subclass of functional CIs.
You could also indeed create a specific link between physical devices and functional CIs, but I'd advise to also make it clear to agents then which to use when.
For this, you would need to create an extension and then add a new link class between UserRequest and PhysicalDevice; and update the presentation of UserRequest to show this link.
If your question, is about displaying on a UserRequest, in a tab, the PhysicalDevices linked to the UserRequest, with additional info such as location_id, then without having to create a new relationship (which might be confusing for users), you could just define a Dashboard Attribute on the UserRequest class and define such PhysicalDevices list in it as a dashlet list
👍
2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the replies.
May be I should start what is my goal.
I wrote with Jeffrey about this - I want user in iTop to have possibility when create User Request about broken CI to add in this request info about that CI in the body part. I want to display type of the device, brand, model alongside with title of the request, description, caller id, caller mail address ...
That is the result I want to achieve.
Cheers
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One alternative is that you make sure users can only link 1 physical device. Then you could extend UserRequest (or create a custom class), so there is an AttributeExternalKey pointing to the device.
It could be extended so the user can also select one device while creating the user request.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Then you can also use the existing extension Customized Request Form, which will allow you to force the user to select a CI for some service only, without writing any code. But this won't display the brand/model of the selected device (That requires a AttributeExternalKey as suggested above by Jeffrey, and AttributeExternalFields. Customized Request Form does not yet support ExternalField, it's logged but not available yet...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys,
I keep pushing this but still can't get the goal.
Now I create an extension and it looks like that:
<classid="UserRequest"_delta="merge"><parent>Ticket</parent><fields><fieldid="physicaldevice_id"xsi:type="AttributeExternalKey"_delta="define"><filter><![CDATA[SELECT PhysicalDevice AS ci JOIN lnkFunctionalCIToTicket AS lnk1 ON lnk1.functionalci_id = ci.id WHERE lnk1.ticket_id = :this->id]]></filter><sql>physicaldevice_id</sql><target_class>PhysicalDevice</target_class><is_null_allowed>true</is_null_allowed><on_target_delete>DEL_MANUAL</on_target_delete></field><fieldid="functionalci_name"xsi:type="AttributeExternalField"_delta="define"><extkey_attcode>physicaldevice_id</extkey_attcode><target_attcode>name</target_attcode></field><fieldid="functionalci_brand"xsi:type="AttributeExternalField"_delta="define"><extkey_attcode>physicaldevice_id</extkey_attcode><target_attcode>brand_name</target_attcode></field><fieldid="functionalci_model"xsi:type="AttributeExternalField"_delta="define"><extkey_attcode>physicaldevice_id</extkey_attcode><target_attcode>model_name</target_attcode></field></fields></class>
With this filter I got the PhysicalDevice (when I test it in iTop "Run Queries")
Checked the database - the new column is there but there is only 0.
I try to use this place holder in my body: $this->physicaldevice_id->brand_name$
but in the mail I got - undefined.
What I miss and where can I see what query is execute in the database where create a Request for example?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Vincent,
And thanks for the reply but still no luck.
I've made the changes like you suggested but again in the mail I receive "undefined" (I've also change the placeholder - $this->physicaldevice_id->functionalci_id$).
Do you have any other idea?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Who is feeding your ExternalKey? From your filter, it seems that a user need first to add FunctionalCI to the Ticket, save the ticket, then edit it again to add a "physicaldevice", choosen between the FunctionalCIs linked to the Ticket.
It's not because you have defined a filter, that the ExternalKey will be fed automatically. You could do it within the Ticket (or UserRequest) method OnInsert
Here is a draft of how you could copy within the OnInsert method, the last "PhysicalDevice" already linked to Ticket, in your ExternalKey.
Hi,
I'm wondering is there a option to change datamodel and more specific I want to link User Request with Physical Device?
I want to add physical info for a specific CI in User Request.
Cheers
Yes. But as far as I know, this link already exists? (functional CI)
Yes, there is a link to "functional CI" ( via lnkFunctionalCIToTicket) but it can give you only list of functional CIs. I want to add info about Physical Device (brand_id, model_id, ...). Now there isn't such link.
The physical devices are a subclass of functional CIs.
You could also indeed create a specific link between physical devices and functional CIs, but I'd advise to also make it clear to agents then which to use when.
For this, you would need to create an extension and then add a new link class between UserRequest and PhysicalDevice; and update the presentation of UserRequest to show this link.
Something similar: https://github.com/jbostoen/itop-jb-lnkdocumenttoticket
If your question, is about displaying on a UserRequest, in a tab, the PhysicalDevices linked to the UserRequest, with additional info such as location_id, then without having to create a new relationship (which might be confusing for users), you could just define a Dashboard Attribute on the UserRequest class and define such PhysicalDevices list in it as a dashlet list
Thank you for the replies.
May be I should start what is my goal.
I wrote with Jeffrey about this - I want user in iTop to have possibility when create User Request about broken CI to add in this request info about that CI in the body part. I want to display type of the device, brand, model alongside with title of the request, description, caller id, caller mail address ...
That is the result I want to achieve.
Cheers
One alternative is that you make sure users can only link 1 physical device. Then you could extend UserRequest (or create a custom class), so there is an AttributeExternalKey pointing to the device.
It could be extended so the user can also select one device while creating the user request.
Then you can also use the existing extension Customized Request Form, which will allow you to force the user to select a CI for some service only, without writing any code. But this won't display the brand/model of the selected device (That requires a AttributeExternalKey as suggested above by Jeffrey, and AttributeExternalFields. Customized Request Form does not yet support ExternalField, it's logged but not available yet...
Thanks for the replies.
Where can I read more about AttributeExternalKey to try building my request with CI info included?
https://www.itophub.io/wiki/page?id=3_0_0%3Acustomization%3Astart
https://www.itophub.io/wiki/page?id=3_0_0%3Acustomization%3Axml_reference
Examples on GitHub may also help :)
Sorry for this request but can you share link with some examples?
Thanks
You can learn a lot from the existing datamodel-production.xml or from GitHub.
Otherwise, you could also contact Combodo's sales team and/or inquire about the ITSM Designer.
Hi guys,
I keep pushing this but still can't get the goal.
Now I create an extension and it looks like that:
With this filter I got the PhysicalDevice (when I test it in iTop "Run Queries")
Checked the database - the new column is there but there is only 0.
I try to use this place holder in my body: $this->physicaldevice_id->brand_name$
but in the mail I got - undefined.
What I miss and where can I see what query is execute in the database where create a Request for example?
Thanks
No sure it's the cause, but can you try to replace
<target_attcode>brand_name</target_attcode>
by
<target_attcode>brand_id</target_attcode>
and do the same on <target_attcode>model_name</target_attcode>
Hi Vincent,
And thanks for the reply but still no luck.
I've made the changes like you suggested but again in the mail I receive "undefined" (I've also change the placeholder - $this->physicaldevice_id->functionalci_id$).
Do you have any other idea?
Who is feeding your ExternalKey? From your filter, it seems that a user need first to add FunctionalCI to the Ticket, save the ticket, then edit it again to add a "physicaldevice", choosen between the FunctionalCIs linked to the Ticket.
It's not because you have defined a filter, that the ExternalKey will be fed automatically. You could do it within the Ticket (or UserRequest) method OnInsert
Here is a draft of how you could copy within the OnInsert method, the last "PhysicalDevice" already linked to Ticket, in your ExternalKey.
If needed, you could also block the creation if no "physicaldevice" is present in some cases where it is mandatory.