/bundles/itninjaweb/img/Breadcrumb_cap_w.png
Hello,
i have a question about tickets on K1000. I want to know if someone has a script which copy the adresse field into the cc_list field ? For not having to copy and paste by hand each time ...
Thank you
2 Comments   [ - ] Hide Comments

Comments

  • Which address field? The submitter's?
    • yeah the mail address of the submitter. I would like to automaticaly copy this address into the cc_list field ...
      • If there is something already in the cc_list field do you care if it is overwritten?
  • No, there is nothing in the cc_list field
Please log in to comment

Answer this question or Comment on this question for clarity

Answers

0
This select statement will match tickets without a value in the CC_LIST field. I did it this way because otherwise the rule would run on every ticket save and that's not as efficient. Of course if you want the CC_LIST field to change if the submitter changes then you would need to change this.
select HD_TICKET.* from HD_TICKET
where HD_TICKET.CC_LIST =''
This update statement will set the CC_LIST field to the email address of the submitter:
update HD_TICKET
    set HD_TICKET.CC_LIST = 
(select USER.EMAIL from USER where USER.ID = HD_TICKET.SUBMITTER)
  where 
        (HD_TICKET.ID in (<TICKET_IDS>))

Answered 04/13/2016 by: chucksteel
Red Belt

  • Fine, i will try it. thanks u !
Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share