It's all about the answers!

Ask a question

AttributeValueProviders depedencies


Lester Manalastas (11) | asked Apr 26 '10, 5:48 p.m.
Hello,
I was looking through the examples on AttributeValueProviders (https://jazz.net/wiki/bin/view/Main/AttributeValueProviders), and I was wondering if this supports attribute-based presentation that is dependent on a NON-attribute-based presentation.

For example, I would like to give the "Owned By" field (which is attribute based) a default value depending on the Workflow State (which is non-attribute based).

If so, how would I reference the Workflow State?
dependsOn id="?"

Thanks,
Lester

7 answers



permanent link
Patrick Streule (4.9k21) | answered May 01 '10, 3:50 a.m.
JAZZ DEVELOPER
I was looking through the examples on AttributeValueProviders
(https://jazz.net/wiki/bin/view/Main/AttributeValueProviders), and I
was wondering if this supports attribute-based presentation that is
dependent on a NON-attribute-based presentation.

For example, I would like to give the "Owned By" field
(which is attribute based) a default value depending on the Workflow
State (which is non-attribute based).

If so, how would I reference the Workflow State?
dependsOn id="?"

The workflow state is an attribute (only the presentation for state is
not attribute based as we don't support custom state attributes).

So you can use
dependsOn id="com.ibm.team.workitem.attribute.state"

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Lester Manalastas (11) | answered May 18 '10, 5:29 p.m.
Thanks for the reply. I was successfully able to implement the example involving suggested priorities depending on severity. I thought that I could use that to make the "Owned By" field dependent on the Workflow State. However, I have been unsuccessful thus far.

Here is my valueSetProvider.

<valueSetProvider id="newOwner"  name="New Owner" 		providerId="com.ibm.team.workitem.common.internal.attributeValueSetProviders.FilteredValueSetProvider">

<filterMap>
<value content="APAR.state.s2">
<literal id=""/>
</value>
<value content="APAR.state.s4">
<literal id=""/>
</value>
</filterMap>
</valueSetProvider>


As you can see, I do not have anything in the literal id statements. "Owned By" is type contributor, and, unlike the severity and priority enumerations, its literal ids are not plainly spelled out in the process configuration (i.e. priority.literal.l1).

I have tried several possibilities with no success such as CONTRIBUTOR_USERID, CONTRIBUTOR_NAME, CONTRIBUTOR_ITEMID, and also just the contributor's name. How do I reference a contributor to put in that literal id statement?

I also noticed in the process configuration where the states are defined, there is APAR.action.* in addition to APAR.state.* Am I correct in using APAR.state.*?

Also in case it might be needed, here is the attribute definition for the Owned By field:

<attributeDefinition id="com.ibm.team.workitem.attribute.owner" name="Owned By" type="contributor">

<dependsOn id="com.ibm.team.workitem.attribute.state"/>
<valueSetProvider providerId="newOwner">
<filterAttribute id="com.ibm.team.workitem.attribute.state"/>
</valueSetProvider>
</attributeDefinition>


In this instance, I am also unsure what I should be putting in the filterAttribute id. I noticed that it is not necessarily required.

Thanks again for your help.

permanent link
Lester Manalastas (11) | answered Jun 07 '10, 7:08 p.m.
bump

Thanks for the reply. I was successfully able to implement the example involving suggested priorities depending on severity. I thought that I could use that to make the "Owned By" field dependent on the Workflow State. However, I have been unsuccessful thus far.

Here is my valueSetProvider.

<valueSetProvider id="newOwner"  name="New Owner" 		providerId="com.ibm.team.workitem.common.internal.attributeValueSetProviders.FilteredValueSetProvider">

<filterMap>
<value content="APAR.state.s2">
<literal id=""/>
</value>
<value content="APAR.state.s4">
<literal id=""/>
</value>
</filterMap>
</valueSetProvider>


As you can see, I do not have anything in the literal id statements. "Owned By" is type contributor, and, unlike the severity and priority enumerations, its literal ids are not plainly spelled out in the process configuration (i.e. priority.literal.l1).

I have tried several possibilities with no success such as CONTRIBUTOR_USERID, CONTRIBUTOR_NAME, CONTRIBUTOR_ITEMID, and also just the contributor's name. How do I reference a contributor to put in that literal id statement?

I also noticed in the process configuration where the states are defined, there is APAR.action.* in addition to APAR.state.* Am I correct in using APAR.state.*?

Also in case it might be needed, here is the attribute definition for the Owned By field:

<attributeDefinition id="com.ibm.team.workitem.attribute.owner" name="Owned By" type="contributor">

<dependsOn id="com.ibm.team.workitem.attribute.state"/>
<valueSetProvider providerId="newOwner">
<filterAttribute id="com.ibm.team.workitem.attribute.state"/>
</valueSetProvider>
</attributeDefinition>


In this instance, I am also unsure what I should be putting in the filterAttribute id. I noticed that it is not necessarily required.

Thanks again for your help.

permanent link
Patrick Streule (4.9k21) | answered Jun 11 '10, 10:07 a.m.
JAZZ DEVELOPER
On 5/18/10 11:37 PM, lmanala wrote:
Thanks for the reply. I was successfully able to implement the example
involving suggested priorities depending on severity. I thought that I
could use that to make the "Owned By" field dependent on the
Workflow State. However, I have been unsuccessful thus far.

Item types are currently not supported, only enumerations.

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Travis Windsor (1611) | answered Jun 15 '10, 11:50 p.m.
On 5/18/10 11:37 PM, lmanala wrote:
Thanks for the reply. I was successfully able to implement the example
involving suggested priorities depending on severity. I thought that I
could use that to make the "Owned By" field dependent on the
Workflow State. However, I have been unsuccessful thus far.

Item types are currently not supported, only enumerations.


Is this planned anywhere, or is this in the current backlog for RTC?

Thanks,

Travis

permanent link
megha mittal (15112615) | answered Mar 16 '11, 1:54 a.m.
I have a custom attribute A which is of type enumeration .Now it has 20 values and i want if workitem state is 'open' then particular 10 values and if state is 'resolved' then other 10 values are displayed in custom attributes for user to select during 'save' operation.

I read about value set providers but i guess its only for enumeration to enumeration and workitem state i guess is not enumeration.

Please help

permanent link
Michael Walker (99214201157) | answered Mar 18 '11, 2:21 a.m.
On 5/18/10 11:37 PM, lmanala wrote:
Thanks for the reply. I was successfully able to implement the example
involving suggested priorities depending on severity. I thought that I
could use that to make the "Owned By" field dependent on the
Workflow State. However, I have been unsuccessful thus far.

Item types are currently not supported, only enumerations.

--
Regards,
Patrick
Jazz Work Item Team

Patrick,

Regarding lmanala's question....Is it possible to do using a Custom Provider with Java, with the understanding that this is currently not-supported?

I also see there's now a Role-based Provider. If we created a role with only one person can we configure a Value Set Provider that sets a field to this Role if the State = 'Build'?

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.