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

RTC - Best Way to implement the dependent scenario

Hi

I have the following scenario. I would like to know what is the best way to implement this in RTC 4.0.3

1) For the Defect Work Item Type I have a mandatory field called "Defect Category" which is a enumeration and has two values
   
         Raised by Project and
            Raised by Client
2)     If the option selected is  "Raised by Project" then the appropriate values should be selected in the Owned By field

3)    If the option selected is  "Raised by Client" then the appropriate values should be selected in the Owned By field

In the attribute customization the Dependent Enumeration Value Set takes only Enumeration.

Please let me know.

Regards
Niranjan V

0 votes

Comments

What are the rules to choose the Owner of the work item?

can i confirm if based on Defect Category
a.  the Owned By field will have ONE appropriate value selected
or
b.  the Owned By field will show appropriate values that would be selectable

also, since we are looking at Owned By which is a built-in attribute, any attribute customization applied to it would reflect in all the work item types and extra caution might be required here....


Accepted answer

Permanent link
If I understand the problem correctly, you want to restrict the list of users shown in the owner selection drop down.
Restricting the list of Owners is only done based on the Team Area the work item is filed against. 
I would suggest creating a category called "Raised by Client" and associate this with the team of people working on the client defect. This way the set of users available to select as owners will be restricted.
V Niranjan selected this answer as the correct answer

3 votes


3 other answers

Permanent link
Dependent enumerations only work on enumerations. So they are out of the picture.
Make clearer what "Selected" means. The dependent enumeration only limits the available choices for enumeration values, it does not set a value on its own and it does not necessarily limit to one choice either, if I recall correctly.

I assume the choice is not just between two users, so there must be some logic e.g. role based. We need to better understand what that logic is.

Without additional information, there are basically these possible solutions I see.

1. A custom work item save Advisor that blocks on a wrong choice. Con: it would not limit the choice. Pro: easy deployment and works for all clients.
2. A Java based Attribute customization could be possible, but Dinesh's concern is correct, It can detect the work item type and provide a value set for one type, but it would have to be able to work for all work item types. I am also concerned about its capability to work with the special user picker that is built in. Basically this would have to be tried. Pro: limited selection. Con: works only for Web UI and Eclipse UI. Required to be deployed on Eclipse and the server.

Java Script based attribute customization is probably out of the picture due to the limitations of JavaScript with respect to accessing the users/contributors.

Based on the business logic there might be other possible approaches, however I would probably go for the 1st approach, as it is the least invasive one.




0 votes


Permanent link

Hi All

By Selected I mean the drop down must show the list of appropriate values and one is selected.

So If I select the option Raised by Project then the appropriate users with a specific role should be listed and I can select one of them.

Dependent enumeration does not work here.

Regards
Niranjan V

0 votes

Comments

Hi,

I am not sure if the role based user list attribute customization can be called in java-script. Probably not. In this case you would have to create your own "custom role based user list" attribute customization in Java. You would have to wrap the existing role based user list into Java code that provides the desired roles for the type you want and all users, for other types (see Dinesh's comment for why). See https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ for examples and some discussion around the API.

Another approach would be a validator (Java) that blocks save and provides the knowledge who to select) .

Arydha's approach is what RTC provides out of the box, but not role based, unfortunately.


Permanent link
 Hey Niranjan
This is an elaborate article on dependencies and how to setup, maybe this will help
https://jazz.net/library/article/821
Also an example
Hope this helps
Vaibhav

0 votes

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,024

Question asked: Feb 27 '14, 4:08 a.m.

Question was seen: 5,326 times

Last updated: Feb 28 '14, 5:30 a.m.

Confirmation Cancel Confirm