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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

change request affected objects

NG_10595539
6-Contributor

change request affected objects

Version: Windchill 12.0

 

Use Case: While editing the Change Request adding new affected objects under select affected object, suppose there is 2 affected objects already present for the change request we are adding 1 new object.


Description:

The problem faced is while fetching these affected object through code using ChangeHelper2.service.getChangeables(changeRequest) inside editFormProcessor only able to get the 2 affected object, I need to check all the affected objects(existing + newly added) as well as just newly added object.

ACCEPTED SOLUTION

Accepted Solutions

@NG_10595539 ,

You can't expect ChangeHelper2.service.getChangeables(changeRequest) to get the newly added objects because at this point in the process they are not added yet.  They are not linked to the CR at this point and therefore there is no link in the dB that getChangables() method can query.

 

BTW, can you tell us exactly what you are intending to check when checking the newly added objects?

View solution in original post

8 REPLIES 8

@NG_10595539 ,

You can't expect ChangeHelper2.service.getChangeables(changeRequest) to get the newly added objects because at this point in the process they are not added yet.  They are not linked to the CR at this point and therefore there is no link in the dB that getChangables() method can query.

 

BTW, can you tell us exactly what you are intending to check when checking the newly added objects?

NG_10595539
6-Contributor
(To:d_graham)

hi @d_graham ,
need to check newly added WTDocument for the affected object.

What does that mean?

WTDocuments don't have affected data.

NG_10595539
6-Contributor
(To:d_graham)

While editing change Request we can select WTDocument as affected object, need to get this newly added WTDocument.

 

Yes, that was clear, but what you have not answered is why you need to get the WTDocument?

Once you get it then what?  All of this info should be in the "Use Case" portion of your original post.

NG_10595539
6-Contributor
(To:d_graham)

need to compare one attribute value of newly added WTDocument  and that of change request

And once compared do you do anything with the comparison.  Or regardless of the comparison you continue.

@NG_10595539 , can't you just spell out EXACTLY what you are doing without the need to keep asking questions.

 

For example, if WTDoc attribute Compare 1 is X and CR attribute Compare 2 is Y do what?

or

if WTDoc attribute Compare_1 is X and CR attribute Compare_2 is NOT Y do what?

 

This is what the Use Case if for.  To clearly state, well, the use case.

NG_10595539
6-Contributor
(To:d_graham)

1.  WTDoc attribute  X   =  CR attribute Y    -> set fromResult as failure

 

2.  WTDoc attribute X   !=  CR attribute Y   ->set fromResult as success

Announcements

Top Tags