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

How to restrict a value for a custom att of type WorkItem?

Hi,

I have created a custom attribute of type WorkItem.
When I click on choose value, a pop up comes to select a work item type.
I want to restrict it to select only 'Defect' as a type.
Is it possible?
Or can we validate that the selected workitem is of type Defect only?

Thanks in advance for all help.

0 votes


Accepted answer

Permanent link

 The documented APIs do not allow attribute customization, to detect more complex information about complex items such as work items apart from the ID and the Item display name, for all I know. It is possible to use more internal and unsupported API to get this information if attribute customization is executed in the browser. This is discouraged and only works in the Web browser, not in the EWM Eclipse client.

It would be possible to use Java Based extensions (attribute customization or preconditions/advisors) to prevent saving with an incorrect value.


I would prefer if there was a mechanism to configure a query or filter for such attributes in the editor presentation to have better user support, but that would be an enhancement request. In the short term, I would look at an advisor/precondition. I have published examples on my blog: https://rsjazz.wordpress.com/?s=advisor&submit=Search


Stephan Gambke selected this answer as the correct answer

0 votes

Comments

I'll look into that. Thanks!


One other answer

Permanent link

Use Dojo scripting on the event of Change of another attr. If WorkItem is not Defect, pop up a message.

Or Use a Pre-Condition plug-in at save of work item. needs java development.
Refer Jazz.net for more information on Script based attributes in particular & Work Item Customization in General.

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

Question asked: Aug 04 '22, 11:36 a.m.

Question was seen: 1,057 times

Last updated: Aug 05 '22, 3:25 a.m.

Confirmation Cancel Confirm