It's all about the answers!

Ask a question

Dynamic query to share for all the Team Areas dashboards

Ratheesh Madathil (1371325) | asked Feb 20 '14, 9:55 a.m.

We would like to create a query to share for all the Team Areas dashboards, it has to use "Team Area" as variable. Idea is to try and use it in the Team Areas dashboard template inside the Process configuration. i.e when the dashboard is created for the first time,  the widget should automatically show the respective team work items according to the query provided.

Can someone guide us here? We failed in our initial attempts...

(otherwise current solution would be to create individual query for each teams, and manually configure this in the widget, this really not efficient when you have more than 20 teams...)

Thank you.

sam detweiler commented Feb 20 '14, 10:04 a.m. | edited Feb 20 '14, 10:04 a.m.

I am not aware of any way to query dashboards or team areas.  You can query workitems. and GET their team areas.  but I don't think that is useful.. as the current gadgets don't have much extensibility

Millard Ellingsworth commented Feb 20 '14, 12:07 p.m. | edited Feb 24 '14, 3:12 p.m.

There are widgets that autopopulate on a new team dashboard that set the team area. I think one of the challenges in your situation is that to look for work items for a team, you are really querying against Filed Against (a work item category) and it is possible to associate more than one work item category with a team. So there is no way to automatically create an association when the dashboard is created. 

CORRECTION: yes, @rmd2fe is correct, you can query on Team Area (though it is a "transitive" association -- you can't assign a work item to a Team Area, it gets that association via the FiledAgainst and PlannedFor attributes).

Ratheesh Madathil commented Feb 24 '14, 4:50 a.m. | edited Feb 24 '14, 12:43 p.m.

I dont think that associating more than one work item category with a team area could lead to any kind of trouble.
Because the basic query function still supports to query for work items against a team area.

Only challenge is to customize this query to a scope of filtering it for that "Team Area"

One answer

permanent link
Millard Ellingsworth (2.5k12431) | answered Feb 24 '14, 3:33 p.m.
Based on the discussion, I don't think this is currently possible. Unlike a Contributor value (e.g., Created by or Owned by) for which the query mechanism supports a pseudo-variable of "current user", there is no such capability for "current team" or "team for which this dashboard is intended". There is certainly some way in which widgets can be configured for a team during dashboard creation, but since the query mechanism can't use the value this, even if you work out that mechanism and can duplicate it, it's not going to get your query to work.

The closest thing I was able to come up with was telling the query that the Team Area should be selected when the query is run. When adding it to the dashboard, you are asked to choose the team area when you configure the query for the work items widget (it remembers and uses the value thereafter). This might make adding it to multiple dashboards a little less tedious. Maybe.

Madhu Revankar commented Feb 25 '14, 6:01 a.m. | edited Feb 25 '14, 12:10 p.m.


Your suggestion does not work when dashboards are designed in process configuration. Here the widgets can only consider queries from "Predefined Queries" list and Predefined Queries cannot have the dynamic values.

Please let me know if there is any way out to have dynamic values for predefined queries, this will already solve half of the problem, as you mentioned above.

Millard Ellingsworth commented Feb 25 '14, 12:48 p.m.

Your answer

Register or to post your answer.