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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
19ca3aa8
Commit
19ca3aa8
authored
Mar 24, 1999
by
terry%netscape.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Can now query for a specified field being changed at a specified time,
optionally to a specified value.
parent
57f0b7a2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
5 deletions
+87
-5
CHANGES
CHANGES
+5
-0
buglist.cgi
buglist.cgi
+52
-0
globals.pl
globals.pl
+1
-0
makeactivitytable.sh
makeactivitytable.sh
+2
-2
query.cgi
query.cgi
+27
-3
No files found.
CHANGES
View file @
19ca3aa8
...
@@ -10,6 +10,11 @@ query the CVS tree. For example,
...
@@ -10,6 +10,11 @@ query the CVS tree. For example,
will tell you what has been changed in the last week.
will tell you what has been changed in the last week.
3/22/99 Added the ability to query by fields which have changed within a date
range. To make this perform a bit better, we need a new index:
alter table bugs_activity add index (field);
3/10/99 Added 'groups' stuff, where we have different group bits that we can
3/10/99 Added 'groups' stuff, where we have different group bits that we can
put on a person or on a bug. Some of the group bits control access to bugzilla
put on a person or on a bug. Some of the group bits control access to bugzilla
features. And a person can't access a bug unless he has every group bit set
features. And a person can't access a bug unless he has every group bit set
...
...
buglist.cgi
View file @
19ca3aa8
...
@@ -23,6 +23,7 @@ use diagnostics;
...
@@ -23,6 +23,7 @@ use diagnostics;
use
strict
;
use
strict
;
require
"CGI.pl"
;
require
"CGI.pl"
;
use
Date::
Parse
;
my
$serverpush
=
1
;
my
$serverpush
=
1
;
...
@@ -340,6 +341,57 @@ Click the <B>Back</B> button and try again.";
...
@@ -340,6 +341,57 @@ Click the <B>Back</B> button and try again.";
}
}
}
}
my
$ref
=
$::MFORM
{
'chfield'
};
sub
SqlifyDate
{
my
(
$str
)
=
(
@_
);
if
(
!
defined
$str
)
{
$str
=
""
;
}
my
$date
=
str2time
(
$str
);
if
(
!
defined
$date
)
{
print
"The string '<tt>$str</tt>' is not a legal date.\n"
;
print
"<P>Please click the <B>Back</B> button and try again.\n"
;
exit
;
}
return
time2str
(
"'%Y/%m/%d %H:%M:%S'"
,
$date
);
}
if
(
defined
$ref
&&
0
<
@$ref
)
{
# Do surgery on the query to tell it to patch in the bugs_activity
# table.
$query
=~
s/bugs,/bugs, bugs_activity,/
;
my
@list
;
foreach
my
$f
(
@$ref
)
{
push
(
@list
,
"\nbugs_activity.field = "
.
SqlQuote
(
$f
));
}
$query
.=
"and bugs_activity.bug_id = bugs.bug_id and ("
.
join
(
' or '
,
@list
)
.
") "
;
$query
.=
"and bugs_activity.when >= "
.
SqlifyDate
(
$::FORM
{
'chfieldfrom'
})
.
"\n"
;
my
$to
=
$::FORM
{
'chfieldto'
};
if
(
defined
$to
)
{
$to
=
trim
(
$to
);
if
(
$to
ne
""
&&
$to
!~
/^now$/i
)
{
$query
.=
"and bugs_activity.when <= "
.
SqlifyDate
(
$to
)
.
"\n"
;
}
}
my
$value
=
$::FORM
{
'chfieldvalue'
};
if
(
defined
$value
)
{
$value
=
trim
(
$value
);
if
(
$value
ne
""
)
{
$query
.=
"and bugs_activity.newvalue = "
.
SqlQuote
(
$value
)
.
"\n"
;
}
}
}
foreach
my
$f
(
"short_desc"
,
"long_desc"
,
"bug_file_loc"
,
foreach
my
$f
(
"short_desc"
,
"long_desc"
,
"bug_file_loc"
,
"status_whiteboard"
)
{
"status_whiteboard"
)
{
if
(
defined
$::FORM
{
$f
})
{
if
(
defined
$::FORM
{
$f
})
{
...
...
globals.pl
View file @
19ca3aa8
...
@@ -260,6 +260,7 @@ sub GenerateVersionTable {
...
@@ -260,6 +260,7 @@ sub GenerateVersionTable {
splice
(
@::log_columns
,
$w
,
1
);
splice
(
@::log_columns
,
$w
,
1
);
}
}
}
}
@::log_columns
=
(
sort
(
@::log_columns
));
@::legal_priority
=
SplitEnumType
(
$cols
->
{
"priority,type"
});
@::legal_priority
=
SplitEnumType
(
$cols
->
{
"priority,type"
});
@::legal_severity
=
SplitEnumType
(
$cols
->
{
"bug_severity,type"
});
@::legal_severity
=
SplitEnumType
(
$cols
->
{
"bug_severity,type"
});
...
...
makeactivitytable.sh
View file @
19ca3aa8
...
@@ -24,7 +24,6 @@ use bugs;
...
@@ -24,7 +24,6 @@ use bugs;
drop table bugs_activity
drop table bugs_activity
OK_ALL_DONE
OK_ALL_DONE
mysql
<<
OK_ALL_DONE
mysql
<<
OK_ALL_DONE
use bugs;
use bugs;
create table bugs_activity (
create table bugs_activity (
...
@@ -36,7 +35,8 @@ create table bugs_activity (
...
@@ -36,7 +35,8 @@ create table bugs_activity (
newvalue tinytext,
newvalue tinytext,
index (bug_id),
index (bug_id),
index (when)
index (when),
index (field)
);
);
...
...
query.cgi
View file @
19ca3aa8
...
@@ -31,13 +31,13 @@ use vars @::legal_resolution,
...
@@ -31,13 +31,13 @@ use vars @::legal_resolution,
@::legal_product
,
@::legal_product
,
@::legal_bug_status
,
@::legal_bug_status
,
@::legal_priority
,
@::legal_priority
,
@::legal_resolution
,
@::legal_opsys
,
@::legal_opsys
,
@::legal_platform
,
@::legal_platform
,
@::legal_components
,
@::legal_components
,
@::legal_versions
,
@::legal_versions
,
@::legal_severity
,
@::legal_severity
,
@::legal_target_milestone
,
@::legal_target_milestone
,
@::log_columns
,
%::
versions
,
%::
versions
,
%::
components
,
%::
components
,
%::
FORM
;
%::
FORM
;
...
@@ -62,7 +62,8 @@ my %type;
...
@@ -62,7 +62,8 @@ my %type;
foreach
my
$name
(
"bug_status"
,
"resolution"
,
"assigned_to"
,
"rep_platform"
,
foreach
my
$name
(
"bug_status"
,
"resolution"
,
"assigned_to"
,
"rep_platform"
,
"priority"
,
"bug_severity"
,
"product"
,
"reporter"
,
"op_sys"
,
"priority"
,
"bug_severity"
,
"product"
,
"reporter"
,
"op_sys"
,
"component"
,
"version"
,
"component"
,
"version"
,
"chfield"
,
"chfieldfrom"
,
"chfieldto"
,
"chfieldvalue"
,
"email1"
,
"emailtype1"
,
"emailreporter1"
,
"email1"
,
"emailtype1"
,
"emailreporter1"
,
"emailassigned_to1"
,
"emailcc1"
,
"emailqa_contact1"
,
"emailassigned_to1"
,
"emailcc1"
,
"emailqa_contact1"
,
"email2"
,
"emailtype2"
,
"emailreporter2"
,
"email2"
,
"emailtype2"
,
"emailreporter2"
,
...
@@ -92,6 +93,11 @@ foreach my $item (split(/\&/, $::buffer)) {
...
@@ -92,6 +93,11 @@ foreach my $item (split(/\&/, $::buffer)) {
}
}
if
(
$default
{
'chfieldto'
}
eq
""
)
{
$default
{
'chfieldto'
}
=
"Now"
;
}
my
$namelist
=
""
;
my
$namelist
=
""
;
...
@@ -375,8 +381,26 @@ $emailinput2<p>
...
@@ -375,8 +381,26 @@ $emailinput2<p>
Changed in the <NOBR>last <INPUT NAME=changedin SIZE=2 VALUE=\"$default{'changedin'}\"> days.</NOBR>
<NOBR>Changed in the last <INPUT NAME=changedin SIZE=2> days.</NOBR>
<table>
<tr>
<td rowspan=2 align=right>Where the field(s)
</td><td rowspan=2>
<SELECT NAME=\"chfield\" MULTIPLE SIZE=4>
@{[make_options(\@::log_columns, $default{'chfield'}, $type{'chfield'})]}
</SELECT>
</td><td rowspan=2>
changed.
</td><td>
<nobr>dates <INPUT NAME=chfieldfrom SIZE=10 VALUE=\"$default{'chfieldfrom'}\"></nobr>
<nobr>to <INPUT NAME=chfieldto SIZE=10 VALUE=\"$default{'chfieldto'}\"></nobr>
</td>
</tr>
<tr>
<td>changed to value <nobr><INPUT NAME=chfieldvalue SIZE=10> (optional)</nobr>
</td>
</table>
<P>
<P>
...
...
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