Can you query for unassigned literal on a custom attribute?
In RTC 5, I put a custom attribute with a custom enumeration into my Story workitem type. The new enumeration has an unassigned literal ("Unassessed") which is also the same as the default literal. The attribute is required only at later stages of the workflow, but not initially.
We've added this new attribute late, and we have several stories already "in flight". We tried to create a query to show us all the Stories that have the attribute set to "Unassessed". Nothing came up, even when I could look at one particular story that is indeed Unassessed.
Strangely, in the query builder, I don't have the "Unassigned" checkbox for this attribute, maybe because it is required at later points? And I see the "exists" option for the attribute (in the same popup as "is" and "is not"), but there is no "not exists" option there.
How can we create this query?
We've added this new attribute late, and we have several stories already "in flight". We tried to create a query to show us all the Stories that have the attribute set to "Unassessed". Nothing came up, even when I could look at one particular story that is indeed Unassessed.
Strangely, in the query builder, I don't have the "Unassigned" checkbox for this attribute, maybe because it is required at later points? And I see the "exists" option for the attribute (in the same popup as "is" and "is not"), but there is no "not exists" option there.
How can we create this query?
2 answers
I don't see an "unassigned" check box for any enumeration.
Because you have to specify a default attribute, an enumeration seems to be always assigned. I think the unassigned literal might just be there to be able to enforce a required value.
But the literal itself shows up as choice in the condition, so you can only select that and it should show the ones that have this value. I have never seen any difference between custom and built in enumeration type attributes.
Because you have to specify a default attribute, an enumeration seems to be always assigned. I think the unassigned literal might just be there to be able to enforce a required value.
But the literal itself shows up as choice in the condition, so you can only select that and it should show the ones that have this value. I have never seen any difference between custom and built in enumeration type attributes.
Comments
I am not sure, but I would say that, as happened to us :
- You don't have the unassessed because the default value makes it impossible.
- Your existing Work Items don't have the default value because it was added after they were created.
If that is your problem, I suggest working in two steps :
- Remove the default value ; then you should be able to query the unassessed, and mass-modify your Work Items.
-
Then restore the default value you want.