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

AttributeValueProviders depedencies

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

0 votes



7 answers

Permanent link
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

0 votes


Permanent link
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.

0 votes


Permanent link
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.

0 votes


Permanent link
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

0 votes


Permanent link
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

0 votes


Permanent link
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

0 votes


Permanent link
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'?

0 votes

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

Question asked: Apr 26 '10, 5:48 p.m.

Question was seen: 7,175 times

Last updated: Apr 26 '10, 5:48 p.m.

Confirmation Cancel Confirm