Defect Trend Graph by Specific Dates (1620 Views)
Reply
Occasional Advisor
Holly Barsamian
Posts: 14
Registered: ‎05-30-2008
Message 1 of 10 (1,620 Views)

Defect Trend Graph by Specific Dates

We are on QC 9.2 patch 26. We use the canned QC defect reports for Trending quite a bit during projects. However those reports only come with four options for the "period" of the report that we can view: Last 7 Days, Last 5 Weeks, Last 12 months, and All Days (where All Days just shows a whole year).

We have the need to specifically pick the start and end dates of a project to see the trends throughout the project timeline. For example, from March 1 2010 to June 15 2010. Does anyone know if this can be done?
Honored Contributor
Rhonda Robinson
Posts: 3,159
Registered: ‎11-13-2007
Message 2 of 10 (1,620 Views)

Re: Defect Trend Graph by Specific Dates

Can you run the report for the 12 months group and then grab the graph data, paste it into Excel, remove the unnecessary dates and have excel create your "new" graph?
Occasional Advisor
Holly Barsamian
Posts: 14
Registered: ‎05-30-2008
Message 3 of 10 (1,620 Views)

Re: Defect Trend Graph by Specific Dates

I was hoping for a solution within QC that won't involve a lot of manual work.

I did look at what you suggested, however. I am not sure how to 'grab the graph data'. I can view the data underneath each period in the report (i.e. it groups it per month even when I specify 'All Days'), but there is no option to 'export to excel' or even copy/paste or anything like that for the detailed data.
Honored Contributor
Rhonda Robinson
Posts: 3,159
Registered: ‎11-13-2007
Message 4 of 10 (1,620 Views)

Re: Defect Trend Graph by Specific Dates

After the graph has been created, select the Data Grid tab at the top. This gives you each of the numbers used as graph points. You can then click Save As and select Excel. Once the graph points are in Excel, you would then need to create an Excel Graph using those data points.
Occasional Advisor
Holly Barsamian
Posts: 14
Registered: ‎05-30-2008
Message 5 of 10 (1,620 Views)

Re: Defect Trend Graph by Specific Dates

Rhonda, thanks. I know about this option, but the problem is that QC only has the data in the grid at a level that is too high for what I need (see the attachment). It stores it a month level. To get the reports to work that our mgmt would like, I would need to see each individual defect and its related information so that I could choose specific date ranges to report on. The way I can do this given the method you've stated is that I can click on every cell in this data grid, get the corresponding defect information, and copy/paste that to excel. But then I need to click on the next cell in the data grid, get that detailed information, then the next cell, etc. So ... it can be done but it will be very manual, both to get the data into excel and then of course I'll have to manipulate it and get a report I want.

Anyone know any other 'quick' way to manipulate QC for the info?
Regular Advisor
HarmonyB
Posts: 175
Registered: ‎09-02-2008
Message 6 of 10 (1,620 Views)

Re: Defect Trend Graph by Specific Dates

Hi Holly,

If I correctly understand your requirements, it looks like I may be working on something very similar.

I just completed my query, and it seems to run all right -- but I wouldn't mind another set of eyes on the code.

All my code is in my post, located here:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1436208

I hope this helps you. Please let me know.

Thanks,

Harmony
Occasional Advisor
Holly Barsamian
Posts: 14
Registered: ‎05-30-2008
Message 7 of 10 (1,620 Views)

Re: Defect Trend Graph by Specific Dates

Thanks HarmonyB. I took your code and tried to use it. However this is definitely complex for me, I would call my SQL skills basic at best! I have been able to manipulate it to get our custom statuses that I want. However from your notes it looks like it can be customized to a different number than just four Fridays past? How would I do this? I tried to change the 4 to an 8 (i.e. the last 8 Fridays) in these two locations but it did not work:

where bg_detection_date between DATEADD(wk, DATEDIFF(wk,28,getdate()), 4)
and DATEADD(wk, DATEDIFF(wk,0,getdate()), 4)
Regular Advisor
HarmonyB
Posts: 175
Registered: ‎09-02-2008
Message 8 of 10 (1,620 Views)

Re: Defect Trend Graph by Specific Dates

Try changing it back to what I originally had, and then change the '28' value to the number of prior weeks you want -- in this example, 28 = 4 prior weeks.

Let me know if that helps.

My SQL skills are also basic, but I have joined some new forums to try to learn from those who are a lot more advanced than I am. :)
Occasional Advisor
Holly Barsamian
Posts: 14
Registered: ‎05-30-2008
Message 9 of 10 (1,620 Views)

Re: Defect Trend Graph by Specific Dates

Got it, thanks! I need to do a little more customizing to get it to be what we want, but I think this will work. I appreciate your help!
Frequent Visitor
Chilkuri
Posts: 2
Registered: ‎06-29-2011
Message 10 of 10 (1,618 Views)

Re: Defect Trend Graph by Specific Dates

can you please provide your code as i am able to find withyou provided link
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.