Once sub task is closed then parent task state should change to work in progress

Talari Balateja
Tera Expert

Hi,

 

I'm looking into requirement. once the subtask is closed then parent task state should chnage to workinprogress.

 

Please help me to complete this task.

 

Parent: sn_si_incident

child: sn_si_task

 

 

Regards,

Sanju.

13 REPLIES 13

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

You can write a BR on the sub task table with condition -> state changes to closed.

 


	if (current.state == 3) { // 3 is the closed value for sub task
		var parentTask = subTask.parent.getRefRecord();
		parentTask.state = 2; // 2 is the wip state value for parent
		parentTask.update();
	}

 

 

-Anurag

Hi @Anurag Tripathi 

 

I tried same code but it's not working.

Can you show a screenshot of your BR.

-Anurag

Try this, made a modification. @Talari Balateja  Try this please

 

	if (current.state == 3) { // 3 is the closed value for sub task
		var parentTask = current.parent.getRefRecord();
		parentTask.state = 2; // 2 is the wip state value for parent
		parentTask.update();
	}

 

 

-Anurag