- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 05:31 AM
Hello,
Most of our incidents are opened using SolarWinds integration. We are assigning CI to each Incident and we want to auto-populate CIs Company and Contract fields in the Incident form. I am thinking about Business rule but is it the best way to do it? And if it is do I need to use script to populate this fields?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 05:38 AM
If the incidents are being opened automatically via the integration then the best option is a before insert business rule. It should be a fairly simple rule, you just need to change the company and contract to a value that you can dot-walk to via the CI field.
current.company = current.cmdb_ci.company;
current.contract = current.cmdb_ci.ast_contract;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 05:38 AM
If the incidents are being opened automatically via the integration then the best option is a before insert business rule. It should be a fairly simple rule, you just need to change the company and contract to a value that you can dot-walk to via the CI field.
current.company = current.cmdb_ci.company;
current.contract = current.cmdb_ci.ast_contract;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 06:13 AM
We are still testing now(not in production) and at the moment the relationship between CIs and Contract is in contract_rel_ci table.
Is it better to use ast_contract reference for each CI to associate it with Contract? We have around 200 different contracts for about 50 clients(Companies) and we want to have CI to Contract and Company association.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 06:55 AM
Do you mean the cmdb_rel_ci table? This table is more for defining dependencies between CI's. If your data is structured Company > Contract > CI then you can just have a reference field linking the CI to the ast_contract table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 07:05 AM