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
4910b3f9
You need to sign in or sign up before continuing.
Commit
4910b3f9
authored
Mar 12, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 285692: lastdiffed should use NULL instead of the "beginning of time"
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=glob, a=myk
parent
af17bfb2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
24 deletions
+28
-24
BugMail.pm
Bugzilla/BugMail.pm
+6
-9
Schema.pm
Bugzilla/DB/Schema.pm
+1
-1
checksetup.pl
checksetup.pl
+4
-1
sendunsentbugmail.pl
contrib/sendunsentbugmail.pl
+4
-2
editproducts.cgi
editproducts.cgi
+2
-2
globals.pl
globals.pl
+8
-7
sanitycheck.cgi
sanitycheck.cgi
+3
-2
No files found.
Bugzilla/BugMail.pm
View file @
4910b3f9
...
...
@@ -172,9 +172,6 @@ sub ProcessOneBug($) {
$values
{
component
}
=
get_component_name
(
$values
{
component_id
});
my
(
$start
,
$end
)
=
(
@row
);
# $start and $end are considered safe because users can't touch them
trick_taint
(
$start
);
trick_taint
(
$end
);
my
$cc_ref
=
Bugzilla
->
dbh
->
selectcol_arrayref
(
q{SELECT profiles.login_name FROM cc, profiles
...
...
@@ -220,15 +217,16 @@ sub ProcessOneBug($) {
my
@diffs
;
# If lastdiffed is NULL, then we don't limit the search on time.
my
$when_restriction
=
$start
?
" AND bug_when > '$start' AND bug_when <= '$end'"
:
''
;
SendSQL
(
"SELECT profiles.login_name, fielddefs.description, "
.
" bug_when, removed, added, attach_id, fielddefs.name "
.
"FROM bugs_activity, fielddefs, profiles "
.
"WHERE bug_id = $id "
.
" AND fielddefs.fieldid = bugs_activity.fieldid "
.
" AND profiles.userid = who "
.
" AND bug_when > '$start' "
.
" AND bug_when <= '$end' "
.
$when_restriction
.
"ORDER BY bug_when"
);
...
...
@@ -280,8 +278,7 @@ sub ProcessOneBug($) {
" AND fielddefs.fieldid = bugs_activity.fieldid"
.
" AND (fielddefs.name = 'bug_status' "
.
" OR fielddefs.name = 'resolution') "
.
" AND bug_when > '$start' "
.
" AND bug_when <= '$end' "
.
$when_restriction
.
"ORDER BY bug_when, bug_id"
);
my
$thisdiff
=
""
;
...
...
@@ -829,7 +826,7 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) {
}
}
my
$isnew
=
(
$start
!~
m/[1-9]/
)
;
my
$isnew
=
!
$start
;
my
%
substs
;
...
...
Bugzilla/DB/Schema.pm
View file @
4910b3f9
...
...
@@ -154,7 +154,7 @@ use constant ABSTRACT_SCHEMA => {
# comes from the keywords table
keywords
=>
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
},
lastdiffed
=>
{
TYPE
=>
'DATETIME'
,
NOTNULL
=>
1
},
lastdiffed
=>
{
TYPE
=>
'DATETIME'
},
everconfirmed
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
},
reporter_accessible
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'TRUE'
},
...
...
checksetup.pl
View file @
4910b3f9
...
...
@@ -2180,7 +2180,7 @@ if ($dbh->bz_get_field_def('bugs_activity', 'field')) {
# http://bugzilla.mozilla.org/show_bugs.cgi?id=71552
if
(
!
$dbh
->
bz_get_field_def
(
'bugs'
,
'lastdiffed'
))
{
$dbh
->
bz_add_field
(
'bugs'
,
'lastdiffed'
,
'datetime
not null
'
);
$dbh
->
bz_add_field
(
'bugs'
,
'lastdiffed'
,
'datetime'
);
$dbh
->
do
(
'UPDATE bugs SET lastdiffed = now(), delta_ts = delta_ts'
);
}
...
...
@@ -3846,10 +3846,13 @@ $dbh->bz_change_field_type('bugs', 'votes', 'mediumint not null default 0');
# 2005-03-03 travis@sedsystems.ca -- Bug 41972
add_setting
(
"display_quips"
,
{
"on"
=>
1
,
"off"
=>
2
},
"on"
);
$dbh
->
bz_change_field_type
(
'bugs'
,
'lastdiffed'
,
'datetime'
);
}
# END LEGACY CHECKS
# If you had to change the --TABLE-- definition in any way, then add your
# differential change code *** A B O V E *** this comment.
#
...
...
contrib/sendunsentbugmail.pl
View file @
4910b3f9
...
...
@@ -30,8 +30,10 @@ use Bugzilla::Constants;
use
Bugzilla::
BugMail
;
my
$dbh
=
Bugzilla
->
dbh
;
SendSQL
(
"SELECT bug_id FROM bugs WHERE lastdiffed < delta_ts AND
delta_ts < NOW() - "
.
$dbh
->
sql_interval
(
'30 minute'
)
.
SendSQL
(
"SELECT bug_id FROM bugs
WHERE lastdiffed IS NULL
OR lastdiffed < delta_ts AND delta_ts < NOW() - "
.
$dbh
->
sql_interval
(
'30 minute'
)
.
" ORDER BY bug_id"
);
my
@list
;
while
(
MoreSQLData
())
{
...
...
editproducts.cgi
View file @
4910b3f9
...
...
@@ -1187,7 +1187,7 @@ if ($action eq 'updategroupcontrols') {
LogActivityEntry
(
$bugid
,
"bug_group"
,
$removed
,
""
,
$::userid
,
$timestamp
);
my
$diffed
=
""
;
if
(
$mailiscurrent
!=
0
)
{
if
(
$mailiscurrent
)
{
$diffed
=
", lastdiffed = "
.
SqlQuote
(
$timestamp
);
}
SendSQL
(
"UPDATE bugs SET delta_ts = "
.
SqlQuote
(
$timestamp
)
.
...
...
@@ -1221,7 +1221,7 @@ if ($action eq 'updategroupcontrols') {
LogActivityEntry
(
$bugid
,
"bug_group"
,
""
,
$added
,
$::userid
,
$timestamp
);
my
$diffed
=
""
;
if
(
$mailiscurrent
!=
0
)
{
if
(
$mailiscurrent
)
{
$diffed
=
", lastdiffed = "
.
SqlQuote
(
$timestamp
);
}
SendSQL
(
"UPDATE bugs SET delta_ts = "
.
SqlQuote
(
$timestamp
)
.
...
...
globals.pl
View file @
4910b3f9
...
...
@@ -924,15 +924,16 @@ sub GetLongDescriptionAsText {
"WHERE profiles.userid = longdescs.who "
.
"AND longdescs.bug_id = $id "
);
if
(
$start
&&
$start
=~
/[1-9]/
)
{
# If $start is not all zeros, obtain the count-index
# $start will be undef for New bugs, and defined for pre-existing bugs.
if
(
$start
)
{
# If $start is not NULL, obtain the count-index
# of this comment for the leading "Comment #xxx" line.)
$query
.=
"AND longdescs.bug_when > '$start'"
;
SendSQL
(
"SELECT count(*) FROM longdescs
WHERE bug_id = $id AND bug_when <= '$start'"
);
SendSQL
(
"SELECT count(*) FROM longdescs "
.
"
WHERE bug_id = $id AND bug_when <= '$start'"
);
(
$count
)
=
(
FetchSQLData
());
}
if
(
$end
)
{
$query
.=
"AND longdescs.bug_when <= '$end'
"
;
$query
.=
" AND longdescs.bug_when > '$start'"
.
" AND longdescs.bug_when <= '$end'
"
;
}
$query
.=
"ORDER BY longdescs.bug_when"
;
...
...
sanitycheck.cgi
View file @
4910b3f9
...
...
@@ -178,7 +178,8 @@ if (defined $cgi->param('rescanallBugMail')) {
require
Bugzilla::
BugMail
;
Status
(
"OK, now attempting to send unsent mail"
);
SendSQL
(
"SELECT bug_id FROM bugs WHERE lastdiffed < delta_ts AND
SendSQL
(
"SELECT bug_id FROM bugs
WHERE (lastdiffed IS NULL OR lastdiffed < delta_ts) AND
delta_ts < now() - "
.
$dbh
->
sql_interval
(
'30 minute'
)
.
" ORDER BY bug_id"
);
my
@list
;
...
...
@@ -737,7 +738,7 @@ Status("Checking for unsent mail");
@badbugs
=
();
SendSQL
(
"SELECT bug_id "
.
"FROM bugs WHERE
lastdiffed < delta_ts AND "
.
"FROM bugs WHERE
(lastdiffed IS NULL OR lastdiffed < delta_ts) AND "
.
"delta_ts < now() - "
.
$dbh
->
sql_interval
(
'30 minute'
)
.
" ORDER BY bug_id"
);
...
...
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