Server-Side Advisor execution superceded
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?
Accepted answer
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.
Comments
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.
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
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.
Comments
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.
Comments
Ryan McFadden
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.