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

Validator javascript handler question

I have a couple custom fields on a workitem, which are workitem and workitemList types.

they function like I want them to, except for one item, I want to constrain the workitemtype allowed to be selected.
the add function brings up the 'pick any workitem (or create one)' dialog.

I know we cannot customize that (shame, would be SO easy with a couple optional properties for the presentation)

anyhow.. so I want to prevent saving if one picked the wrong workitem type.
but I don't think I can get access to this field contents (workitem or list) in javascript.
am I correct?

0 votes



2 answers

Permanent link
 Sam, you can get triggered by the work item type and potentially prohibit save, I think. The type as of  https://jazz.net/wiki/bin/view/Main/AttributeCustomization is WorkItemAttributes.TYPE. If you validate to error and configure the operational behavior to prevent error level validation a from saving, you should be good. I have not tried that myself. I would probably rather go for a custom Advisor myself.

0 votes


Permanent link
thanks.. my issue is that the linked doc says 'limited' types.. and the workitem and workitemList type fields are not listed..

and if its a list type, I need to run thru the list as well.

was thinking javascript so I wouldn't have to reboot the production servers. altho the osgi console should allow us to do that... another training exercise.

0 votes

Comments

Sam, I do believe your assessment that you can not access list type attributes in JavaScript is right. I would go for an advisor instead. (List type attributes return a list of objects). I don't think JavaScript is advisable here.

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
× 10,937
× 152

Question asked: May 20 '13, 9:18 a.m.

Question was seen: 4,409 times

Last updated: May 21 '13, 1:49 a.m.

Confirmation Cancel Confirm