Finding configured values for severity
![]()
For a custom attribute that is typed by an enumeration, I know how to find the possible enumeration values through code. But how about for standard attributes, like the "severity" enumeration---
I'm confused a bit about this---If you use the EclipseWay process, if you just look at the GUI, a Defect has a severity, but a Story doesn't (it does have a "story point" value, and it's clear how that's configured). You can easily customize what the possible values are for the severity enumeration. And you can customize whether severity shows in the presentation--so it's included in the presentation for Defect, but not included in the presentation for Story. In the client libraries, there's a specific getSeverity() method on workitems, and an ISeverity interface that can be used to create Identifiers (values of the enum) from strings. Does this all mean that Story work items actually do have a Severity, but it's just not shown? |
3 answers
![]() For a custom attribute that is typed by an enumeration, I know how to You can get all enumeration values using IWorkItemCommon#resolveEnumeration(IAttributeHandle attribute, IProgressMonitor monitor). This works for both custom attributes and the built-in severity and priority attributes. I'm confused a bit about this---If you use the EclipseWay process, if Yes. Severity is a built-in attribute, so all work items regardless of their type have this attribute. Most important--how do you get through code (in advance IAttribute severityAttribute= workItemClient.findAttribute(projectArea, IWorkItem.SEVERITY_PROPERTY, monitor); IEnumeration<ISeverity> severityEnumeration= (IEnumeration<ISeverity>) workItemClient.resolveEnumeration(severityAttribute, monitor); List<ISeverity> severities= severityEnumeration.getEnumerationLiterals(); HTH, Patrick Streule Jazz Work Item Team |
![]()
Thanks Patrick! That answers my question well for severity. Quick follow up--this works ok as long as I know explicitly it's severity I'm looking for and I can use the right property in my code. Is there a way to get a list of all the attributes, both built in and custom, for a ProjectArea, so that severity is just "another one on the list"? I'm looking at this for purposes of a configuration utility that configures "the attribute I'm interested in", perhaps by ID, and so can treat built in and custom the same.
|
![]() Thanks Patrick! That answers my question well for severity. Quick The method that returns all attributes of a project area is IWorkItemCommon#findAttributes(IProjectAreaHandle projectArea, IProgressMonitor monitor); Patrick Jazz Work Item Team |
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.