This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 457699 - replace NEEDINFO status in saved queries with needinfo flag
replace NEEDINFO status in saved queries with needinfo flag
Status: CLOSED WONTFIX
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: 2008-08-03 22:01 EDT by Noura El hawary
Modified: 2013-06-24 00:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-10 22:44:03 EST
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 script to replace NEEDINFO with needinfo? in saved queries (4.44 KB, text/plain)
2008-08-06 06:29 EDT, Noura El hawary
no flags Details

  None (edit)
Description Noura El hawary 2008-08-03 22:01:15 EDT
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 06:28:25 EDT
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 06:29:36 EDT
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 11:36:35 EST
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 03:06:21 EST
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 11:33:34 EST
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-10 22:44:03 EST
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

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