It's all about the answers!

Ask a question

How to create a Condition for Dynamic Required Attributes?


Andrew Stevens (1482729) | asked Jan 26 '12, 12:49 p.m.
Hi,

I've got a "Dynamic Required Attributes" precondition on the Save Work Item (server) operation, and I've created a Condition for one of my work item types according to the skeleton on https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Conditions But at this point in the configuration I've got stuck - when I go to Attribute Customization in order to add the condition I don't see a Category for that, only Default Values, Calculated Values, Value Sets and Validators. Am I looking in the right place?


Andrew.

4 answers



permanent link
Millard Ellingsworth (2.5k12431) | answered Jan 26 '12, 5:49 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER
Which client version are you using? The Wiki page specifically mentions 3.0.1. I am using 3.0.1.2 and "Conditions" shows up between "Value Sets" and "Validators" on my Attribute Customization page.

Millard

permanent link
Andrew Stevens (1482729) | answered Jan 27 '12, 5:32 a.m.
Which client version are you using? The Wiki page specifically mentions 3.0.1. I am using 3.0.1.2 and "Conditions" shows up between "Value Sets" and "Validators" on my Attribute Customization page.

Millard


Ah, that's probably it - although the server's running 3.0.1.1, the plugin version in our corporate locked-down pre-packaged desktop client installations is 3.0.0! So the Dynamic Required Attributes precondition is available in the list since it's on the server, but the client doesn't know about the Conditions that I need to configure it. And the web interface doesn't appear to include the Attribute Customization section, so I can't do it through that either...

Thanks for the clue. Guess I need to pester our support helpdesk for a plugin upgrade :-)
In the meantime, can anyone post a sample of the equivalent Process Configuration Source XML (both com.ibm.team.workitem.configuration.providers configuration-data and com.ibm.team.workitem.advisor.requiredAttributes precondition sections) so I can edit it directly? Hopefully, since the server's the right version, that'll let me get it working.


Andy.

permanent link
Millard Ellingsworth (2.5k12431) | answered Jan 27 '12, 1:53 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER
In the meantime, can anyone post a sample of the equivalent Process Configuration Source XML (both com.ibm.team.workitem.configuration.providers configuration-data and com.ibm.team.workitem.advisor.requiredAttributes precondition sections) so I can edit it directly? Hopefully, since the server's the right version, that'll let me get it working.


Andy.


I did a quick Condition configuration using the sample JS (offered by the configuration dialog you can't see yet) and setup with Due Date as the dynamically required attribute. Here are the snippets of XML per your request:


[configuration-data xmlns="http://com.ibm.team.workitem/providers" final="false"
id="com.ibm.team.workitem.configuration.providers"]
[conditions]
[condition id="com.ibm.team.workitem.valueproviders.CONDITION._ZdvbcEkPEeGoL__Ovvw9JA"
name="SampleCondition"
providerId="com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider"]
[script class="com.example.Condition" path="/workitem/scripts/common/sample-condition.js"/]
[/condition]
[/conditions]
[/configuration-data]

[precondition xmlns="http://com.ibm.team.workitem/requiredAttributes"
description="Verifies that a work item can only be saved if all required attributes are given."
id="com.ibm.team.workitem.advisor.requiredAttributes" name="Dynamic Required Attributes"]
[requiredAttributes ruleId="com.ibm.team.workitem.valueproviders.CONDITION._ZdvbcEkPEeGoL__Ovvw9JA"]
[attribute id="dueDate"/]
[/requiredAttributes]
[/precondition]



Hope that helps! Sorry about the brackets, but I completely failed in my attempts to format the XML to display reasonably here.

Millard Ellingsworth
IBM Rational Team Concert Development

permanent link
VK L (8177157159) | answered Mar 04 '13, 8:14 a.m.
 Hi All,

            I followed the wiki and enabled the dynamic attribute based on another enumeration value [ using javascript] . But the * mark doesnt appear to indicate the mandatory attribute. I am using RTC V3.0.1.1 .

I noticed that this issue is fixed - but is it in a later version of 3.0.1?

Thanks.

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.