/build/static/layout/Breadcrumb_cap_w.png

Can the update statement on a ticket rule be an insert?

Management would like to track small issues that are usually resolved quickly on first contact (like password resets).  They would like me to set up a rule to insert a record into the HD_WORK table for all tickets in a specific queue to for 5 minutes of work.  Is it even possible for the update statement box to contain a mysql insert statement?

Thanks.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: h2opolo25 9 years ago
Red Belt
0
You should not have to use insert for this.

use an update and set statement to set the HD_WORK.ADJUSTMENT_HOURS to 0.08 for the ticket. 
(5min/60min = 0.083333)

Comments:
  • Scratch that. Just tested it and it won't work with the set statement. - h2opolo25 9 years ago
Posted by: h2opolo25 9 years ago
Red Belt
0
Just tried the following in my test system and it worked.....(sorry for re-answer but comment formatting sucks)

select * from HD_TICKET
where HD_TICKET.ID = 394


INSERT INTO HD_WORK (HD_TICKET_ID, USER_ID, MODIFIED, ADJUSTMENT_HOURS)
VALUES(<TICKET_IDS>, 1444, NOW(), 0.23)

Make sure you include the USER_ID or else it will show in the table but won't show in the GUI, change your select and insert statements accordingly and most importantly do not blame me if it messes things up. TEST on a test VM before implementing anything in production.


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