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
16101ff8
Commit
16101ff8
authored
Jan 12, 2005
by
travis%sedsystems.ca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 276473: Show_activity merges incorrectly sometimes changesets into one changeset
Patch by vladd@bugzilla.org r=bugzilla@glob.com.au a=justdave
parent
4f5cad99
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
Util.pm
Bugzilla/Util.pm
+6
-2
CGI.pl
CGI.pl
+3
-2
007util.t
t/007util.t
+3
-2
No files found.
Bugzilla/Util.pm
View file @
16101ff8
...
...
@@ -149,7 +149,7 @@ sub trim {
sub
format_time
{
my
(
$time
)
=
@_
;
my
(
$year
,
$month
,
$day
,
$hour
,
$min
);
my
(
$year
,
$month
,
$day
,
$hour
,
$min
,
$sec
);
if
(
$time
=~
m/^\d{14}$/
)
{
# We appear to have a timestamp direct from MySQL
$year
=
substr
(
$time
,
0
,
4
);
...
...
@@ -158,12 +158,13 @@ sub format_time {
$hour
=
substr
(
$time
,
8
,
2
);
$min
=
substr
(
$time
,
10
,
2
);
}
elsif
(
$time
=~
m/^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:
\d{2}
)?$/
)
{
elsif
(
$time
=~
m/^(\d{4})[-\.](\d{2})[-\.](\d{2}) (\d{2}):(\d{2})(:
(\d{2})
)?$/
)
{
$year
=
$1
;
$month
=
$2
;
$day
=
$3
;
$hour
=
$4
;
$min
=
$5
;
$sec
=
$7
;
}
else
{
warn
"Date/Time format ($time) unrecogonzied"
;
...
...
@@ -171,6 +172,9 @@ sub format_time {
if
(
defined
$year
)
{
$time
=
"$year-$month-$day $hour:$min"
;
if
(
defined
$sec
)
{
$time
.=
":$sec"
;
}
$time
.=
" "
.
&::
Param
(
'timezone'
)
if
&::
Param
(
'timezone'
);
}
return
$time
;
...
...
CGI.pl
View file @
16101ff8
...
...
@@ -281,7 +281,8 @@ sub CheckIfVotedConfirmed {
}
sub
LogActivityEntry
{
my
(
$i
,
$col
,
$removed
,
$added
,
$whoid
,
$timestamp
)
=
@_
;
# in the case of CCs, deps, and keywords, there's a possibility that someone # might try to add or remove a lot of them at once, which might take more
# in the case of CCs, deps, and keywords, there's a possibility that someone
# might try to add or remove a lot of them at once, which might take more
# space than the activity table allows. We'll solve this by splitting it
# into multiple entries if it's too long.
while
(
$removed
||
$added
)
{
...
...
@@ -331,7 +332,7 @@ sub GetBugActivity {
SELECT COALESCE(fielddefs.description, bugs_activity.fieldid),
fielddefs.name,
bugs_activity.attach_id,
DATE_FORMAT(bugs_activity.bug_when,'%Y.%m.%d %H:%i'),
DATE_FORMAT(bugs_activity.bug_when,'%Y.%m.%d %H:%i
:%s
'),
bugs_activity.removed, bugs_activity.added,
profiles.login_name
FROM bugs_activity $suppjoins LEFT JOIN fielddefs ON
...
...
t/007util.t
View file @
16101ff8
...
...
@@ -28,7 +28,7 @@ use lib 't';
use
Support::
Files
;
BEGIN
{
use
Test::
More
tests
=>
1
2
;
use
Test::
More
tests
=>
1
3
;
use_ok
(
Bugzilla::
Util
);
}
...
...
@@ -69,6 +69,7 @@ is(trim(" fg<*\$%>+=~~ "),'fg<*$%>+=~~','trim()');
#format_time();
is
(
format_time
(
"20021123140436"
),
'2002-11-23 14:04 TEST'
,
'format_time("20021123140436")'
);
is
(
format_time
(
"2002.11.24 00:05:56"
),
'2002-11-24 00:05 TEST'
,
'format_time("2002.11.24 00:05:56")'
);
is
(
format_time
(
"2002.11.24 00:05"
),
'2002-11-24 00:05 TEST'
,
'format_time("2002.11.24 00:05")'
);
is
(
format_time
(
"2002.11.24 00:05:56"
),
'2002-11-24 00:05:56 TEST'
,
'format_time("2002.11.24 00:05:56")'
);
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