Bug 457699 - replace NEEDINFO status in saved queries with needinfo flag
Summary: replace NEEDINFO status in saved queries with needinfo flag
Alias: None
Product: Bugzilla
Classification: Community
Component: Query/Bug List
Version: 3.2
Hardware: All
OS: Linux
medium vote
Target Milestone: ---
Assignee: Noura El hawary
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2008-08-04 02:01 UTC by Noura El hawary
Modified: 2013-06-24 04:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-11-11 03:44:03 UTC

Attachments (Terms of Use)
v1 script to replace NEEDINFO with needinfo? in saved queries (4.44 KB, text/plain)
2008-08-06 10:29 UTC, Noura El hawary
no flags Details

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.


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:


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.


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?


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.


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.


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