If state of rm_scrum_task state is complete and worknote is added should update in story

Deepika43
Tera Contributor

In rm_scrum_task  if any worknote added, that worknote should populate in story(rm_story)  as a worknote  when rm_scrum_task state is complete.

 

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Deepika43 Create a onBefore Update business rule on rm_scrum_task table as follows.

Screenshot 2023-09-27 at 8.11.12 PM.png

 

Screenshot 2023-09-27 at 8.14.49 PM.png

Here is the script.

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	var lastWorknote = current.work_notes.getJournalEntry(1);
	var storyRec = current.parent.getRefRecord();
	storyRec.work_notes=lastWorknote+'';
	storyRec.update();

})(current, previous);

Hope this helps.

View solution in original post

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@Deepika43 Create a onBefore Update business rule on rm_scrum_task table as follows.

Screenshot 2023-09-27 at 8.11.12 PM.png

 

Screenshot 2023-09-27 at 8.14.49 PM.png

Here is the script.

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	var lastWorknote = current.work_notes.getJournalEntry(1);
	var storyRec = current.parent.getRefRecord();
	storyRec.work_notes=lastWorknote+'';
	storyRec.update();

})(current, previous);

Hope this helps.