It's all about the answers!

Ask a question

Server-Side Advisor execution superceded


Ryan McFadden (194) | asked May 14 '18, 5:42 p.m.

I am using the RTC 6.0.3 server-sdk. 

I have a Server-Side Advisor that prevents a parent-child relationship, between two work items, from being established. 

In my testing, I noticed that I can get the link to be established in spite of my Advisor. 

The following steps seem to interrupt the operation of my Advisor:

In the Select Work Items dialog box where you can select an existing work item, there is a hyperlink just above the OK and Cancel buttons.  Click this link:  Create Linked <INSERT WORK ITEM NAME HERE>

If you select this to create a linked Work Item, it will open up a New Work Item form for what ever type of Work Item was selected.  If the user fills out this form and saves the work item the link is established. 

Now go back to the original Work Item and update any field.  The advisor now prevents the save operation because there is a link that is not permitted by the Advisor. 

Is there a way to prevent this link from being established?

Do I need to create an advisor for the Create Linked Work Item operation and if so what is the Extension Point?


Comments
Ryan McFadden commented May 15 '18, 9:20 p.m.

I was able to create logic in my advisor to prevent any kind of links that are unwanted so at least in my project this defect is not impacting us because the improperly linked work items are not able to be created. 

Accepted answer


permanent link
Ralph Schoon (54.9k23642) | answered May 15 '18, 2:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 I would consider this a defect. There are link operations that are not triggering the operational behavior, but that are not parent change, that are OSLC links.

Ryan McFadden selected this answer as the correct answer

Comments
Ryan McFadden commented May 15 '18, 9:23 p.m.

As stated above in my comment, I was able to safe-guard against this defect by not allowing improperly linked work items from being created and thus preventing this faulty behavior from impacting my project.

I will leave it to you to follow up with this defect and get the fix into a future release.


Ralph Schoon commented May 17 '18, 3:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi Ryan,

If the UI provides the capability to create links and you are able to prevent the save with a pre condition, then that is as designed.

If you want/expect a different behavior or think something is wrong, you can create defects and enhancement requests. A forum entry is not considered a defect or enhancement request and forum members are not ER/PMR proxies.

One other answer



permanent link
Ryan McFadden (194) | answered May 14, 1:20 p.m.

I was not able to use the advisor to prevent the link from being established.  My advisor only prevents a subsequent save operation from completing now that the link was able to be established.  


For example, if I have a work Item of TASK that can only be a child to a USER STORY work item.  If I have another DEFECT work item that I am editing and I set the TASK as a child to my DEFECT.  If there is nothing in my advisor  to block the save of the DEFECT there is no Save operation being executed on the TASK so the save completes successfully. 

Now the next time the TASK is updated and a save operation is attempted, the Advisor prevents the save because now there is Defect linked as a Parent and the only acceptable parent type is USER STORY.  The user will have to remove the errant link type before the TASK is able to be updated.  

The point is from the Source, the pre-condition is able to prevent the undesired link from being established.  It is on the destination record that the link is able to be established without a save operation on the destination record.  

This seems to be errant behavior.  


Comments
Ralph Schoon commented May 15, 1:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As far as I can tell, the operation data in a work item save pre-condition provides several methods to access link information for before and after the save. This should allow to detect the issue before the save.


If both ends are changed, for each a pre-condition should be called.

Note: This only works for Work Item links such as parent/child. CLM links between applications and repositories can not be protected this way.  

Your answer


Register or to post your answer.