EWM 7.1 - HTTP Filtered Value Set Provider for Project-specific attributes
Hi,
I'm curious about how I could use the HTTP Filtered Value Set Provider to provide project area specific values for certain attributes.
We use one project area as a central shared process area, but we want the ability for individual projects to have some level of customisation... for example a Project A might have a list of key clients or stake holders and we want to be able to attribute work items to those project specific stake holders which are different to the stake holders in Project B.
So let's say that I have two project areas which are both using a shared process from a "Master" project area. Let's call them PROJECT A and PROJECT B.
In the master shared process area, I create two attributes both of type "Category" (see note 1 below), lets call these attributes "Stakeholder" and "Charge Code" which should have project-specific values to select from.
In PROJECT A, I could have two top level categories, one called "Stakeholders" and another called "Charge Code" and then I add project specific values underneath them...
Stakeholders/Client 1
Stakeholders/Client 2
Stakeholders/Supplier 1
Charge Code/ABC123.01
Charge Code/ABC123.02
I do the same for PROJECT B but use different values...
Stakeholders/Client A
Stakeholders/Client B
Stakeholders/Supplier A
Charge Code/ABC321.01
Charge Code/ABC321.02
I want a value set provider that uses the categories from the Project area where the Work Item is being created to show a filtered list of "Stakeholders" or "Charge Codes"... So for example, if I create a work item in PROJECT A, when I go to select the "Stakeholders" attribute, I only see "Client 1, Client 2 and Supplier 1" as options. In PROJECT B, I only see "Client A, Client B and Supplier A" as options.
Selecting the option saves the category value to the attribute.
I have tried testing a HTTP filtered value set using a REST API call...
https://{our server}/ccm/rpt/repository/workitem?fields=workitem/category[projectArea/itemId={projectID}]/*
How do I get this projectID into the query for the "XML data source URL" in setting up the value set provider?
How do I limit this to just the qualifiedNames that start with "Stakeholders"?
Do I need to do this with a script instead?
Will this work with attributes as type: category?
NOTE 1:
Technically, this could be a string but saving it as a category type has some benefits when it comes to having a hierarchy in a plan view, for example with group by "Stakeholder" for example.
NOTE 2:
I have already done everything here up to the filtered value set provider... and my work around at the moment is to use a "Default Value Provider" however, we have a lot of categories in some projects and at the moment, there isn't really anything that prevents a user choosing, for example, a charge code for the stakeholder attribute. It's a bit messy, but a filtered list using the PA's categories solves the problem, I just need to know how to do it.
2 answers
You can definitely do this sort of thing, but I'm still not 100% sure I understand your use case - specifically what attributes you want to populate?
If you use categories then they are going to appear in the Filed Against attribute, which may be a perfect way to classify your work items, but then that has implications in terms of Team Area ownership too.
Or are you saying you will create some sort of master list in one project area, and then get the data from there for other project areas and attributes?
Comments
AFAIK the HTTP Filtered value set needs to be defined in the attribute customization (add value set). You need to specify the xPath etc, so that the value set really works. I do not think the value set know about the project area and I am not aware you could customize it further in other project areas, unless you overwrite the process inheritance for attribute customization.