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

How to implement multi-select value attributes and fields?

Hi,

since RTC 2.0 we have been trying to implement multi-selection fields in a proper way. We basically want to do the following:

1. Work items should be marked in some way with the business unit (customer) that this work item is relevant to. It can be relevant to many customers at once.

2. In RTC 3 we tried to used the way of "small string" attribute which would use a multi selection box presentation fed with business unit enumeration values. So far so good. But the queries would display BusinessUnitEnum.literal1 .... or something like that, so this was not working for getting an overview.

3. In RTC 4 I've played with the HTTP filtered value set and a String List attribute, which seems to work nicely. One drawback is that you can click "new..." and add any string what so ever.

Can you in some way disable that "New..." button, add a validator or in some way ensure that this value is ONLY from the value set provided by HTTP XML source?

Any other comment or ideas how to solve this? Any comments appreciated!

In advance, thanks a lot :-).

1

1 vote


Accepted answer

Permanent link
I spent some time this afternoon looking for an answer (and actually hacked a way that worked, at least for the web ui) but that won't actually help you at the moment (sorry). 

The StringList picker widget has a method that answers the question (should I show the New... button?) -- and it is currently hard-coded to say "yes". I hacked that in my development environment and I got a picker that only allows Select. This hack did not provide the same functionality in the Eclipse UI (though I expect a similar one would).

I was hoping that there would be a property on the String List editor presentation (something like showNew or allowUserSupplied) that you could set to false but there does not seem to be. I have filed Enhancement Request 240267 to add this feature. Feel free to comment there and +1 it if you like.


Millard
RTC Dev Team
Morten Madsen selected this answer as the correct answer

2 votes

Comments

Thanks, I will follow that enhancement. Thanks a lot :-D!


4 other answers

Permanent link
 If you plan on removing the new feature, can you also ensure the edit feature is gone too.   If you click on edit you can essentially make a new string.  Maybe under the hood they both share the same new code, but just in case I wanted to mention it.

0 votes


Permanent link
correct, you would have to make reusable individual queries..  nice touch!

0 votes


Permanent link
Even if you change the IDs though, this will help for queries but I think you still can't use on the attribute in the dashboard work item widgets, right? I think if you want to display any work item widgets that use a query they only list attributes which are non-string or basically of type which would have a finite number of values.

Has anybody figured out a way around this?

0 votes

Comments

Query or report layout of the results is ugly, correct.. because you have a STRING with multiple comma separated values..   not a nice list

you could fix this by creating special report gadgets that know to parse this field properly (IBM should have done that), but its a lot of work for maintenance.

Thanks Sam.

Thinking some more on this...

Our issue was we couldn't use the Work Item Statistics widget or anything that shows a break down of the attribute by selected values. However, if using small or medium strings (as you mentioned in another thread) you could use "contains" to search for your more logically named IDs.

So I think one could workaround this type of widget by creating a series of individual queries which each query for a single ID or value from the multi-select list. Then you could use the Work Item Queries widget to list these and each should list the number of valid results in parentheses next to the name.

Not a great solution but it could be workable. I am suggesting this to be tested by a member of our team to see if it suits their needs.


Permanent link
there is really only one good way that I know of,

2. In RTC 3 we tried to used the way of "small string" attribute which would use a multi selection box presentation fed with business unit enumeration values. So far so good. But the queries would display BusinessUnitEnum.literal1 .... or something like that, so this was not working for getting an overview.

create the enum,
then edit the process source and change the generated IDs to match the text names of the enumerations.
then create the string definition to hold the values..

then queries look right..

but.. note that IDs are project wide, not tied to a workitem type..  so be careful with the names

1 vote

Comments

That actually sounds like a nice way to do it, until the above enhancement is implemented. I will look into it.

One thing I did not mention though, is that this way makes it very hard to add new business units and the above solution would actually help this issue.

Your solution though will fit nicely with what we have now. I will definitely consider it. Thanks a lot for your suggestion :-).


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
× 6,120

Question asked: Nov 07 '12, 10:30 a.m.

Question was seen: 7,048 times

Last updated: Jun 26 '13, 11:16 a.m.

Confirmation Cancel Confirm