Pass values from multiselect custom fields in helpdesk tickets to child ticket
I have seen some excellent post here regarding passing information from the parent ticket to the child.
But, and it may just be my lack of full understanding of the queries already posted, I could not seem to find an example of passing the values of a mulitselect custom field to a child ticket.
Let's say I have 5 items in a multiselect custom field. The submitter chooses items 1,3, and 5. How would I pass those values to the child ticket (preferably in the comments section)?
Thank you for your help,
Jeremy
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
scarpent
12 years ago
Jeremy you will need to use mysql to connect to the database to determine what value the information you want to copy has in Kbox. If you see below I am pulling custom fields that I created into the child tickets from the parent. The reason you need to look in my sql is because Kbox shows my custom field numbers as different values than when I use my sql to look at what the value is stored in the database.
SELECT PARENT.CUSTOM_FIELD_VALUE1, HD_TICKET.CUSTOM_FIELD_VALUE1, PARENT.CUSTOM_FIELD_VALUE2, HD_TICKET.CUSTOM_FIELD_VALUE2, PARENT.CUSTOM_FIELD_VALUE3, HD_TICKET.CUSTOM_FIELD_VALUE3, PARENT.CUSTOM_FIELD_VALUE0, HD_TICKET.CUSTOM_FIELD_VALUE0, HD_TICKET.ID FROM HD_TICKET PARENT, HD_TICKET WHERE PARENT.ID = HD_TICKET.PARENT_ID
Comments:
-
Thank you for the reply.
Your answer assumes I know what the user selected, correct?
However, if this was the initial ticket, I would not know what the user selcted.
So, I couldn't query the specific values.
Now that I'm thinking about this even more, maybe the multiselect field would pass the values exactly the same as a single select or text. There would just be more values.
Thank you again, I think your answer put my mind on the right track. - jvleigh 12 years ago -
Once you get started feel free to post your SQL code if it isn't working. I believe you're correct though, that the KBOX just stores the multiple selections as comma delimited values in the database. - chucksteel 12 years ago