How to base a Contributor List custom attribute on a role based user list value set?
RTC 5.0.2.
I have a use case where I want to be able to add 0-n contributors with a given role to a contributor list.
Here's the fuller picture:
Consider a work item representing a document such as a technical design. The governance process requires it to be reviewed by various people with particular roles, the numbers of reviewers depending on the nature and complexity of the design.
When the governance board sits, the plan shows the list of work items in the 'ready for review' state, and the board decides who the reviewers will be. We want to pick them from lists of users with particular roles, and have them added as reviewers upon saving the work item. There will also be a boolean 'add reviewers' attribute to drive a follow-up action I'll need to write to add the approvals from the contributor lists.
Is there a way to add to a contributor list by selecting from a role-based user list value set? Or another way to achieve the same end?
|
2 answers
Cliff, Good afternoon - I hope you are well. These may not answer your specific question but may give you some options to try: 1. Creating, customizing, and deleting approval records programmatically with Rational Team Concert https://jazz.net/library/article/1118 2. Consider Value Sets: Role Based Value Set: Role Based User List provides all users in a project or team area with a specific role. Role Based User ListYou can use this customization with an attribute of type Contributor in order to limit the choice of users. Only users which have the specified roles within the team can be assigned to the attribute:
3. Data Source Value Set Providers (not sure how these would link back to "Contributor List?) https://jazz.net/wiki/bin/view/Main/DataSourceValueSetProviders Comments
Cliff Gardiner
commented Sep 26 '17, 4:27 a.m.
Thanks Matt, and we never did have that chat ... I'll text you on Friday and we'll talk if you're free.
I have another Java process that adds Approval records so I'm comfortable with that, and the role based user list value set is what I'm trying to use, without luck so far. The data source value set provider might work though if I can work up a REST query to return the members of a team that have a specific role. I suspect it will be unacceptably slow, but I'll give it a try. Let me know if you have any tips about the REST query!
Matt Muller
commented Sep 26 '17, 4:46 a.m.
Sure would be great to catch up.. REST API Everything you should ever need! (maybe)
Cliff Gardiner
commented Sep 26 '17, 9:40 a.m.
Actually Matt, while this was a nice idea when I think it through some more it can't work. Whether I can get some useful XML from RTC on the fly or not, this tells me that JavaScript cannot return Contributor objects, and that, as far as I can tell, is what is needed to populate a contributor list: https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript
So I'm still up the same gum tree. And still open to suggestions!
I'm sitting up in the tree with you.. It's a difficult one but I'm sure together we could get something sorted. You know what you have to do! #bringmattback Can you config a dependent enumeration? |
Ralph Schoon (63.5k●3●36●46)
| answered Sep 26 '17, 10:25 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER You can use Java, I think. See https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ Comments
Cliff Gardiner
commented Sep 27 '17, 3:01 a.m.
Thanks Ralph, in fact that's one of the many browser tabs I have open while looking into this. Perhaps I didn't look closely enough - I'll give it closer scrutiny before updating this thread.
Ralph Schoon
commented Sep 27 '17, 5:44 a.m.
| edited Sep 27 '17, 5:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The sample role based users in process area value set provider example see section Example Implementations: attributeType the image.
Cliff Gardiner
commented Sep 27 '17, 6:09 a.m.
Hi Ralph, I read through the workshop material again and I understand the role-based user list but the central problem is that a work item attribute of type 'Contributor list' cannot be configured to use a Value Set. The only non-greyed-out option is Calculated Value, which means JavaScript and that cannot return Contributors.
I haven't been able to find a way around this. Maybe there isn't one.
Ralph Schoon
commented Sep 27 '17, 6:15 a.m.
| edited Sep 27 '17, 6:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am pretty sure that my examples worked when I created them.
I think I remember the JavaScript stuff does not work for list attributes. Reason being, they don't macht list attribute types.
You can only make the Java examples work by defining the return type as a list attribute type. Read the section I mentioned carefully.
Cliff Gardiner
commented Sep 28 '17, 5:48 a.m.
Thanks Ralph, but I still don't see how this will help when an attribute type of Contributor List cannot be configured to use a Value Set. This seems to be the fundamental problem.
Ralph Schoon
commented Sep 28 '17, 7:45 a.m.
| edited Sep 28 '17, 8:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
No, the fundamental problem here is:
- To assume you could specify a JavaScript based value set provider of type contributorList, which you can't
- based on this incorrect assumption jump to the conclusion that it is impossible to have a contributorList value set provider at all, which you can based on Java which is actually explained in my blog and there is actually also an example
showing 5 of 6
show 1 more comments
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.