It's all about the answers!

Ask a question

Dynamic Resolutons

Rod Brandt (2613) | asked Jan 23 '13, 10:49 a.m.

Is there a way to hide or show a resolution code based on the value of another attribute?

We would like to make a resolution code available only when one of our custom attributes has a certain value.



3 answers

permanent link
Ralph Schoon (63.3k33646) | answered Jan 23 '13, 11:18 a.m.
edited Jan 23 '13, 2:19 p.m.
Hi Rod,

Resolutions is a small string. You could try to use a JavaScript based Value Set. See lab 5 for some training and additional information. You can add dependent attributes and use them for your calculation. You need probably to return the resolution values configured in the process. As the worksho will explain, you will have to code the values used for the value set into the script or the configuration, because you will not be able to access the process configuration details from inside the script.

sam detweiler commented Jan 23 '13, 4:09 p.m. | edited Jan 23 '13, 4:13 p.m.

 Isn't Workflow Resolution a NON-Attribute type variable

so you can't attach a value script provider (cause thats in the Attribute layout panel,  see last image) workflow resolution presentation definition
attribute based layout
  attribute layout

Ralph Schoon commented Jan 23 '13, 4:43 p.m.


you can set the value set on the attribute. However, at least a quick test, showed it would not pick up the value set. Bummer. I did only spend 5 minutes in it, but if the presentation has id hardwired, it might not work with a script.

sam detweiler commented Jan 23 '13, 4:54 p.m. | edited Jan 23 '13, 4:57 p.m.

what attribute? the resolution code is NOT an ATTRIBUTE...

I could create ANOTHER attribute to take the place of this variable. but that screws up a bunch of things in queries, etc

sam detweiler commented Jan 24 '13, 8:24 a.m.

Ralp, did I miss something in your explanation? How did you get these two things to be defined as Attribute types?

Ralph Schoon commented Jan 24 '13, 8:31 a.m.

Sam, there is an attribute on my defect for example (4.0.1) called resolution. See this image.

I am able to assign a JavaScript based value set (if one is defined the drop down becomes active). However, the java set is unfortunately not used, because, apparently the presentation does not respect it.

sam detweiler commented Jan 24 '13, 8:51 a.m.

yeh I see that, but the presentation lists something else. "Workitem Resolution"
but you cannot change it to be Resolution.. so I think this is a 'special' attribute which behaves differently

queries support the 'Resolution' string.

showing 5 of 6 show 1 more comments

permanent link
Eric Jodet (6.3k5111120) | answered Jan 24 '13, 8:57 a.m.
Adding my 2 cents to this interesting case: based on The default value for resolution should be configurable (58950)
comment 2: The resolution depends on the action selected, which is not even a work item attribute
we can observe that we can enable / disable / filter resolution based on action only (workflow implementation)

An alternate option to Javascript based calculated values would be to replace this resolution with a custom resolution enum attribute,
and implement a new dependent enum between custom resolution and custom attribute (assuming this is an enum).
Not tested, unknown impact.

permanent link
sam detweiler (12.5k6195201) | answered Jan 24 '13, 12:21 p.m.
right, you would have to create a new field enum/variable to connect it to the primary field (dependent)

I suspect there will be fun times with queries, reports and other actions that are hard coded to the special variable.

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.