Bug 501295 - Status Whiteboard field in search form doesn't match with usestatuswhiteboard param
Status Whiteboard field in search form doesn't match with usestatuswhiteboard...
Status: CLOSED NEXTRELEASE
Product: Bugzilla
Classification: Community
Component: Query/Bug List (Show other bugs)
3.2
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: Noura El hawary
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-18 08:23 EDT by Noura El hawary
Modified: 2013-06-24 00:04 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-19 08:23:25 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)
v1 for code to fix status whiteboard issue with search form (739 bytes, patch)
2009-05-18 08:27 EDT, Noura El hawary
dkl: review+
Details | Diff

  None (edit)
Description Noura El hawary 2009-05-18 08:23:02 EDT
running the selenium test  t/testsuite/126_test_status_whiteboard.t uncovered an error in the search form, which is the status whiteboard field is always included in the search form whether the usestatuswhiteboard param is turned on or off, when looking at the code of the template template/en/default/search/form.html.tmpl I found that the code for checking the param is missing from the template comparing it to the upstream original code.

Noura
Comment 1 Noura El hawary 2009-05-18 08:27:20 EDT
Created attachment 344427 [details]
v1 for code to fix status whiteboard issue with search form

added missing code that checks usestatuswhiteboard param to determine whether to add the status whiteboard field or not to the search form.

Noura
Comment 2 David Lawrence 2009-05-18 15:41:27 EDT
Comment on attachment 344427 [details]
v1 for code to fix status whiteboard issue with search form

>Index: template/en/default/search/form.html.tmpl
>===================================================================
>--- template/en/default/search/form.html.tmpl	(revision 1267)
>+++ template/en/default/search/form.html.tmpl	(working copy)
>@@ -271,7 +271,9 @@
>     { name => "status_whiteboard", description => "Status <u>W</u>hiteboard",
>       accesskey => 'w' } 
>     ] %]
>-    
>+
>+    [% UNLESS field.name == 'status_whiteboard' AND NOT Param('usestatuswhiteboard') %]
>+     

Nit-pick: Perl Best Practices #66 says we should not use unless where if would work as well to help avoid confusion
of those coming from other languages that do not have negative conditional tests. Maybe use instead

    [% IF field.name == 'status_whiteboard' AND Param('usestatuswhiteboard') %]

But I leave this up to you if want to leave it as this technically works for me as well.

Dave


>     <tr>
>       <th align="right">
>         <label for="[% field.name %]" accesskey="[% field.accesskey %]">[% field.description %]</label>:
>@@ -290,6 +292,7 @@
>       </td>
>       <td></td>
>     </tr>
>+    [% END %]
>   [% END %]
> 
>   [% IF have_keywords %]
Comment 3 Noura El hawary 2009-05-19 08:23:25 EDT
Thanks for the review Dave,, I am going to leave it to UNLESS caze it is the original code of upstream that was deleted from our template.  

Noura

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