I want to assign to and resolve by name, which should be the same when we submit the incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2024 01:01 AM
I want to assign to and resolve by name, which should be the same when we submit the incident
when it's a different name it should not take it and throws a message that a different name should not be there
Although perform all these things in business logic not in the UI Scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2024 04:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2024 11:12 PM
Yesss can you help on that ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2024 08:18 PM
Hi @aggarwaltan ,
while submitting the incident why you want to set resolved by, normally it should populate while resolving the in incident.
you can write before br and condition that if the assigned to is same as resolve by then in action section check the checkbox abort action and add your message in message attribute which you want to display.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 07:56 AM
Hi @aggarwaltan
Solution using a Business Rule
Follow these steps:
1. Navigate to Business Rules:
Go to System Definition > Business Rules and click New.
2. Configure the Business Rule:
Name: Enforce Assigned to and Resolved by
Table: Incident
When to run: Before Insert and Update
Condition: (No specific condition; applies to all incidents)
Advanced: Check the "Advanced" box..
3. Script:
- Add the following script under the"Advanced" tab:
(function executeRule(current, previous /*null when async*/) {
// Ensure both 'Assigned to' and 'Resolved by' are populated
if (current.assigned_to && current.resolved_by) {
if (current.assigned_to.toString() !== current.resolved_by.toString()) {
gs.addErrorMessage("Assigned to and Resolved by must be the same person.");
current.setAbortAction(true); // Prevent the incident from being submitted
}
}
})(current, previous);
4. Save and activate.
If this answer was helpful, kindly mark it as helpful so others can benefit too!
Thank you,
Ananya.