Bug 447263 - catalog provided the wrong sysreport hyperlink in test run information section
catalog provided the wrong sysreport hyperlink in test run information section
Status: CLOSED CURRENTRELEASE
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Hardware Catalog (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: XINSUN
Yu Shao
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-19 03:28 EDT by QinXie
Modified: 2008-08-04 13:56 EDT (History)
6 users (show)

See Also:
Fixed In Version: 3.2rh-20080801.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-08-04 13:56:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
the link url of sysreport on storage line (76.61 KB, image/png)
2008-05-19 03:28 EDT, QinXie
no flags Details
the link url of sysreport on info line (78.73 KB, image/png)
2008-05-19 03:30 EDT, QinXie
no flags Details
Patch fix. (1.29 KB, patch)
2008-06-23 23:16 EDT, XINSUN
no flags Details | Diff
Patch Improve: (2.60 KB, patch)
2008-07-23 03:04 EDT, XINSUN
no flags Details | Diff

  None (edit)
Description QinXie 2008-05-19 03:28:52 EDT
Description of problem:

For the same rpm package, the sysreport link in info test line(this one is
correct) is differerent with the one in storage test line(this one is wrong).

eg: bug#446029, package (id=305596)
the sysreport hyperlink of storage line link to
https://hardware.redhat.com/sysreport.cgi?cert_id=446029&id=137123
the sysreport hyperlink of info line link to
https://hardware.redhat.com/sysreport.cgi?cert_id=446029&id=137124

I copied the screen and attached them.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 QinXie 2008-05-19 03:28:52 EDT
Created attachment 305909 [details]
the link url of sysreport on storage line
Comment 2 QinXie 2008-05-19 03:30:25 EDT
Created attachment 305910 [details]
the link url of sysreport on info line

the link url of sysreport on info line
Comment 3 XINSUN 2008-06-23 23:09:54 EDT
This bug is caused by not set the default value of h.sysreport in the template.


============================================================================
          <td align="center">
            [% t.type FILTER html IF t.hardware.size == 0 %]
            [% FOREACH h = t.hardware %]
            <a href="hardware.cgi?cert_id=[% bug.bug_id FILTER url_quote
%]&id=[% h.id FILTER url_quote %]">
            [% t.type FILTER html %]</a>
            [% END %]</td>


          <td class="last-column">
            [% IF h.sysreport %]  //h.sysreport need to be set NULL,When no
hardware info exists (IF t.hardware.size == 0)
              <a href="sysreport.cgi?cert_id=[% bug.bug_id FILTER url_quote
%]&id=[% h.id FILTER url_quote %]">sysreport</a>
            [% ELSIF r.test_wav %]


Patch has been summited, pls review,


Best Regards!
Nicho

===============================================================================
Comment 4 XINSUN 2008-06-23 23:16:19 EDT
Created attachment 310104 [details]
Patch fix.

1.Set the default value (NULL) of hardware array ( [% h = [] %] ). in case the
wrong link for sysreport (h.sysreport).
2. Adjust the run sequence of  [% FOREACH r = t.runs %] and [% t.status FILTER
html IF t.runs.size == 0 %]. 
3.Set the defult value (NULL) of  runs array. ( [% r = [] %] )

And test well.
Comment 5 Rob Landry 2008-07-17 16:34:00 EDT
Patch looks ok, please provide a test URL.
Comment 7 Rob Landry 2008-07-18 14:56:39 EDT
Test site looks good to me, please check with dkl or other eng-ops; the fix
seems more indicative of a template toolkit bug; since the h variable being
cleared by the [] should be the global and should not impact the h variable used
by the for loop as it should be defining it's own local h which is reset by the
t. values as defined in the for statement.  Given that this patch works it is
perhaps simply that there is no equivalent "for my $foo in @bar" in template
toolkit markup?
Comment 11 eric_liu 2008-08-01 06:29:56 EDT
tested and run good

Note You need to log in before you can comment on or make changes to this bug.