Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
742af401
You need to sign in or sign up before continuing.
Commit
742af401
authored
May 05, 2010
by
Jesse Clark
Committed by
Max Kanat-Alexander
May 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 180812: Make boolean charts involving both flags and attachments
limit the flag search based on the attachment criteria r=mkanat, a=mkanat
parent
9500ea01
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
Search.pm
Bugzilla/Search.pm
+27
-4
No files found.
Bugzilla/Search.pm
View file @
742af401
...
@@ -1693,9 +1693,9 @@ sub _attach_data_thedata {
...
@@ -1693,9 +1693,9 @@ sub _attach_data_thedata {
my
$atable
=
"attachments_$$chartid"
;
my
$atable
=
"attachments_$$chartid"
;
my
$dtable
=
"attachdata_$$chartid"
;
my
$dtable
=
"attachdata_$$chartid"
;
my
$extra
=
$self
->
{
'user'
}
->
is_insider
?
""
:
"AND $atable.isprivate = 0"
;
my
$extra
=
$self
->
{
'user'
}
->
is_insider
?
""
:
"AND $atable.isprivate = 0"
;
push
(
@$supptables
,
"
INNER
JOIN attachments AS $atable "
.
push
(
@$supptables
,
"
LEFT
JOIN attachments AS $atable "
.
"ON bugs.bug_id = $atable.bug_id $extra"
);
"ON bugs.bug_id = $atable.bug_id $extra"
);
push
(
@$supptables
,
"
INNER
JOIN attach_data AS $dtable "
.
push
(
@$supptables
,
"
LEFT
JOIN attach_data AS $dtable "
.
"ON $dtable.id = $atable.attach_id"
);
"ON $dtable.id = $atable.attach_id"
);
$$f
=
"$dtable.thedata"
;
$$f
=
"$dtable.thedata"
;
}
}
...
@@ -1708,7 +1708,7 @@ sub _attachments_submitter {
...
@@ -1708,7 +1708,7 @@ sub _attachments_submitter {
my
$atable
=
"map_attachment_submitter_$$chartid"
;
my
$atable
=
"map_attachment_submitter_$$chartid"
;
my
$extra
=
$self
->
{
'user'
}
->
is_insider
?
""
:
"AND $atable.isprivate = 0"
;
my
$extra
=
$self
->
{
'user'
}
->
is_insider
?
""
:
"AND $atable.isprivate = 0"
;
push
(
@$supptables
,
"
INNER
JOIN attachments AS $atable "
.
push
(
@$supptables
,
"
LEFT
JOIN attachments AS $atable "
.
"ON bugs.bug_id = $atable.bug_id $extra"
);
"ON bugs.bug_id = $atable.bug_id $extra"
);
push
(
@$supptables
,
"LEFT JOIN profiles AS attachers_$$chartid "
.
push
(
@$supptables
,
"LEFT JOIN profiles AS attachers_$$chartid "
.
"ON $atable.submitter_id = attachers_$$chartid.userid"
);
"ON $atable.submitter_id = attachers_$$chartid.userid"
);
...
@@ -1724,7 +1724,7 @@ sub _attachments {
...
@@ -1724,7 +1724,7 @@ sub _attachments {
my
$table
=
"attachments_$$chartid"
;
my
$table
=
"attachments_$$chartid"
;
my
$extra
=
$self
->
{
'user'
}
->
is_insider
?
""
:
"AND $table.isprivate = 0"
;
my
$extra
=
$self
->
{
'user'
}
->
is_insider
?
""
:
"AND $table.isprivate = 0"
;
push
(
@$supptables
,
"
INNER
JOIN attachments AS $table "
.
push
(
@$supptables
,
"
LEFT
JOIN attachments AS $table "
.
"ON bugs.bug_id = $table.bug_id $extra"
);
"ON bugs.bug_id = $table.bug_id $extra"
);
$$f
=~
m/^attachments\.(.*)$/
;
$$f
=~
m/^attachments\.(.*)$/
;
my
$field
=
$1
;
my
$field
=
$1
;
...
@@ -1772,12 +1772,19 @@ sub _flagtypes_name {
...
@@ -1772,12 +1772,19 @@ sub _flagtypes_name {
# Add the flags and flagtypes tables to the query. We do
# Add the flags and flagtypes tables to the query. We do
# a left join here so bugs without any flags still match
# a left join here so bugs without any flags still match
# negative conditions (f.e. "flag isn't review+").
# negative conditions (f.e. "flag isn't review+").
my
$attachments
=
"attachments_$$chartid"
;
my
$extra
=
$self
->
{
'user'
}
->
is_insider
?
""
:
"AND $attachments.isprivate = 0"
;
push
(
@$supptables
,
"LEFT JOIN attachments AS $attachments "
.
"ON bugs.bug_id = $attachments.bug_id $extra"
);
my
$flags
=
"flags_$$chartid"
;
my
$flags
=
"flags_$$chartid"
;
push
(
@$supptables
,
"LEFT JOIN flags AS $flags "
.
push
(
@$supptables
,
"LEFT JOIN flags AS $flags "
.
"ON bugs.bug_id = $flags.bug_id "
);
"ON bugs.bug_id = $flags.bug_id "
);
my
$flagtypes
=
"flagtypes_$$chartid"
;
my
$flagtypes
=
"flagtypes_$$chartid"
;
push
(
@$supptables
,
"LEFT JOIN flagtypes AS $flagtypes "
.
push
(
@$supptables
,
"LEFT JOIN flagtypes AS $flagtypes "
.
"ON $flags.type_id = $flagtypes.id"
);
"ON $flags.type_id = $flagtypes.id"
);
push
(
@$supptables
,
"LEFT JOIN flags AS $flags "
.
"ON $flags.attach_id = $attachments.attach_id "
.
"OR $flags.attach_id IS NULL"
);
# Generate the condition by running the operator-specific
# Generate the condition by running the operator-specific
# function. Afterwards the condition resides in the global $term
# function. Afterwards the condition resides in the global $term
...
@@ -1807,11 +1814,19 @@ sub _requestees_login_name {
...
@@ -1807,11 +1814,19 @@ sub _requestees_login_name {
my
%
func_args
=
@_
;
my
%
func_args
=
@_
;
my
(
$f
,
$chartid
,
$supptables
)
=
@func_args
{
qw(f chartid supptables)
};
my
(
$f
,
$chartid
,
$supptables
)
=
@func_args
{
qw(f chartid supptables)
};
my
$attachments
=
"attachments_$$chartid"
;
my
$extra
=
$self
->
{
'user'
}
->
is_insider
?
""
:
"AND $attachments.isprivate = 0"
;
push
(
@$supptables
,
"LEFT JOIN attachments AS $attachments "
.
"ON bugs.bug_id = $attachments.bug_id $extra"
);
my
$flags
=
"flags_$$chartid"
;
my
$flags
=
"flags_$$chartid"
;
push
(
@$supptables
,
"LEFT JOIN flags AS $flags "
.
push
(
@$supptables
,
"LEFT JOIN flags AS $flags "
.
"ON bugs.bug_id = $flags.bug_id "
);
"ON bugs.bug_id = $flags.bug_id "
);
push
(
@$supptables
,
"LEFT JOIN profiles AS requestees_$$chartid "
.
push
(
@$supptables
,
"LEFT JOIN profiles AS requestees_$$chartid "
.
"ON $flags.requestee_id = requestees_$$chartid.userid"
);
"ON $flags.requestee_id = requestees_$$chartid.userid"
);
push
(
@$supptables
,
"LEFT JOIN flags AS $flags "
.
"ON $flags.attach_id = $attachments.attach_id "
.
"OR $flags.attach_id IS NULL"
);
$$f
=
"requestees_$$chartid.login_name"
;
$$f
=
"requestees_$$chartid.login_name"
;
}
}
...
@@ -1820,11 +1835,19 @@ sub _setters_login_name {
...
@@ -1820,11 +1835,19 @@ sub _setters_login_name {
my
%
func_args
=
@_
;
my
%
func_args
=
@_
;
my
(
$f
,
$chartid
,
$supptables
)
=
@func_args
{
qw(f chartid supptables)
};
my
(
$f
,
$chartid
,
$supptables
)
=
@func_args
{
qw(f chartid supptables)
};
my
$attachments
=
"attachments_$$chartid"
;
my
$extra
=
$self
->
{
'user'
}
->
is_insider
?
""
:
"AND $attachments.isprivate = 0"
;
push
(
@$supptables
,
"LEFT JOIN attachments AS $attachments "
.
"ON bugs.bug_id = $attachments.bug_id $extra"
);
my
$flags
=
"flags_$$chartid"
;
my
$flags
=
"flags_$$chartid"
;
push
(
@$supptables
,
"LEFT JOIN flags AS $flags "
.
push
(
@$supptables
,
"LEFT JOIN flags AS $flags "
.
"ON bugs.bug_id = $flags.bug_id "
);
"ON bugs.bug_id = $flags.bug_id "
);
push
(
@$supptables
,
"LEFT JOIN profiles AS setters_$$chartid "
.
push
(
@$supptables
,
"LEFT JOIN profiles AS setters_$$chartid "
.
"ON $flags.setter_id = setters_$$chartid.userid"
);
"ON $flags.setter_id = setters_$$chartid.userid"
);
push
(
@$supptables
,
"LEFT JOIN flags AS $flags "
.
"ON $flags.attach_id = $attachments.attach_id "
.
"OR $flags.attach_id IS NULL"
);
$$f
=
"setters_$$chartid.login_name"
;
$$f
=
"setters_$$chartid.login_name"
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment