It's all about the answers!

Ask a question

How can I set "this week or this month" in query condition?


chen fengmiao (7032932) | asked Feb 27 '13, 9:54 p.m.

I want to create a query that how many workItems were created this week or this month On RTC.

But I don't know how to set the query condition. Because the creation date hasn't  this week or this month option...

3 answers



permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Feb 28 '13, 7:14 a.m.
JAZZ DEVELOPER
Hi,

I don't think there is a built in way to query for this week or this month.  As you saw, you can query for the work items created in the last 7 days or the last month.  The workaround would be to manually update the queries at the beginning of every week and month.

Depending on what you're trying to do, you could also use the Java API to programmatically query for work items in the last week or month.  https://jazz.net/wiki/bin/view/Main/QueryDevGuide has examples of how to get started.

permanent link
Christophe Lucas (86234948) | answered Feb 28 '13, 9:27 a.m.
Chen, if in your query, you use the condition 'after (including) ... 7 days ago' or 'after (including) ... 31 days ago' on 'Creation Date', this will provide you with all work items which were created in the past week or past month ... isn't that what you are looking for ?

permanent link
kesav d (19117) | answered Mar 29 '17, 2:15 p.m.

 another around would be creating a enumeration list like week 1 week 2 week 3 week 4 week 5 and add with work item during creation.

Or any script based default value  can fetch u the week number 

Your answer


Register or to post 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.