- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2016 12:37 PM
Hi All,
I'm new to world of service now and was looking for assistance on a business rule.
I'd like to make is to a priority 2 incident is raised to priority 1 eight hours after being raised/opened as a p2. I've tried many different tests within business rules but nothing seems to work (We are on Fuji)
When to run
When: Before
Order: 100
Filter Conditions
Active is true
Priority is 2 - High
Duration is Days 0 Hours 8
Actions
Urgency to 1 - High
Impact to 1 - High
Priority to 1 - Critical
The closest out of the box business rule is Incident State Active on Assignment which I've been playing around with a bit as well. Can someone offer some advice?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2016 01:42 PM
Change of approach. I built the list filter to get it the way I wanted, then copied the query and used it in the addEncodedQuery() method like this.
var inc = new GlideRecord('incident');
inc.addEncodedQuery('active=true^priority=2^sys_created_on<javascript:gs.hoursAgoStart(8)');
inc.query();
gs.log(inc.getRowCount() + ' records found');
while (inc.next()) {
inc.priority = 1;
inc.update();
}
I did not update your scheduled job or records.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2016 12:52 PM
Hi David,
It could be that your new business rule is being overridden by data lookup rules. If priority is based on urgency & impact, and neither of those have changed, then changing the priority manually is not going to have an impact.
Check to see if this is a factor.
Data Lookup and Record Matching Support - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2016 01:02 PM
Hi Chuck,
Thanks for the advice but I don't think data lookup rules are blocking it as the Incident State Active on Assignment business rule works perfectly well for example see below.
Incident State Active on Assignment
When to run
Incident Sate is new or active
Assigned to is not empty
Actions
Incident State to Active
Priority to 1 - Critical
Test ticket created and assigned to a user

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2016 01:08 PM
Well that rules that out. The only other way I can think is to check the Advanced checkbox and use the Condition field on the Advanced table instead of the condition builder.
Something like:
current.sys_created_on >= gs.hoursAgo(8) && current.active && current.priority == 2
Then your script becomes simple:
current.prioirty = 1;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2016 01:23 PM
Hi Chuck,
Thanks for the advise, I have to admit I'm not very skilled at JavaScript (Currently doing to code academy course) but I believe I've placed it all in correctly. All I can do now is wait 8 hours and hope for the best!
Here are some screenshots of the business rule, if you see anything wrong just let me know.
Top Part of Rule
Code Part