Can you query for unassigned literal on a custom attribute?
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
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 do see the unassigned literal in the list of choices in the query builder, but when I select it, I get no results in the query. I ran a query of all stories, without filtering by the new custom attribute, and simply displayed it in the results. It shows as "-" for the ones I'm looking for, which seems like "null" or "empty" to me, but I have no way to filter on "null".
This is what I see. There is no unassigned, but all the literals. Maybe we talk about different things?
I see the same sort of thing. The problem is that if I choose "Unassessed" (for my custom attribute, this is the equivalent of "Unclassified"), no results appear, even though I have several stories set to "Unassessed".
- 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.