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
e759f3b2
Commit
e759f3b2
authored
Oct 15, 2001
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 99716 - allow query for Attachment is obsolete AND Attachment Status. Patch…
Bug 99716 - allow query for Attachment is obsolete AND Attachment Status. Patch by myk, r=justdave, jake.
parent
794c7b04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
buglist.cgi
buglist.cgi
+23
-7
No files found.
buglist.cgi
View file @
e759f3b2
...
...
@@ -336,6 +336,8 @@ sub GenerateSQL {
}
my
$chartid
;
# $statusid is used by the code that queries for attachment statuses.
my
$statusid
=
0
;
my
$f
;
my
$ff
;
my
$t
;
...
...
@@ -389,7 +391,8 @@ sub GenerateSQL {
},
"^attachments\..*,"
=>
sub
{
my
$table
=
"attachments_$chartid"
;
push
(
@supptables
,
"LEFT JOIN attachments $table ON bugs.bug_id = $table.bug_id"
);
push
(
@supptables
,
"attachments $table"
);
push
(
@wherepart
,
"bugs.bug_id = $table.bug_id"
);
$f
=~
m/^attachments\.(.*)$/
;
my
$field
=
$1
;
if
(
$t
eq
"changedby"
)
{
...
...
@@ -408,19 +411,32 @@ sub GenerateSQL {
$field
=
"creation_ts"
;
$t
=
"greaterthan"
;
}
if
(
$field
eq
"ispatch"
)
{
if
(
$v
ne
"0"
&&
$v
ne
"1"
)
{
return
Error
(
"The only legal values for the 'Attachment is patch' field is 0 or 1."
);
}
if
(
$field
eq
"ispatch"
&&
$v
ne
"0"
&&
$v
ne
"1"
)
{
return
Error
(
"The only legal values for the 'Attachment is patch' "
.
"field are 0 and 1."
);
}
if
(
$field
eq
"isobsolete"
&&
$v
ne
"0"
&&
$v
ne
"1"
)
{
return
Error
(
"The only legal values for the 'Attachment is obsolete' "
.
"field are 0 and 1."
);
}
$f
=
"$table.$field"
;
},
# 2001-05-16 myk@mozilla.org: enable querying against attachment status
# if this installation has enabled use of the attachment tracker.
"^attachstatusdefs.name,"
=>
sub
{
# When searching for multiple statuses within a single boolean chart,
# we want to match each status record separately. In other words,
# "status = 'foo' AND status = 'bar'" should match attachments with
# one status record equal to "foo" and another one equal to "bar",
# not attachments where the same status record equals both "foo" and
# "bar" (which is nonsensical). In order to do this we must add an
# additional counter to the end of the "attachstatuses" and
# "attachstatusdefs" table references.
++
$statusid
;
my
$attachtable
=
"attachments_$chartid"
;
my
$statustable
=
"attachstatuses_$
chart
id"
;
my
$statusdefstable
=
"attachstatusdefs_$
chart
id"
;
my
$statustable
=
"attachstatuses_$
{chartid}_$status
id"
;
my
$statusdefstable
=
"attachstatusdefs_$
{chartid}_$status
id"
;
push
(
@supptables
,
"attachments $attachtable"
);
push
(
@supptables
,
"attachstatuses $statustable"
);
push
(
@supptables
,
"attachstatusdefs $statusdefstable"
);
...
...
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