Feature field change and new Feature select the Impact of the story should be same new Feature field

Arjun Reddy Yer
Mega Sage

required help @Vasantharajan N @Ankur Bawiskar @Voona Rohila @WillieW @RaghavSh

 

When Feature field change on the story and new Feature selected in the available list and then the Impact of the story is to be fill based on the new selected Feature. 

Story Impact should be based on Feature field.

I tried with Business Rule but it's not working as expected.

ArjunReddyYer_0-1766142836974.png

Business Rule:

 

ArjunReddyYer_1-1766143023165.png

ArjunReddyYer_2-1766143092084.png

			var fst = new GlideRecord('sn_safe_feature');
		fst.addQuery('sn_safe_story',current.sys_id);
		fst.query();

		while(fst.next()){
			fst.impact = current.impact;
			fst.priority = current.priority;
			fst.update();
			
		}
1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Arjun Reddy Yer 

your business rule should be before Insert & Update

Condition: Feature [Changes] AND Feature [IS NOT EMPTY]

Script:

// use correct field which refers to feature table below

current.impact = current.sn_safe_feature.impact;
current.priority = current.sn_safe_feature.priority;

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

@Ankur Bawiskar you are saying that need to mention only the below script right?

 

current.impact = current.sn_safe_feature.impact;
current.priority = current.sn_safe_feature.priority;

@Arjun Reddy Yer 

yes but use correct field which refers to feature table

Also ensure the impact and priority choices on both the tables have same choice value, then only it will work

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar  If the changes need to reflect to the associated Tasks to the Story then what the script required.

@Arjun Reddy Yer 

you can use before insert BR on task and then grab the values from story and set in task fields

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader