How can i create a custom rule to set ticket approver based on a selected category
Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answer Chosen by the Author

0

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 

Answered 02/08/2016 by: StockTrader
Red Belt

Please log in to comment

Answers

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>))

Answered 02/08/2016 by: chucksteel
Red Belt

  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
  • I did it and it worked, but how would set it so that the approval is required before open instead of close?
    • After set HD_TICKET.APPROVER_ID = T5.ID add:
      ,HD_TICKET.APPROVE_STATE = "opened"
Please log in to comment
Answer this question or Comment on this question for clarity