History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-907
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: Steve Luo
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
QuickBuild

QB notification error : Links issue

Created: 12/May/11 02:10 PM   Updated: 18/May/11 07:02 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.1.40

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown



 All   Comments   Work Log   Change History      Sort Order:
Amit Pandey [13/May/11 11:32 AM]
Hi Robin,

Can you kindly update, when the fix can be expected for this issue?

Regards,
Amit

Change by Steve Luo [13/May/11 01:05 PM]
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.1.40 [ 11259 ]
Resolution Fixed [ 1 ]

Steve Luo [13/May/11 01:07 PM]
The reportset.baseUrl now should change to below for later use.

#set($reportUrl = $build.url + $reportset.baseUrl)




Amit Pandey [16/May/11 08:25 AM]
No, this is not working.

I added this in the notification template:

   #if ($build.reports.junit)
        #foreach ($reportset in $build.reports.junit.values())

                <!--AmitP : Modified reportURL as per http://track.pmease.com/browse/QB-907 -->
                #set($reportUrl = $build.url + $reportset.baseUrl)
                #set($stats = $reportset.stats)
                <h3>#if ($stats.errors + $stats.failures > 0)

But this reportURL is malformed as it lloks like "http://&lt;&lt;QB_VIP&gt;&gt;/build/209614http://&lt;&lt;QB_SERVER:PORT&gt;&gt;/build/209614/junit_report/by_tests

Problem is, I can replace $reportset.baseUrl by $build.url. But i can't get that report name i.e. "junit_report" or "cobertura", I am not able to fetch that.

-Amit

Amit Pandey [16/May/11 09:20 AM]
I'll be glad if you can share the attributes available for $reportset. As I'd like to fetch report name from it like junit_report or cobertura_report, which is available in $reportset.baseUrl.

Amit Pandey [16/May/11 10:23 AM]
For the time being, I had to hard code the reportUrl as below:

#set($reportUrl = $build.url + "/junit_report")

then used it as:
<strong><a href="$reportUrl/by_tests" class="primary-value">$stats.tests</a></strong> tests (
                        <strong><a href="$reportUrl/failed_tests" style="color:#FF1A00">$stats.errors</a></strong> errors/
                        <strong><a href="$reportUrl/failed_tests" style="color:#FF7400">$stats.failures</a></strong> failures)

And
#set($reportUrl = $build.url + "/cobertura_report")

then used it as:
<a href="$reportUrl" class="more">Read more...</a>
 <tr><td colspan="4"><a href="$reportUrl" class="more">Read details</a></td>

But, in order to use it for other projects which generate different reports, I still need to amek similar changes.

A better idea than my current workaround will be much appreciated.

Regards,A
mit

Steve Luo [16/May/11 01:36 PM]
Hi Amit,
Do you upgrade to QB 3.1.40, it seems the url for below expression:

#set($reportUrl = $build.url + $reportset.baseUrl)

is using an old quickbuild.

Steve Luo [16/May/11 01:44 PM]
The attributes for $reportset will be documented later after QuickBuild 4.0 release. Currently, I can just give a short description here:

1. $reportset.baseUrl which is used to get a relative path for a specific report category, for example, the baseUrl of JUnit report is: /junit_report, and the NUnit report is: /nunit_report

2. $reportset.stats which is the basic statistics data for a specific report category of a specific reportset

3. $reportset.rows which stores the data report for a specific report category of a specific reportset so that you can use it to create the table in your mail.