Copying additional comments from SCTASK to RITM and RITM to all SCTASKs

kentgott
Kilo Explorer

I have a project to add additional comments from a SCTASK to the RITM and also add the additional comments from a RITM to all the SCTASKs under that RITM. I'm testing this on my personal dev instance.

I have created these two business rules:

Add Comments from RITM to all SCTASKs

Add Comments from SCTASK to RITM

I have tested them individually and they work as far as pushing the additional comment from the RITM to all the SCTASKs and also from the SCTASK to the RITM. Originally I only had one of them active during my testing. But when I activated both of them, then it adds two comments to the RITM or SCTASK which I don't want to happen.

I'm hoping someone knows what I need to do so the business rules won't execute so the RITM or SCTASK gets two comments. I only want the comment added one time when pushing it to the other item. I have tried multiple codes but still don't have it working.

When I add an additional comment to the SCTASK, I want it added to the SCTASK and to the RITM only once. When I add an additional comment to the RITM, I want it added to the RITM and to all the SCTASKs under that RITM only once in all of them. Apparently the business rules execute a couple times which has caused them to add the comment twice to the RITM or SCTASK. I still haven't figured out how to only add the comment once. I'm really hoping someone has an answer for this.

15 REPLIES 15

Hi Rajat,

Yes you are right, if the comment is added on task1 then it will cascade comments to RITM but not the task2.

And there is no need to cascade the comments to task2 from task1 as both are different task and different  assignment group will be working on it.

Regards,

Snehal

Rajat15
Tera Contributor

Hi Snehal,

 

The thing is that when we update the comment in task1, it will update the RITM comments. When RITM got updated the same comment got updated in task2 because of new update in RITM. Actually that is causing in the issue.

Regards

Rajat

Rajat15
Tera Contributor

i guess both the business rules are getting stuck in loop

Hi Rajat,

I had not experienced this issue. 

In order to restrict the looping, what I had done was added the prefix text to the comments while cascading.

eg: Comments from RITM: <ritm comments>

And add check condition that cascade the comments only if the comments does not hav prefix text.

Hope this helps.

Regards,

Snehal 

Rajat15
Tera Contributor

Hi Snehal,

 

Can you provide me the code for Cascading the prefix and then checking it.

Regards

Rajat