Help creating assignment rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2024 12:03 PM
On the incident form I have 3 reference fields. (Only for the first 2: the first being the parent of the second).
I need to define an assignment rule that when an incident is created, the assignment group will be automatically populated with:
- the group associated with the first field if the second and third fields are empty, the first is not empty and is the last filled in
- the group associated with the second field if the first 2 fields are not empty, the third field is empty, and the last filled field is field number 2
- the group associated with the third field if all are filled and the third is the last filled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2024 12:11 PM
Hi @B_pppppp,
Not really sure what you are trying to do, but seems like you have a few conditions to check.
If so, you can create multiple Assignment Rules in an order by using the 'Execution Order' field.
And you can use the 'Conditions' field instead of writing a complex script.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2024 12:15 PM
It must be done in one or two client scripts...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2024 12:23 PM
No worries, can you elaborate on the conditions?
- Only for the first 2: the first being the parent of the second
- Question - what do you mean by 'only the first 2'?
- the group associated with the first field if the second and third fields are empty, the first is not empty and is the last filled in
- Question - what do you mean by 'first is not empty and is the last filled in'? Do you have to take into account the order in which the fields are populated? If only the first field is populated, why does the order matter?
- the group associated with the second field if the first 2 fields are not empty, the third field is empty, and the last filled field is field number 2
- Question - what would happen if field 1 was populated the last?
- the group associated with the third field if all are filled and the third is the last filled
- Question - again, what would happen if field 1 or 2 is populated the last?
You initially asked for an 'Assignment Rule' but if you need to take account of the 'order' at which the fields are populated, you would need to use a Client Script instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2024 12:32 PM
The first two fields are referenced to cmdb_ci_service. Field 1 is the parent of field 2.
The last field filled in takes precedence over the previous field.
So, taking into account that we fill in the three fields in turn, in the first case only the first field needs to be filled in, and only this one.
We cannot fill in the second field without filling in the first one. So in the second case, the first two must be filled in while the third field remains empty. Then the assignment group is the one associated with the selection in field 2.
I am sorry for the unclear requirement. It should be done using a client script. Feel free to ask for more details if I'm not explaining good enough