Map Current and Previous values to the CMDB fields through Business rule

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 03:45 AM
Hi Everyone,
Need a help on the below issue,
There is a requirement, where we are getting the user detail from the source, transform field mapping is defined to map the user detail from source to "assigned to" field in the target table[cmdb_ci], but we need that user detail on the other custom field [we should not change the field mapping ]so instead of changing the target field in the transform map, we have decided to let the data map to "assigned to" field first, then we have to transfer that "assigned to"field value to other custom field and have to keep the old value in the "assigned to" field.
For this I'm writing a Business rule [when to run before update],but it is not working as expected.
Initially it is updating custom field with new value which is coming from source, and again custom field is getting updated with old "assigned to" value.
expected : if target assigned to = 'xyz', source data = 'abc' ,after BR triggers , custom field = 'abc', assigned to = 'xyz',
behaving :
if target assigned to = 'xyz', source data = 'abc' ,after BR triggers ,custom field = 'abc', again custom field = 'xyz', and assigned to = 'xyz'
Thanks in advance,
Chaithanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 05:03 AM
How are you triggering that BR? On change of 'assigned_to'? Then you are getting into a loop.
Why aren't you changing the mapping? You are putting customization in place that is creating technical debt which can have a huge impact (it will trigger way too many changes on the record). Just update the mapping. It makes no sense to not do that, so if go back to the person telling you 'you shouldn't do that' and tell them to let you do your job.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 05:26 AM - edited 09-18-2024 05:28 AM
Hi @Mark Manders
Thanks for the reply,
We are getting data from OOB plugin and that field mapping is also OOB and the defined "assigned to"field is OOB field, so that we can't change the mapping, if we override that then integration will not work as expected.
The source data is not giving the actual assigned to user detail, it is giving logged in user detail, so that we are storing that value in other custom field.
The BR is triggering when ever the record is inserted/updated into computer table from the source.
few records are getting updated correctly, but for few it is behaving as above.
Thanks,
Chaithanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2024 01:16 AM
If OOB isn't providing you what you need, you need to change OOB. "We can't change the mapping because it's OOB" doesn't make any sense if it's not doing what it is supposed to do.
A change of field mapping doesn't make the integration not work. The transform map handles the data after it has been imported (so the integration part is already done). Just change the mapping.
And if you can't get that clear with who ever is telling you you can't change the OOB mapping, tell them they shouldn't be working with things they don't understand.
The issue with the BR you are seeing is just that it is triggering too often. Your BR shouldn't be necessary if you just update your system to work to your requirements.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark