It's all about the answers!

Ask a question

How can I make a field unique in RTC?


Lipi Das (2612635) | asked Jun 13 '14, 6:38 a.m.
I want to make one field unique in a workitem so that if a second workitem is created with the same value in that field it should not allow to save.

2 answers



permanent link
Ralph Schoon (63.4k33646) | answered Jun 13 '14, 6:56 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am not sure you can do that easily.

One Idea that comes to mind is, you could create an advisor (extension work item save), that runs e.g. a query and checks if there is a work item with the same value in the attribute and prevents saving if so. However, there are performance implications.

What would be the use of this?

permanent link
N Z (36212127) | answered Jun 15 '14, 6:27 p.m.
 What are you trying to achieve and what type of value are you trying to store in this unique field? Where does this value come from?


Comments
Lipi Das commented Jun 16 '14, 12:48 p.m.

 This is a alphanumeric field which should not be duplicated. 


Lipi Das commented Jul 07 '14, 5:01 a.m. | edited Jul 07 '14, 5:02 a.m.

I want to make one field unique in a workitem so that if a second workitem is created with the same value in that field it should not allow to save the workitem.
Example, ,I have a field called Title in a workitem of type, say, Story. I want to make sure that the user should not be allowed to create more than one Story with the same Title
 
<o:p> </o:p>

<o:p>   </o:p>


Ralph Schoon commented Jul 07 '14, 5:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As already mentioned above you could create a work item advisor. As an example see https://rsjazz.wordpress.com/2014/05/26/only-owner-can-close-workitem-advisor/ . This would check (e.g. using a query) to look if the value is already used.

However, please be aware that this will be a considerable drain on the performance of the system, as it will have to run a query each time a work item is saved.

Your answer


Register or 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.