I have created an extension that adds a new field to the User (Person), now I want to filter the tickets (incidents) by my new field, adding it to the "add new criteria" list on the Search for Incident Objects View, however I can't find where I should add my new search criteria.
Could you guide me please?
Thanks
Last edit: Ichigo 2021-04-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is no relation between a User and a Ticket, so I assume that when you write User, you mean either the requestor of the Ticket (caller_id) or the Agent (agent_id) which both are Person object.
So assuming you have added a field on Person to specify if that person is a VIP (a top manager for eg), and then want to search for Ticket requested by a VIP person, then:
Just add an ExternalField attribute on Ticket based on caller_id returning the VIP field of the Person.
This attribute ExternalField will be available in the search criteria of the Ticket
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your response, i added this code to my datamodel xml on my extension.
ctm_roles is the field on the Person table. ( attribute type: AttributeEnumSet)
In the view_Ticket from the database i can see the field caller_ctm_roles with a value ( eg. |Admin|VIP| ) , but it does not appear in the search criteria list of the Ticket.
Did I need to modify something else?
Thank you so much.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have created an extension that adds a new field to the User (Person), now I want to filter the tickets (incidents) by my new field, adding it to the "add new criteria" list on the Search for Incident Objects View, however I can't find where I should add my new search criteria.
Could you guide me please?
Thanks
Last edit: Ichigo 2021-04-27
There is no relation between a User and a Ticket, so I assume that when you write User, you mean either the requestor of the Ticket (caller_id) or the Agent (agent_id) which both are Person object.
So assuming you have added a field on Person to specify if that person is a VIP (a top manager for eg), and then want to search for Ticket requested by a VIP person, then:
Hi Vincent,
Thanks for your response, i added this code to my datamodel xml on my extension.
ctm_roles is the field on the Person table. ( attribute type: AttributeEnumSet)
In the view_Ticket from the database i can see the field caller_ctm_roles with a value ( eg. |Admin|VIP| ) , but it does not appear in the search criteria list of the Ticket.
Did I need to modify something else?
Thank you so much.
Did you also add it to the presentation node?
Hi Jeffrey,
Yes, I have also tried, but without success.
I added them in both search and default_search, but it still doesn't show up.
Hi,
This is my new attempt, the entire datamodel from my extension.
dependences for the extension :
But still dont works
@cisou @jbostoen Please can you help me ?