How to create a problem automatically when an incident is registered with P1 priority?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 09:32 AM
Hi folks,
I have a requirement where i want to register a problem ticket automatically by the system when a P1 incident is created. How can i implement it?
Any suggestions would be greatly appreciated.
Thanks
PG
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 09:55 AM
Let me know if that answers your question. It obviously needs some adjustments for your fields, but the core is there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 09:59 AM
Hey Chuck,
I think current.setWorkflow(false); might not be required here in this context. Your thoughts?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2016 10:03 AM
Oh, setWorkflow(false) is DEFINITELY needed in this case - we need to update the current incident after the problem is created. Without it. current.update() will retrigger the other business rules again if the statement is left out.
Some might argue you could build the problem in a BEFORE BR and avoid that issue, but I submit that you might have a problem created before the incident is saved and if there is an issue with the save (eg. some other BEFORE BR does a current.setAbortAction(true), then you have an orphan problem with no incident (or incorrect incident.)
Good check though.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2016 11:44 AM
Let me know if I have answered your question. If so, 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 discussion from your "inbox", use the "mark as correct" option under actions. If you are viewing it directly from the thread use the Correct Answer link (red with a star).
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2020 03:04 AM
This is creating a new problem record whenever an P1 incident is updated.