/build/static/layout/Breadcrumb_cap_w.png

How can i create a custom rule to set ticket approver based on a selected category

How can i create a custom rule to set ticket approver based on a selected category

0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: StockTrader 8 years ago
Red Belt
0

Top Answer

Hello,


first of all to keep the Update SQL simple you'd find out the ID of the user that you want to set as approver. (you can have a look in the USER table)

Then you can create with the Wizard a rule that acts on the tickets of the category that you like and sets, for now, a field that you choose (it's not important..we are going to customise the SQL Update in a bit)

Modify now the Update SQL with this code:

update HD_TICKET
set HD_TICKET.APPROVER_ID = 14
where HD_TICKET.ID in (<TICKET_IDS>)

change the APPROVER_ID to the USER.ID that wil need to approve.

Set the Schedule to on Ticket Save

Test it carefully before to go in production....rules are powerful and they need to be handled with care !

Kind regards,

 Marco - StockTrader 

Posted by: chucksteel 8 years ago
Red Belt
0
Use the wizard to create a rule that will change the submitter based on category. Then change the Update SQL to change the APPROVER_ID instead of SUBMITTER_ID:
update HD_TICKET, USER as T5
    set HD_TICKET.APPROVER_ID = T5.ID
  where T5.USER_NAME = 'approverusername' and 
        (HD_TICKET.ID in (<TICKET_IDS>))


Comments:
  • I did it and it worked, but how would set it so that the approval is required before open instead of close? - emorrison 8 years ago
    • After set HD_TICKET.APPROVER_ID = T5.ID add:
      ,HD_TICKET.APPROVE_STATE = "opened" - chucksteel 8 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