/build/static/layout/Breadcrumb_cap_w.png

Script for copy mail field to cc_list

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   [ + ] Show comments
  • Which address field? The submitter's? - chucksteel 8 years ago
    • yeah the mail address of the submitter. I would like to automaticaly copy this address into the cc_list field ... - Crash73 8 years ago
      • If there is something already in the cc_list field do you care if it is overwritten? - chucksteel 8 years ago
  • No, there is nothing in the cc_list field - Crash73 8 years ago

Answers (1)

Posted by: chucksteel 8 years ago
Red Belt
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>))


Comments:
  • Fine, i will try it. thanks u ! - Crash73 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