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
96d811eb
Commit
96d811eb
authored
Sep 04, 2012
by
Dave Lawrence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 69447 - Make CC changes not cause midairs.
r/a=LpSolit
parent
384e9de2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
9 deletions
+29
-9
process_bug.cgi
process_bug.cgi
+29
-9
No files found.
process_bug.cgi
View file @
96d811eb
...
@@ -118,23 +118,43 @@ if (defined $cgi->param('delta_ts'))
...
@@ -118,23 +118,43 @@ if (defined $cgi->param('delta_ts'))
if
(
$first_delta_tz_z
ne
$delta_ts_z
)
{
if
(
$first_delta_tz_z
ne
$delta_ts_z
)
{
(
$vars
->
{
'operations'
})
=
$first_bug
->
get_activity
(
undef
,
$cgi
->
param
(
'delta_ts'
));
(
$vars
->
{
'operations'
})
=
$first_bug
->
get_activity
(
undef
,
$cgi
->
param
(
'delta_ts'
));
$vars
->
{
'title_tag'
}
=
"mid_air"
;
ThrowCodeError
(
'undefined_field'
,
{
field
=>
'longdesclength'
})
ThrowCodeError
(
'undefined_field'
,
{
field
=>
'longdesclength'
})
if
!
defined
$cgi
->
param
(
'longdesclength'
);
if
!
defined
$cgi
->
param
(
'longdesclength'
);
$vars
->
{
'start_at'
}
=
$cgi
->
param
(
'longdesclength'
);
my
$start_at
=
$cgi
->
param
(
'longdesclength'
);
# Always sort midair collision comments oldest to newest,
# Always sort midair collision comments oldest to newest,
# regardless of the user's personal preference.
# regardless of the user's personal preference.
$vars
->
{
'comments'
}
=
$first_bug
->
comments
({
order
=>
"oldest_to_newest"
});
my
$comments
=
$first_bug
->
comments
({
order
=>
"oldest_to_newest"
});
$vars
->
{
'bug'
}
=
$first_bug
;
# The token contains the old delta_ts. We need a new one.
# The token contains the old delta_ts. We need a new one.
$cgi
->
param
(
'token'
,
issue_hash_token
([
$first_bug
->
id
,
$first_bug
->
delta_ts
]));
$cgi
->
param
(
'token'
,
issue_hash_token
([
$first_bug
->
id
,
$first_bug
->
delta_ts
]));
# Warn the user about the mid-air collision and ask them what to do.
$template
->
process
(
"bug/process/midair.html.tmpl"
,
$vars
)
# Show midair if previous changes made other than CC
||
ThrowTemplateError
(
$template
->
error
());
# and/or one or more comments were made
exit
;
my
$do_midair
=
scalar
@$comments
>
$start_at
?
1
:
0
;
if
(
!
$do_midair
)
{
foreach
my
$operation
(
@
{
$vars
->
{
'operations'
}
})
{
foreach
my
$change
(
@
{
$operation
->
{
'changes'
}
})
{
$do_midair
=
1
if
$change
->
{
'fieldname'
}
ne
'cc'
;
last
;
}
last
if
$do_midair
;
}
}
if
(
$do_midair
)
{
$vars
->
{
'title_tag'
}
=
"mid_air"
;
$vars
->
{
'start_at'
}
=
$start_at
;
$vars
->
{
'comments'
}
=
$comments
;
$vars
->
{
'bug'
}
=
$first_bug
;
# Warn the user about the mid-air collision and ask them what to do.
$template
->
process
(
"bug/process/midair.html.tmpl"
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
exit
;
}
}
}
}
}
...
...
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