Changing priority is restricted by using Before Business Rule

NBK
Tera Contributor

I don't want to allow the user to modify the Incident Priority once it is created.

So, restrict the user in changing the Incident Priority by using Before Business Rule (even the condition should be in scripting).

2 REPLIES 2

Brian Lancaster
Tera Sage

Is there a question here? Also out of the box priority is read only on incidents because it can only be modified by updating impact and urgency. Is this now how you have it setup? Also what do you mean by users? Are you taking requestors or fulfiller (itil users)?

 

I would also suggest you take a look at this Blog Post.

Deepak Shaerma
Kilo Sage

Hi @NBK 

Priority field is by default set as read only. 

If you want the user to not change the priority.  Just simply make the fields read only. 

Create a UI policy and under ui policy actions. Make Impact, Urgency read only true. 

 

But if you want it by business rule (i recommend to go with ui policy-no code approach). 

Before/Update

if (previous) {
            // Check if Urgency or Impact has changed and revert if so
            if (current.urgency.changes()) {
                current.urgency = previous.urgency;
                gs.addErrorMessage("Urgency cannot be changed.");
            }
            if (current.impact.changes()) {
                current.impact = previous.impact;
                gs.addErrorMessage("Impact cannot be changed.");
            }
        }

 

Please mark it helpful and accepted if this helps you in somehow. This will help both community and me.

 

Thanks and Regards 

Deepak Sharma