How to extend the precondtion that validate the owner doesn't belong to team area before save workitem on RTC
![]()
chen fengmiao (70●3●29●32)
| asked Mar 21 '14, 9:11 a.m.
edited Mar 21 '14, 10:51 a.m. by Ralph Schoon (62.3k●3●36●43)
I hope to extend the save workitem procondition that validate the owner doesn't belong to team area. if the owner does not belong to the team area,the workitem don't save success.
We use RTC4.0.6 version. Where can I find this API? Has any example like it? please help me ! Thank you very much! |
Accepted answer
![]()
Ralph Schoon (62.3k●3●36●43)
| answered Mar 21 '14, 9:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Chen, you will have to write that yourself.
There are various examples for this kind of API on https://rsjazz.wordpress.com/ most of the posts there are based on examples on Jazz.net https://rsjazz.wordpress.com/interesting-links/ for more. For development you should look into https://jazz.net/library/article/1000. Currently that works only for RTC 4.0. It is in the progress of being updated to make it usable for other RTC versions. I am not sure however, when we will get it on the web site. https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ contains common API you would be interested in. Most examples on the blog are follow up actions. The difference between an advisor and a follow up action is the extension point as described in https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/ Good luck. chen fengmiao selected this answer as the correct answer
Comments Thank you Ralph,I will try to read the examples on rsjazz.wordpress.com .
Hi,Ralph. I don' t find the API: which team area does the owner belong to on workitem?
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Chen, the team area the work item belongs to can be found using the category.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Not sure right now, if using permissions would be easier. If the user is not member of the team area, what role does he have? Prevent "Everyone" from saving the work item?
Hi Ralph,on fact I want to make these warning message to the error message ,prevent the user save the work item if appear this error message , I have to extend the procondition?
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This has nothing to do with a precondition. I am not sure how this is implemented. It might be a validator. I think it is built in and not configurable. See https://jazz.net/wiki/bin/view/Main/AttributeCustomization to understand validators. JavaScript however would not allow you to do this either, due to its API limitations. An option would possibly be a java based validator as described in https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ . This would work for the Web UI and the Eclipse UI. An advisor/precondition would only prevent the save and not show an error.
Thank you for Ralph's answer . you mention the suggest "Permissions would also just prevent the save." it see https://jazz.net/library/article/291 ? ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Have you opened the link? It describes how permissions work.
Hi Ralph, I can open the link. I readed this article ,but I don't what can I ? I am not aware of any way to achieve the change you desire - making the warning an error in the display. There are only the following ways I am aware:
What you see above is configured this way:
and shows in the presentation editor like this:
And I am not aware you can change this to error.
showing 5 of 10
show 5 more comments
|