Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Close related work order when change is rejected

Highlighted
Bhuvnesh
Frequent Visitor

Close related work order when change is rejected

Hi,
I am working on automating change request. Change request & work order templates are defined in such a way that depending on the change category a no. of workorders are attached in a predecessor/sucessor mode. Approval is obtained at change level itself. Now the requirement is that if change is "Rejected" that means the approval status is "Rejected" then status of all related work orders should be updated (say set to Cancelled).
I have created DB rules which executes on the basis of change approval result status and updates "related" work order.
The problem is that this rules works perfectly to update the status of first workorder.
But for the remaining work orders it gives a message "work order cannot be udpated as predecessor is pending".

Has someone implemented such a solution? Please provide your suggestions.
Regards,
Bhuvnesh
5 REPLIES
George M. Meneg
Honored Contributor

Re: Close related work order when change is rejected

Hello,

You need to modify the state of the status Canceled to "closed".

Go to Data/Codes/Work Order/Work Order status. Double click "Canceled". On the form there is a drop down menu for the field state. Set it to "Closed".

This way, when a work order status changes to "Canceled" the work order is considered as closed, so the successors could start.

Also the same stands if a work order is linked any item and "Wait for work order completion" is set to true for this item. The item won't be able to be closed if workorder's status state is not "Closed"
menes fhtagn
Vasily Kamenev
Honored Contributor

Re: Close related work order when change is rejected

Hi
Select one boolean field for internal use, emaple name be "Cancelled". in rule for normal workflow set exludel if Cancelled"=true, of' course if this rule(s) is present. In new rule, if change set to Cancelled, set in Wos "Cancelled" in true. Create next Rule when Status set "Assigned" ( or other name using) and "Cancelled" is true - close this WO: Set status as Cancelled. Modefy own rule or add one new : if status= Cancelled open next wo by workflow and set status = Assigned.

Vasily
Bhuvnesh
Frequent Visitor

Re: Close related work order when change is rejected

Thanks for the inputs.
As I mentioned the problem was there because of predecessor/sucessor relation and also because I had enabled "successor starts only after completion of predecessor". As a result at a time only one WO was getting updated (even with status of "Read" type).
I then used a UI rule to call system action which could allow predecessor to start ASAP. With this and existing rules now all WOs are getting closed as soon as change is rejected.
Izzy UK
Super Collector

Re: Close related work order when change is rejected

Hi Bhuvnesh,

Care to share this UI rule that calls a system action or have I interpreted it wrong? Because I have the same problem.

(SP15)
Thank you
NMOLL
Regular Collector

Re: Close related work order when change is rejected

Hi Bhuvnesh,

I have the same problem as you did. Would you please clarify how you solved this?

Thank you very much
//Add this to "OnDomLoad" event