/build/static/layout/Breadcrumb_cap_w.png
03/06/2019 232 views

I can't figure out what is going wrong with this rule.  It has worked flawlessly in my IT Service Desk Queue.  Today, I created a new queue for my Legal department.  They also need Department added to the ticket, so I just copied this rule over.  When I try to run it, it errors out and the only thing I can do is delete the rule and start over.  What am I missing?  The ONLY thing I am changing is the 7 to 0, because the Custom Field in the Legal queue is custom field 1

Select Statement:

SELECT HD_TICKET.ID
FROM HD_TICKET
JOIN USER_FIELD_VALUE DEPARTMENT on DEPARTMENT.USER_ID = SUBMITTER_ID and DEPARTMENT.FIELD_ID=2
WHERE HD_TICKET.CUSTOM_FIELD_VALUE7 != DEPARTMENT.FIELD_VALUE


Update SQL:

update HD_TICKET as T 
     set T.CUSTOM_FIELD_VALUE7=(
select USER_FIELD_VALUE.FIELD_VALUE FROM USER_FIELD_VALUE
where USER_FIELD_VALUE.USER_ID=SUBMITTER_ID and USER_FIELD_VALUE.FIELD_ID=2)where
(T.ID=<TICKET_IDS>)

1 Comment   [ + ] Show comment

Comments

  • What error is being reported?

    Did you try duplicating the rule in the original queue and then moving it to the legal queue? Or did you copy and paste? Shouldn't make a difference, but I always use the duplicate and then move functions.
    • I get a KACE screen with the "Oops! Something went wrong" message. I then can no longer even open the Rule, I have to delete it. I don't think I know how to move a rule. Let me try that.
    • I tried duplicating and moving, still didn't work. If I click (more info), here is the detailed error.
      PHP Error: Uncaught Unhandled Exception in /kbox/kboxwww/include/KTicketRule.class.php on line 974: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN)
      • What are the other settings on the rule?

All Answers

0

Well, not sure what was going on but I got it working now.  After I did the duplicate and move, the rule was Disabled.  I was getting the error message when I hit "Run Now", but when I open a ticket and save, the rule executes perfectly.  So, whatever it was, I "solved" it.  

Answered 03/08/2019 by: ForneyGonzo
Senior White Belt