How to assign using scripts in assignment rules for vulnerability response?

Kruthik M Shiva
Tera Contributor

Hi all,
I have a requirement where if configuration item->IT application owner is not empty it should be assigned to IT application owner for this i cannot assign using user group or user group field , the only way is to through scripts what should be the script for assigning to IT application owner using script?

Thanks in advance,

1 ACCEPTED SOLUTION

Muralidharan BS
Mega Sage
Mega Sage

HI Kruthik,

You can try this in your lower instance and proceed. 

1. Go to Vulnerability response > assignment rules

2. Open the rule you want to amend or create new

3. Add the condition to filter the vulnerability. 

4. Choose to assign using "script"

Paste the below script and try it. 

Check the field name managed_by_group and managed_by are oob fields to assign ownership if this is not the field you are using, change the field value correctly. 

current.assignment_group = current.cmdb_ci.managed_by_group // assignment group
current.assigned_to = current.cmdb_ci.managed_by // assigned to person

 

Thanks

 

 

 

 

 

View solution in original post

8 REPLIES 8

Hi,
Thank you for this insightful answer Chris. When creating multiple scripted assignment rules I have found that regardless of the script content in the first assignment rule (lowest order) it does not progress and evaluate the next ones. Is this behaviour intended? This will in turn lead to having to consolidate all scripts into one large script which would make it unclear of what leads to the final assignment result.

Community Alums
Not applicable

Hi @theodorholme ,
Ensure that the order follows the sequence from ascending to descending. Additionally, the conditions should be precise, as assignment rules as per order that fall under the conditions filter..

Hi Murali, Can you any idea regarding Configuration Compliance Relating to SeCops...I want to know some information relating this...

 

Thanks in Advance

Hi Murali01,

 

Do you also have script, where the default group of the Application Manager will be auto assigned to the application? thank you