It's all about the answers!

Ask a question

In a work item customization value set script, how can I get a list of project areas?

Donna Thomas (14122448) | asked Dec 13 '18, 10:28 a.m.
Hi there,

We are attempting to populate a short string attribute with a Value Set (customization) choice. We want the value set list to be the list of project areas, where we can filter within the script. IE: We only want project area names that end with "(SAFe_Program)" to be available in the Value Set to select from.

Any ideas?

Thank you

One answer

permanent link
Ralph Schoon (62.9k33645) | answered Dec 14 '18, 3:08 a.m.
edited Dec 14 '18, 3:10 a.m.

 For all I know not with any supported API. You could try to use the HTTP filtered value set. You can try to use REST calls.

Donna Thomas commented Dec 14 '18, 2:25 p.m.

Thanks Ralph... I maybe able to do that with an HTTP filtered value set. I was hoping there was an easier way. Oh well. Thanks for your time!

Davyd Norris commented Feb 10 '19, 7:10 p.m.
Hi Donna,

You may have worked this out already but this is how I do it.
Note that this example retrieves every project area with the word 'Sandbox' in it - if you want to find a suffix you have to do some fiddling because the ends-with function is only available in XPath 2.0.

If you really needed that, you'd have to hack an expression with the substring and string-length XPath functions.

Your answer

Register or to post your answer.