Incident Progress bar is not working correctly.

Spartan_snow
Tera Expert

Hello all,

 

I have a requirement that when an incident 'Assignment Group' is changed, the status should be 'Active', so I wrote a business rule Before Update , and the status changes based on the Assignment group, but the progress bar displays incorrectly.

When I change status manually it's working correctly.

You can see the my BR changes.

 

(function executeRule(current, previous /*null when async*/ ) {
    if (current.assignment_group != previous.assignment_group && current.state != '6') {
        current.state = 2;
        //current.setWorkflow(false);

    }
})(current, previous);

MayurGavhane_3-1727342452200.png

 

 

 

 

1 ACCEPTED SOLUTION

Hi  , @Brad Bowman   Thanks for the quick reply,

 

The 'Status' field is named 'state', and the 'Active' option has a value of 2, as shown in the attached image.

And there is another field called 'Incident State', and the progress bar is based on this rather than the status field, so I made the modifications and they worked.

 

 current.state = 2;
 current.incident_state = 2;
 
Regards,
Mayur Gavhane.

View solution in original post

2 REPLIES 2

Brad Bowman
Kilo Patron
Kilo Patron

Take a look at the Process Flow record for Active on the Incident table.  Is the condition only State is In Progress (or whatever you have assigned to 2) or is there something else? Are you not showing the State field on your incident form in favor of the process flow formatter?  Have you confirmed the State on the record shown is actually In Progress or whatever 2 is?

Hi  , @Brad Bowman   Thanks for the quick reply,

 

The 'Status' field is named 'state', and the 'Active' option has a value of 2, as shown in the attached image.

And there is another field called 'Incident State', and the progress bar is based on this rather than the status field, so I made the modifications and they worked.

 

 current.state = 2;
 current.incident_state = 2;
 
Regards,
Mayur Gavhane.