Bug 501295 - Status Whiteboard field in search form doesn't match with usestatuswhiteboard param
Summary: Status Whiteboard field in search form doesn't match with usestatuswhiteboard...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Query/Bug List
Version: 3.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Noura El hawary
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-18 12:23 UTC by Noura El hawary
Modified: 2013-06-24 04:04 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-19 12:23:25 UTC
Embargoed:


Attachments (Terms of Use)
v1 for code to fix status whiteboard issue with search form (739 bytes, patch)
2009-05-18 12:27 UTC, Noura El hawary
dkl: review+
Details | Diff

Description Noura El hawary 2009-05-18 12:23:02 UTC
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 12:27:20 UTC
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 19:41:27 UTC
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 12:23:25 UTC
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.