/build/static/layout/Breadcrumb_cap_w.png

Can you create custom ticket rules to pull custom fields from parent ticket dynamically?

I'm attempting to create a custom ticket rule that pulls fields from the parent ticket based upon it's queue. 
For example.
If the parent is in queue 1 and creates children in queues 3 and 4, I'd like the child in queue 3 to pull Custom Field Value 1 and the child in queue 4 to pull Custom Field Value 2. But, If the parent is in queue 2 and creates the same children I'd like the child in queue 3 to pull Custom Field Value 3 and the child in queue 4 to pull Custom Field Value 4.
I'm thinking that I could convert the parent ticket title to string and then match a custom variable to a string value and set the rule to run when the string value matches the set custom variable. Using 2 rules set for 2 custom string variables I could then set the child tickets to only pull certain values based on ticket title.

Any KACE experts who might be able to point me in the right direction?

Thanks,

0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: chucksteel 8 years ago
Red Belt
2

Top Answer

Rules are queue specific when the select tickets, so create a rule in queue 1 that will update tickets which match given criteria and update their children (regardless of their queue, just based on ticket number). You would have a similar rule in queue 2 that updates the children from that queue.


Comments:
  • The problem there is that the child queues have different custom field titles than the parent queues. So the information doesn't translate well. I just need to be able to push certain values based on the queue id. I have created rules that can push the values from the parent to the children but I don't know how to determine the child queue id in kace. Any suggestions? - antbarrone 8 years ago
    • The queue id is stored in HD_TICKET.HD_QUEUE_ID. In your update rule you should be able to specify which custom field you are updating based on its ID, e.g. CUSTOM_FIELD_VALUE0 for the first field. You may end up having multiple rules to keep things more simple. - chucksteel 8 years ago
  • I managed to create something that works. I have a process that creates a parent with 4 children. So I have created 4 ctr's for simplicity's sake.

    SELECT
    CHILD.ID,
    CHILD.TITLE,
    CHILD.CUSTOM_FIELD_VALUE0,
    CHILD.CUSTOM_FIELD_VALUE1,
    HD_TICKET.CUSTOM_FIELD_VALUE0,
    HD_TICKET.CUSTOM_FIELD_VALUE4,
    CHILD.HD_QUEUE_ID,
    CHILD.PARENT_ID
    FROM
    HD_TICKET CHILD, HD_TICKET
    WHERE
    CHILD.PARENT_ID = HD_TICKET.ID
    AND HD_TICKET.RESOLUTION not like '%Fields pushed to child tickets%'

    UPDATE
    HD_TICKET CHILD,
    HD_TICKET
    SET
    CHILD.CUSTOM_FIELD_VALUE0 = HD_TICKET.CUSTOM_FIELD_VALUE0,
    CHILD.CUSTOM_FIELD_VALUE1 = HD_TICKET.CUSTOM_FIELD_VALUE4,
    HD_TICKET.RESOLUTION = CONCAT(HD_TICKET.RESOLUTION,' Fields pushed to child tickets')

    WHERE
    CHILD.PARENT_ID = HD_TICKET.ID AND CHILD.HD_QUEUE_ID = "1"

    Thanks again for the help. - antbarrone 8 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ