/build/static/layout/Breadcrumb_cap_w.png

Unable to close a ticket as non-owner due to rule that reopens a ticket upon non-owner ticket update.

Currently, we have a rule set up so that if a ticket is closed, and a user responds to the ticket via email or adds a comment, it will automatically reopen the ticket and set it to Reopened status.

This is all hunky dory, however with this rule enabled, only the owner of the ticket can close it due to the rule to applying to any changes by non-owners. So, say if Tech A is on vacation and Tech B wants to close Tech A's ticket, Tech B has to take ownership and close it even if Tech B did nothing for the ticket. If not, attempting to close the ticket will place it in Reopened status.

Is there a way to modify the rule so the flag to change the status to Reopened only applies if the ticket Submitter modifies the ticket, instead of any non-owner?

Here's the content of the rule:

SELECT SQL:

select distinct HD_TICKET.ID,
               HD_TICKET.OWNER_ID as OWNER_ID,
               HD_TICKET.ID as TICKNUM,
               HD_TICKET.TITLE,
               HD_STATUS.NAME AS STATUS_NAME,
               HD_STATUS.STATE as STATE,
               OWNER.USER_NAME as OWNER_NAME,
               OWNER.FULL_NAME as OWNER_FULLNAME,
               OWNER.EMAIL as OWNER_EMAIL,
               UPDATER.USER_NAME as UPDATERNAME,
               UPDATER.EMAIL as UPDATEREMAIL
          from (HD_TICKET, HD_STATUS)
     left join HD_TICKET_CHANGE on HD_TICKET_CHANGE.ID = <CHANGE_ID>
     left join HD_TICKET_CHANGE_FIELD on HD_TICKET_CHANGE_FIELD.HD_TICKET_CHANGE_ID = HD_TICKET_CHANGE.ID
     left join USER OWNER on OWNER.ID = HD_TICKET.OWNER_ID
     left join USER UPDATER on UPDATER.ID = HD_TICKET_CHANGE.USER_ID
         where HD_STATUS.ID = HD_TICKET.HD_STATUS_ID
           and HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID
           and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_RATING'
           and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_COMMENT'
           and HD_STATUS.STATE = 'closed'
           and (UPDATER.ID <> OWNER.ID or OWNER.ID is NULL)
           and UPDATER.ID > 0

UPDATE SQL:

update HD_TICKET as T, HD_STATUS as STATUS
set T.HD_STATUS_ID = STATUS.ID,
T.RESOLUTION = CONCAT(T.RESOLUTION,'
Reopened'),
T.TIME_OPENED  = IF(STATUS.STATE = 'opened', NOW(), T.TIME_OPENED),
T.TIME_CLOSED  = IF(STATUS.STATE = 'closed', NOW(), T.TIME_CLOSED),
T.TIME_STALLED = IF(STATUS.STATE = 'stalled', NOW(), T.TIME_STALLED),
T.SATISFACTION_RATING = IF(STATUS.STATE = 'closed', NULL, T.SATISFACTION_RATING),
T.SATISFACTION_COMMENT = IF(STATUS.STATE = 'closed', NULL, T.SATISFACTION_COMMENT)
where STATUS.NAME = 'Reopened' and
T.HD_QUEUE_ID = STATUS.HD_QUEUE_ID and  (T.ID in (<TICKET_IDS>))

4 Comments   [ + ] Show comments
  • I'm confused. Are you saying that you don't have it set so all technicians are ticket owners for your queues? Or by "ticket owner" do you mean the assigned technician drop-down?

    We have a label for each queue's ticket owners, and we add all our technicians to this label. Then, in the queue's configuration, under User Preferences, we add the label. - crodriguez 6 years ago
  • All technicians are listed in the owner queue. The issue is that if you're not the assigned owner, you can't close the ticket because the rule in place dictates that any activity by anyone that's not the assigned owner once it's closed will set the ticket to re-opened.

    While this is ideal for the submitter of the ticket to automatically re-open their ticket it if they make any additional comments or changes, it's not ideal for us as it requires us to be the assigned owner in order to close any tickets.

    Ideally, I'd like to just not use that rule altogether, but management and decisions and PR and etc. - JerradH 6 years ago
  • I guess what I don't understand is what is being done to the ticket after it's closed, that it re-opens the ticket? Is it because Tech A's away message prompts the re-opening of the ticket?

    Also, I forgot to ask what version you're on. Are you on 8.1 or what version are you guys on? - crodriguez 6 years ago
  • According to Kace the Select statement contains a syntax error (when clicking the View Ticket Search Results link) - SadCorn 5 years ago

Answers (2)

Answer Summary:
Posted by: chucksteel 6 years ago
Red Belt
1

Top Answer

If you only want your rule to reopen the ticket if the submitter makes a change, then change this:
and (UPDATER.ID <> OWNER.ID or OWNER.ID is NULL) 
           and UPDATER.ID > 0

To this:
and UPDATER.ID = HD_TICKET.SUBMITTER_ID


Comments:
  • Awesome! Thanks! I'll give it a try! - JerradH 6 years ago
  • So I've edited it and saved it, but after enabling the rule, it reverts back to the line:

    and (UPDATER.ID <> OWNER.ID or OWNER.ID is NULL)
    and UPDATER.ID > 0

    Also, now when I email with [TICK:#####] at the beginning of the subject line, it's not appending my email to the comments of the ticket. - JerradH 6 years ago
    • Are you sure you didn't duplicate the rule? You shouldn't have to enable it again after making a change. - chucksteel 6 years ago
      • Nope, wasn't duplicated. It now appears to be sticking. It was strange. I'll likely delete it and recreate it if happens again.

        I figured out the email issue. Did some testing and things look to be working fine now. Thanks for your help! - JerradH 6 years ago
Posted by: tbatchelder 1 year ago
Senior White Belt
0

We are running into a similar issue with this reopen rule, but would like it so that someone who doesn't own the ticket can close it. Currently, ONLY the owner of the ticket can change the status to closed. If someone who is not the ticket owner tries to change the status to Closed and then saves changes, the status reverts back to Reopened. I'm guessing we need to make a change to the last couple lines, but am unsure what it needs to be changed to.


Comments:
  • Were you able to get this figured out? - Marcia.VanDyke 1 year ago
    • Negative, we ended up disabling the rule since it was causing more issues that what it was worth. - tbatchelder 1 year 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