/build/static/layout/Breadcrumb_cap_w.png

Passing Comment information during a Ticket Process

Is it possible to pass the comment information down to all child tickets when starting a process?

We were wanting to create a process with 10 or more steps which will all need the same user information passed down to them during creation.

 

When you start a process you are brought to the main ticket which I would like to put the users info into. When saving it assigns all the tickets and would like to include the comments from the parent.

 


0 Comments   [ + ] Show comments

Answers (1)

Posted by: nshah 11 years ago
Red Belt
1

It is possible but you have to do it through ticket rules. There are articles on ITNINJA where others have contributed sql statements you might be able to use.

 

http://www.itninja.com/question/passing-comment-field-from-parent-ticket-to-child-tickets


Comments:
  • I have tried this ticket rule but have had no luck with passing the comments. I keep getting sql error

    05/13/2013 15:46:51> Starting: 05/13/2013 15:46:51
    05/13/2013 15:46:51> Executing Select Query...
    05/13/2013 15:46:51> selected 9 rows
    05/13/2013 15:46:51> Executing Update Query...
    05/13/2013 15:46:51> mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '614,614,614,614,614,614,614,614' at line 6] in EXECUTE("UPDATE HD_TICKET PARENT, HD_TICKET, HD_TICKET_CHANGE PCHANGE, HD_TICKET_CHANGE
    SET HD_TICKET_CHANGE.COMMENT = PCHANGE.COMMENT
    WHERE HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID
    AND PCHANGE.HD_TICKET_ID = PARENT.ID
    AND PARENT.ID = HD_TICKET.PARENT_ID
    AND HD_TICKET.ID = 614,614,614,614,614,614,614,614,614")

    05/13/2013 15:46:51> Ending: 05/13/2013 15:46:51 - young020 11 years ago
    • Please post your SQL statements for the select and update. It looks like your select statement is returning the same ticket multiple times. You could also adjust your update statement to be HD_TICKET.ID in <TICKET_IDS> whereas right now it must be HD_TICKET.ID = <TICKET_IDS> - chucksteel 11 years ago
      • I am using this as the select query:

        SELECT HD_TICKET.ID, HD_TICKET_CHANGE.COMMENT, PCHANGE.COMMENT AS PCOMMENT
        FROM HD_TICKET PARENT, HD_TICKET, HD_TICKET_CHANGE PCHANGE, HD_TICKET_CHANGE
        WHERE HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID
        AND PCHANGE.HD_TICKET_ID = PARENT.ID
        AND PARENT.ID = HD_TICKET.PARENT_ID
        AND PCHANGE.USER_ID != 0
        AND PCHANGE.COMMENT != ''
        AND HD_TICKET.HD_QUEUE_ID = 1
        ORDER BY HD_TICKET.ID

        I am using this as the Update Query:

        UPDATE HD_TICKET PARENT, HD_TICKET, HD_TICKET_CHANGE PCHANGE, HD_TICKET_CHANGE
        SET HD_TICKET_CHANGE.COMMENT = PCHANGE.COMMENT
        WHERE HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID
        AND PCHANGE.HD_TICKET_ID = PARENT.ID
        AND PARENT.ID = HD_TICKET.PARENT_ID
        AND HD_TICKET.ID = <TICKET_IDS> - young020 11 years ago
      • One issue is that you are trying to change a comment in the database and I don't think that's a good idea. For one, it's not clear which comment would get changed. You might want to look at inserting a comment instead of trying to change an existing one (especially since you can't guarantee that there will be a comment to change). - chucksteel 11 years ago
  • What would be the best way of adding a new comment than overwriting one? Can the "Results are tickets, add a comment to each one" option be used to update multiple tickets at once? - young020 11 years ago
    • I considered that but I don't believe you can pull information from the parent ticket when adding comments. I think that the variables that are made available are only for the email, it would be cool if they were available for comments, but I don't think that is the case.

      Most people approach this by using custom fields and have the data transferred from parent to child that way. - chucksteel 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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