Bug 457699

Summary: replace NEEDINFO status in saved queries with needinfo flag
Product: [Community] Bugzilla Reporter: Noura El hawary <nelhawar>
Component: Query/Bug ListAssignee: Noura El hawary <nelhawar>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2CC: dkl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-11 03:44:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
v1 script to replace NEEDINFO with needinfo? in saved queries none

Description Noura El hawary 2008-08-04 02:01:15 UTC
The NEEDINFO status has been deprecated from bugzilla 3.2 and all replaced with the needinfo flag, so saved queries need to be updated to have the NEEDINFO status replaced with the needinfo flag.

Noura

Comment 1 Noura El hawary 2008-08-06 10:28:25 UTC
it took me a while to figure that one out, Basically i thought that it was as easy as just replacing the NEEDINFO status in all saved queries to needinfo flag using boolean chart , but then this actually applied the needinfo flag as an AND to the rest of the search criteria not as an OR to the rest of the statuses ,, NEEDINFO status with other statuses in the saved query is meant to be in an OR with the rest of the statues.

how i solved it was to convert all the bug statuses in the saved query to a separate boolean chart with ORs between all the statuses that are not NEEDINFO and for NEEDINFO i included it in the OR as the flag needinfo? and that seemed to work fine for me , attaching shortly the script to do that.

basically i have done some testing on the bugs and bugs3 database on bz-db1 but my testing were based on my false first understanding so the saved queries there are messed up :(,, I will do a refresh for bugs database and use it to test my latest script that i tested on my localhost and seems to be fine.

also please not that there are some saved queries in bugzilla that look like that:

bug_severity=securityhighnormal
&bug_status=NEWASSIGNEDREOPENEDRESOLVEDNEEDINFO&chfieldto=Now
&cmdtype=asdefault&emailassigned_to1=1&emailreporter2=1&form_name=query
&order=Bug%20Number&priority=highnormal&product=Red%20Hat%20Linux
&rep_platform=i386&resolution=NOTABUGWONTFIXDEFERREDWORKSFORMECURRENTRELEASE
&version=7.0

I wasn't sure if they were good queries i think they maybe are old style ones that don't work ?? so i didn't worry about converting them.

Noura

Comment 2 Noura El hawary 2008-08-06 10:29:36 UTC
Created attachment 313548 [details]
v1 script to replace NEEDINFO with needinfo? in saved queries

Please review when you can.

Comment 3 David Lawrence 2008-11-07 16:36:35 UTC
Noura, has this been done already and can be closed or do we still need to do this?

Dave

Comment 4 Noura El hawary 2008-11-10 08:06:21 UTC
Dave, This still needs to be done. Please review the script when you can and i will do more testing on it and if all good then we can ask Matt or Meethune to run it for us.

Noura

Comment 5 David Lawrence 2008-11-10 16:33:34 UTC
Comment on attachment 313548 [details]
v1 script to replace NEEDINFO with needinfo? in saved queries

>    for my $status (@splitted_statuses) {
>
>        my $field
>            = "field$boolean_chart_count" . "-0-" . $or_boolean_chart_count;
>        my $type
>            = "type$boolean_chart_count" . "-0-" . $or_boolean_chart_count;
>        my $value
>            = "value$boolean_chart_count" . "-0-" . $or_boolean_chart_count;
>
>        if ( $status eq 'NEEDINFO' ) {
>            $cgi->param( -name => $field, -value => "flagtypes.name" );
>            $cgi->param( -name => $type,  -value => "equals" );
>            $cgi->param( -name => $value, -value => "needinfo%3F" );

Nit: Should you use url_quote('needinfo?') here? 

             $cgi->param( -name => $value, -value => url_quote("needinfo?") );

>        }
>
>        else {
>            $cgi->param( -name => $field, -value => "bug_status" );
>            $cgi->param( -name => $type,  -value => "equals" );
>            $cgi->param( -name => $value, -value => $status );
>
>        }

Just curious, why not just leave the rest of the bug statuses (after removing NEEDINFO) as the original CGI params instead f converting to booleans? Meaning why not just re-store them as bug_status=NEW&bug_status=MODIFIED&... etc.

Comment 6 Noura El hawary 2008-11-11 03:44:03 UTC
As Discussed with Dave in IRC, No body has complained about this so far, also it is a good chance for people to get used to the needinfo flag instead of the NEEDINFO status and get to change their queries.

Closing bug.

Noura