cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

How to create a WTChangeRequest2 with Affected Objects and Affected End Items using API

AA_9841156
7-Bedrock

How to create a WTChangeRequest2 with Affected Objects and Affected End Items using API

As per the original post

 

Hi @Manoj_Dokku4 , @HelesicPetr 

 

how can we get Affected End Item of Affected Objects??

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @anursingh ,

 

As implemented below API 

QueryResult usedBy = StructHelper.service.navigateUsedByToIteration(inputPart, true,
new WhereUsedConfigSpec()); in recursive call and get Parent End Item and add in affected end item table.

SubjectProduct subjectProduct = SubjectProduct.newSubjectProduct(endItemMaster, newServiceChangeRequest);

 

its working !!!

View solution in original post

7 REPLIES 7

Hi @AA_9841156 

What do you mean Affected EndItem of Affected Object?

The Affected End Item is object added to the Affected End Items Table and this is not related to the affected table. 

So if you need to get Affected End Item objects then you can get it from Change Object as request issue etc.

PetrH

Hi @HelesicPetr 

 

Actually I am creating CR through API and able to add Affected objects in Affected Objects table through code but not able to add affected end item based on objects that are affected in affected end item table so thats why i am looking API to find Affected End items of objects that are affected 

Hi @AA_9841156 

There is not an Api that could collect what end item can be affected from the affected table.

You have to write own code to find parent End Item WTPart of the affected object and this end Item you can add to the Affected End Item table. 

 

PS> check following code

NmHelperBean helperBean= ((JcaComponentParams)componentParams).getHelperBean();
NmCommandBean nmCommandBean= helperBean.getNmCommandBean();
ChangeItemQueryCommands.getAffectedEndItems(nmCommandBean);

the getAffectedEndItems collects Affected End Items from change object. 

PetrH

Hi @AA_9841156,

 

I wanted to follow up with you on your post to see if your question has been answered. 
If so, please mark the appropriate reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so that we can continue to help you. 

 

Thanks,
Anurag
 

Hi @anursingh ,

 

As implemented below API 

QueryResult usedBy = StructHelper.service.navigateUsedByToIteration(inputPart, true,
new WhereUsedConfigSpec()); in recursive call and get Parent End Item and add in affected end item table.

SubjectProduct subjectProduct = SubjectProduct.newSubjectProduct(endItemMaster, newServiceChangeRequest);

 

its working !!!

So @AA_9841156 

You have done what I wrote 😄 

PetrH

Hi @HelesicPetr 

Yes I did same .Thanks!!!!

Top Tags