It's all about the answers!

Ask a question

How to access the Deliverable type attribute through script?


Prabhakar Dhataram (111) | asked May 09 '13, 2:40 p.m.
We have the target release filed defined as a Deliverable type attribute in the work item. I would need to access the value selected for this enumeration field and do certain validations on the other fields in the work item.

I am having trouble in accessing the value selected for this Deliverable type attribute. Appreciate any inputs.

Thanks!

2 answers



permanent link
VK L (8177155159) | answered May 14 '13, 3:09 a.m.
 Hi Prabhakar,
                        Did you try to associate the script with an attribute and try? What are the errors in the ccm.log and eclipse workspace log as well?

Thanks.

permanent link
Millard Ellingsworth (2.5k12431) | answered May 09 '13, 6:20 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER
According to this wiki article: https://jazz.net/wiki/bin/view/Main/AttributeCustomization a very limited set of attribute types are available for reading and writing from scripts (and Deliverable isn't on that list). There is some special discussion of working the enumerations that may help. But it's possible this value is not available via scripting.

Comments
Prabhakar Dhataram commented May 13 '13, 8:38 p.m.
Thanks for the response Millard. 

My requirement would be to update certain flags in the work item, based on the value selected for this Deliverable type enumeration. Would you suggest going for a Java implementation instead of the scripting option? 

Thanks again.

Millard Ellingsworth commented May 13 '13, 9:40 p.m.
FORUM ADMINISTRATOR / JAZZ DEVELOPER

Are the target values read-only or are you coercing the values?


What you are essentially discussing is a  calculated value customization. See same article linked above. The thing is that calculated values should only be used for read-only attributes, so if those flags you want to change are editable by the user, your results from scripting could be disappointing.

As to approach, I favor the lightest-weight solution that will work. If you can get the results you want via scripting, I'd go that route. If you don't think that will work, I'd consider ways that I could change the requirements to fit a scriptable solution. Failing that, I'd contribute and Advisor built on the Java API.


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.