Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?

0 votes



2 answers

Permanent link

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 List

You 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

0 votes

Comments

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!

Sure would be great to catch up..  REST API Everything you should ever need!  (maybe)

https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#workitem

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?

https://jazz.net/forum/questions/92109/can-i-leverage-a-dependent-enumeration-to-filter-values-from-a-contributor-list


Permanent link

 You can use Java, I think. See https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/

0 votes

Comments

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.

The sample role based users in process area value set provider example see section Example Implementations: attributeType the image.

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.

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.

 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.

 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

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,016

Question asked: Sep 25 '17, 5:46 a.m.

Question was seen: 2,837 times

Last updated: Sep 28 '17, 8:00 a.m.

Confirmation Cancel Confirm