It's all about the answers!

Ask a question

RTC4.0: store enumeration in database: how does that work?

Don Yang (7.7k21108138) | asked Aug 06 '12, 3:56 a.m.
RTC4.0 has new enumeration properties added when creating a new enumeration attribute.

The 2nd step says:

Select the enumeration that you want to edit, or click Add in the Choose the Enumeration to edit field to define a new enumeration. After the enumeration is selected, in the Enumeration section, click Add to add a literal to the enumeration.
  1. Note: When you define a new enumeration, you can store it in the process specification or the database. If you store the enumeration in the database, you can add new values to the enumeration directly from the work item editor, even if you do not have permissions to modify the process specification. You still require permissions to add new values.
I created a Scrum project area and add a user with Scrum Master role(default), I notice that by default, in project configuration permission's Process > Modify a process > Modify the process specification permission is checked.
If I create a new enumeration and select database as store option, I have no problem to add new literals and when adding new attribute and select the new enumeration and then add presentation to the task WI, I can see
the new custom attribute is there with the newly added enumeration list.

1) Does that mean that if I have Modify the process specification permission, I don't need specific permissions to add new values if I select database as store option? I can see that under team configuration > scrum master role will have a new permission "Save enumeration" > Create new enumeration value, but it is unchecked by default and I did not check it when testing.

2) According the help:,
If you store the enumeration in the database, you can add new values to the enumeration directly from the work item editor, even if you do not have permissions to modify the process specification. You still require permissions to add new values.
I added both "Modify the process specification and add new enumeration values " permission and then tried to create the work item with the newly added enumeration stored in database, I am not able to add any new value in Workitem editor.
What does "you can add new values to the enumeration directly from the work item editor" mean? isn't that the tool would allow us to add the new enumeration value in task(for example) workitem when it is created or edited so long as the new enumeration type attribute is added and the mentioned permissions are allocated?
How does that work if my understanding is wrong?

Appreciate if there is any inputs. Thanks a lot.

Don Yang commented Aug 06 '12, 8:08 p.m. | edited Aug 07 '12, 12:48 a.m.

Thanks Geoffery for the answers.

I tried it here on Scrum PA but do not see any "add" action is available in browser's workitem for existing or new task workitem although I can see the enumeration type of attribute is there and originally added list is available.
I double checked with Firefox and IE8 and refresh the browser but nothing happens.
I checked the permission as well and see one new menu go created under team configuration > workitems > save enumeration(server) > create new Enumeration value > create a new enumeration value for 'importance'(this is the one I newly added) and assigned to Scrum Master which is my user's role.
Since this is in team level permission, I added a new category and associated with a new team area and make sure team area is selected in workitem. Unfortunately I cannot add image here for the reference but I am wondering what I did wrong here. Is there anything I can check with? Thanks a lot.

Don Yang commented Aug 06 '12, 8:48 p.m.

BTW, my environment is RTC4.0 Tomcat/Derby environment. I tried on two different OS and Formal process management based PA as well, I could not get "add" menu available in browser at all. Please shed some lights here on what I could do wrong or how you make it work. Thanks a lot.

Geoffrey Clemm commented Aug 07 '12, 12:49 a.m.

I checked, and my previous answer neglected to mention the essential "allow any value" property that needs to be set on the Editor Presentation for the Attribute for the Enumeration. I've updated my answer with that info.

Accepted answer

permanent link
Geoffrey Clemm (30.1k33035) | answered Aug 06 '12, 2:28 p.m.
edited Aug 07 '12, 12:47 a.m.
The "magic" you need to expose the "Add" button is that using the Eclipse project area editor, in the process guidance tab, in the editor display for the attribute whose type is the database enumeration, you have to check the "allow to add new literals" checkbox.  In the web-ui, this is done by setting the rather unintuitively named "allow any value" property to be "true".

Geoffrey Clemm selected this answer as the correct answer

Don Yang commented Aug 07 '12, 2:42 a.m.

Thanks Geoff. I got it work based on this info. It's great!

Udaya Puthuraya commented Jan 24 '13, 4:56 p.m.

How  do we give the end user,  capability to  update and/or sort  authority  for  the Database based enumeration list ? If we give the permission to update the process template  they get the privilege to update or sort the DB based enumeration list.
Is there any other  way to handle this  ?

Udaya Puthuraya commented Jan 24 '13, 5:44 p.m.

When we are trying add new entry to enumeration through work item while saving,  this message pops up in web client.  "Key is already set for type "stringExtensions"."  
Any idea what this means ?
From Eclipse client it does not populate the new value in the box and save button is not enabled even after adding a new value.

Geoffrey Clemm commented Jan 26 '13, 2:43 p.m.

The database enumeration list is stored in the database, not in the process configuration (note: the process configuration of a project area is not the same as the process template that was used to initialize the project area ... I'm assuming you were referring to the process configuration).  So the permission you want is WorkItems:SaveEnumeration:CreateNewEnumerationValue

WRT the error you are encountering, I haven't seen that before.  You'll want to work with Rational Support on that.

Udaya Puthuraya commented Jan 28 '13, 12:20 p.m.

Thanks for the reply.  Yes. I was referring to the process configuration.
Permission  WorkItems:SaveEnumeration:CreateNewEnumerationValue  allows only to create new enumeration which is already configured in my case. "allow to add new literals" check box is also set in the  Editor presentation for the attribute.  This allows the end user to create a new attribute.
Coming back to my question,
If the end user needs to update any  existing enumeration value or sort the enumeration list(Move up or down) through eclipse client,  I had to give them the permission to modify the process specification.ProjectConfiguration:Permissions:Process:SaveProjectArea:ModifyTheProcessSpeciifcation(Even though DB enum. values are stored in the Database).
Is there any alternate way doing it without giving this permission to modify the Project area process specification ?

Your answer

Register or to post your answer.