I'm trying to pull a monthly report divided by weeks to see how many tickets moved from "Open" to "Resolved" per week. The tickets could have be created even before the month started.
I'm using the JIRA reports so I can pull it divided by weeks.But since I'm pulling the query at the end of the month, the problem is that the issue that was resolved in the 3rd week for example show up would just show under the numbers of the 1st week(since its only checking if the status is closed or resolved right now) which isn't what I want. Is there any "change of status on a particular time range" filter that i can use or maybe a query condition
This is my starting query:
issuetype in (Bug) AND status in (Closed, Resolved) AND created >= 2021-03-01 ORDER BY resolved DESC, created DESC
You could use status CHANGED FROM "Open" to "Resolved" to monitor the change of status
And DURING (Date1, Date2) to get the week that you want:
The new query would look something like this:
issuetype IN (Bug) AND status CHANGED FROM "Open" TO "Resolved" DURING (2021-03-01, 2021-03-02) ORDER BY resolved DESC, created DESC
Related
I'd like to exclude issues who have a given status based on the current date, but can't figure out how to do it with startOfWeek() now() etc. Because those must filter on an issue field.
Eg:
AND NOT (status IN ("In review") AND now() BETWEEN (startOfWeek(-2), startOfWeek(1)))
Is there a trick that I can use to get the current time from an issue field? Eg some issue field that is aliased to now()?
You most probably need changed operator. This will filter out all the issues with status In Review that were changed:
status in ("In review") AND status changed DURING (startOfWeek(-2), startOfWeek(1))
You could use updateDate if you want to check for the issues that have been updated in that time period and are in the given status.
If you want to check for the date of the transition into this status, this is a bit more involved. Could you elaborate what you actually need to have happened in this time period for the issues to qualify if updatedDate doesn't do the trick?
I have a particular data set that consists of information for projects our company works on. Each project can go through five different statuses and we have a column that records each date the project is put into that particular status.
Now for the Excel part. We are trying to calculate the days in each status and find the total project time. The total is easy to do, because I can use network days between the project submitted date and the project go live date. The statuses, however, are giving me issues because sometimes a project will skip a status, leaving the date field empty. So what happens is a project goes from status B to status D, the formula for days in status "B" look for a date in column "C" to use as the second date in a NETWORKDAYS formula. When it is empty, the IF argument tells the formula to use TODAY() as the second date. What I need it to do is the search the columns to the right (within the given range of A:E for that row) and use that date if it exists. If not, then it can default to TODAY() because this would be an "active" project that has not moved on.
=IF(IF(OR([#STALLED]<>"",[#CANCELED]<>""),"",IF([#INTAKEDATE]="","",IF([#SCOPEATE]="",NETWORKDAYS([#INTAKEDATE],TODAY()),(NETWORKDAYS([#STATUSADATE],[#SCOPEATE])))))<0,"",(IF(OR([#STALLED]<>"",[#CANCELED]<>""),"",IF([#INTAKEDATE]="","",IF([#SCOPEATE]="",NETWORKDAYS([#INTAKEDATE],TODAY()),(NETWORKDAYS([#STATUSADATE],[#SCOPEATE])))))))
This is done for each of the statuses so the table looks something like this:
PROJECTID PROJECTNAME INTAKEDATE SCOPEATE BUILDDATE TESTDATE GOLIVEDATE INTAKEDAYS SCOPEDAYS BUILDDAYS TESTDAYS
If there is any Macro or better formula someone could help me figure out, I'd appreciate it. There is also another field that gives the current status or if the project is considered live if that helps at all. I have excel-block right now and cant think of anything that makes sense for this.
So I figured it out using MIN and by adjusting the IF formulas a bit. Whoever it was that posted about MAX earlier, really helped me out getting me down this path. Kudos to you sir/madam.
I had to add the check to see if SCOPEDATE=BUILDDATE because without that it was returning 1 if the dates matched, with was adding one more day when compared to running the networkdays from INTAKEDATE to GOLIVEDATE.
=IF(OR([#STALLED]<>"",[#CANCELED]<>""),"",
IF([#SCOPEDATE]="","",
IF([#SCOPEDATE]=[#BUILDDATE],0,
IF(NETWORKDAYS([#SCOPEDATE],(MIN([#BUILDDATE],[#TESTDATE],[#GOLIVEDATE])))<0,NETWORKDAYS([#SCOPEDATE],TODAY()),NETWORKDAYS([#SCOPEDATE],(MIN([#BUILDDATE],[#TESTDATE],[#GOLIVEDATE])))))))
I hope this is helpful for someone else.
I have a task at hand, where i need to create a report with defect id, time the defect was in a particular status, In HP QC SPS.
The issue at hand is (for example) , if the status changed from 'new' to 'open in analysis', then to 'under investigation' and then changed it back to 'open in analysis'. the report should capture the time spend under each status. which means twice the status was 'open in analysis', so that time needs to be added and captured.
how can i achieve this.
can some one help me with a SQL query for the same?
I don't know what "HP QC SPS" means - should I? Does it understand Oracle SQL?
If it does: if your table has three columns, defect_id, ts (timestamp) and status, you need to compute the time in each status for each occurrence (even for the same defect_id) by using the lead() analytic function, partitioning by defect_id and ordering by ts; and then you need to group by defect_id and status and SUM(<these differences>).
If you want an illustration, I want one too. You provide input data, I show you how this works. While you are at it, please explain what happens with a status that is "current" (the last entry for a defect_id - unless the last status is resolved or closed).
Probably get shot for posting this again but last attempt was put on hold so sorry in advance. i am very new at this so apologies if its a simple answer;
I created a table with name of purchaser, items purchased, date of purchase and cost of purchase. From that i wanted to create a report that would show each purchasers name only once with a combined total cost of all purchases.
I created a query that did just that using only the purchasers name and the total cost of their purchases. I then created the report from that query.
The report shows each name once with a total cost of purchases which was great except for the query continually adds those total purchases without the ability to select a date range and likewise the report shows the same info.
When i add the purchased date to the query/report so i can filter between 2 date ranges it then shows each name "X" amount of times with a total for each purchase made which is not what i am looking for as this ends up with a long report.
Hope this makes more sense than my last attempt at this question. I am very new at this so a simple answer would be great.
Thanks in advance
You need to get two parameters for the query, say [Start] and [End].
You need to add the date column twice so that it can be compared to [Start] AND [End]
You need to add the date column (on both occasions) with a Total "Where"; this tells access that the column has no other purpose than to impact a WHERE-constraint on the base dataset.
If you run into trouble, take the SQL below, correct all names in it, paste it into the query's SQL view, and then see what the design view looks like!
SELECT table.customer, Sum(table.price) AS sum
FROM table
WHERE (((table.date)>=[Start]) AND ((table.date)<=[End]))
GROUP BY table.customer;
i'm looking for the TracQuery for the trac report to get all tickets without assigned milestone listed. have you already composed this query, if yes, would you share it? thx in advance.
Something like this should do it, adapt to suit your precise needs....
SELECT
id AS ticket,
datetime(time,'unixepoch'),
summary,
status,
priority,
description AS _description
FROM ticket t
WHERE t.milestone is NULL AND t.status<>'closed'
ORDER BY time desc, status, severity, summary
The key part for you is simply to filter on the milestone being NULL.
I could reproduce the 'No matches found' for the answer by Paul Dixon, so I tried it on my own:
SELECT
id AS ticket,
time AS date,
summary,
status,
priority,
description AS _description
FROM ticket t
WHERE t.milestone not in (
SELECT name
FROM milestone
)
AND t.status<>'closed'
ORDER BY time desc, status, severity, summary
Note: Trac has some "magic" result table column names. Assigning 'date' will do the appropriate conversation of time stamp integer to date string automagically - even better - respecting the current internal Trac time stamp format of POSIX micro-seconds (since Trac 0.12) too. In this respect the SQL statement above is even the most portable solution I'm aware of.
This is quite simple using Trac's query language instead of raw SQL. On a wiki page, you can use query:milestone= to create a link to a query of all tickets without a milestone assigned. Invoke the macro [[TicketQuery(milestone=)]] to insert the list of matching tickets into the wiki page.
To do the same thing on the "Custom Query" page, remove all search criteria and add a single criteria of "milestone" "is" and leave the third field blank.