Tags
Include Tags into Output
Selector:
/api/v2/userstories?select={id:id,name:name,tags:tags}
Example of response:
"items": [
{
"id": 47,
"name": "UX Testing design concepts",
"tags": "tests"
},
{
"id": 18,
"name": "Mobile version'",
"tags": "tag1, tag2"
},
{
"id": 616,
"name": "Login",
"tags": "ab - c, abcdef, cd, e-f, two - words"
}
]
}```
[block:api-header]
{
"title": "Filters for Tags"
}
[/block]
These filters are helpful when you set up a view with General entities (such as User Stories, Tasks, Bugs, Requests, Features, Epics, Releases, Sprints (Iterations), Projects etc.) and the assigned Tags they have.
[block:parameters]
{
"data": {
"h-0": "Entity",
"h-1": "Filter",
"h-2": "Result",
"0-0": "General",
"0-1": "where=(TagObjects.Count==0)",
"1-2": "Entities having at least one tag assigned",
"1-1": "where=(TagObjects.Count>0)",
"1-0": "General",
"0-2": "Entities with no tags assigned",
"2-1": "where=(TagObjects.Where(Name=='plugin').Count>0)",
"2-0": "General",
"2-2": "Entities with “plugin” tag. The tag should contain exactly this single word",
"3-0": "General",
"3-1": "where=(TagObjects.Where(Name=='plugin').Count==0)",
"3-2": "Negative filter. Entities with no “plugin” tag."
},
"cols": 3,
"rows": 4
}
[/block]
It is also possible to filter parent entities by tags assigned to parent entities. Say you can show a feature if a parent epic of this feature has been tagged with a specific tag.
[block:parameters]
{
"data": {
"h-0": "Entity",
"h-1": "Filter",
"h-2": "Result",
"0-0": "Feature",
"0-1": "where=(Epic.TagObjects.Where(Name=='plugin').Count>0)",
"0-2": "Features that are parts of Epics with “plugin” tag"
},
"cols": 3,
"rows": 1
}
[/block]
Updated almost 7 years ago