Business Rule script that will check if all problem task is close
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 03:20 AM
Hi Everyone,
is there a way for me to check if all problem task associated to a Problem is already close then once close it will change the problem state.
It is easy if I can do it via Workflow but the problem task is not consistent in number.
I think you can create it in a business rule but don't know how.
I tried to run this in the backgroud script to see if its working but to no avail.
var gr = new GlideRecord('problem_task');
gr.addQuery('problem', 'IN', 'PRB0100145');
gr.addquery('u_problem_task_state', '1');
gr.query();
while (gr.next()) {
gs.print(gr.number);
}
need your help please.
- Labels:
-
Scripting and Coding
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 04:07 AM
Place one if loop like,
if(!current.assignment_group.nil()) or (if(current.assignment_group!='')
{
write yor conditions
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 04:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2017 09:11 AM
Hi mark141230,
Did you able to have a look at my last response?
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 11:32 PM
Hi Everyone,
I already applied each script and the output is almost the same.
The problem task is checked if close but the problem is if I have more than 1 problem task if I close just only one task it will automatically close the ticket.