Can't Change Status Manually
Hi,
I have created a custom rule in KACE so that the status will change to 'Waiting On User' automatically when I respond to the submitter. However, if for any reason I want to change the status manually after it has changed and sitting at the 'Waiting On User' status, I can not.
Any help would be great as I would like to have the rule enabled. I have entered the below in the Custom Rule if it is any help.
- Select Query:
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 UPDATER.ID = OWNER.ID
- Update Query:
update HD_TICKET as T, HD_STATUS as STATUS
set T.HD_STATUS_ID = STATUS.ID,
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 = 'waiting on user' and
T.HD_QUEUE_ID = STATUS.HD_QUEUE_ID and (T.ID in (<TICKET_IDS>))
Regards,
Gianni
1 Comment
[ + ] Show comment
Answers (0)
Please log in to answer
Be the first to answer this question
Looking at your select statement I see only 3 conditions, satisfaction rating or satisfaction comment are not the fields being modified on this transaction and the actor making the change is the ticket owner.
I'm thinking the results would be, as long as the owner is making the change and the owner is not changing the satisfaction rating or satisfaction comment it doesn't really matter what field you are changing it is going to set the status to waiting on user.
If you ARE responding to the submitter via the Comments of the ticket you may want to look at specifying the exact field that is being changed by the owner. - jmarotto 11 years ago