[closed] RTC: visibility does not work when setting Category with Java API
![]()
I have written a server-side extension that sets automatically the Category (i.e. the "Filed Against" attribute) on a work item.
The attribute is actually set with the correct value, but the work item visibility is not impacted. I mean, every user in the project area can see the work item, even if he is not a member of the Team Area that is associated to the Category. But, if I change manually the Category to a different value, and then back to the original value, then the visibility works as expected. Is anybody aware of this strange behaviour? And are there any solutions/workarounds? |
The question has been closed for the following reason: "I found myself the answer" by lumar Jun 17 '18, 7:55 a.m.
One answer
![]()
Sam, I found the cause of this behaviour.
I was setting the Category in a Precondition (operation advisor). I know that modifiying a work item in an advisor is not supported and against any best practice, but I was taking my risks, because the Category was a required attribute in the target state of the transition, so I needed to set it before the out-of-the-box advisor that checks the required attributes was run. Now I have the Filed Against attribute an optional (not required) attribute in that state, so I've been able to "move" the setting of the Category in a Follow-up action. When the Category is set in a participant, the work item visibility works as expected. So, it seems that advisors are not able to set the visibility on work items, whereas participants are. |
Comments
typically that means the api approach you used didn't quite work correctly..
can you show us what you were doing?