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
feef94f7
You need to sign in or sign up before continuing.
Commit
feef94f7
authored
Jun 23, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 573172: Prepare set_all for being used in a context other than
process_bug.cgi r=dkl, a=mkanat
parent
eac46d8c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
Bug.pm
Bugzilla/Bug.pm
+16
-9
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+4
-0
No files found.
Bugzilla/Bug.pm
View file @
feef94f7
...
@@ -2073,6 +2073,15 @@ sub set_all {
...
@@ -2073,6 +2073,15 @@ sub set_all {
my
$self
=
shift
;
my
$self
=
shift
;
my
(
$params
)
=
@_
;
my
(
$params
)
=
@_
;
# You cannot mark bugs as duplicate when changing several bugs at once
# (because currently there is no way to check for duplicate loops in that
# situation). You also cannot set the alias of several bugs at once.
if
(
$params
->
{
other_bugs
}
and
scalar
@
{
$params
->
{
other_bugs
}
}
>
1
)
{
ThrowUserError
(
'dupe_not_allowed'
)
if
exists
$params
->
{
dup_id
};
ThrowUserError
(
'multiple_alias_not_allowed'
)
if
defined
$params
->
{
alias
};
}
# For security purposes, and because lots of other checks depend on it,
# For security purposes, and because lots of other checks depend on it,
# we set the product first before anything else.
# we set the product first before anything else.
my
$product_changed
;
# Used only for strict_isolation checks.
my
$product_changed
;
# Used only for strict_isolation checks.
...
@@ -2162,15 +2171,6 @@ sub set_all {
...
@@ -2162,15 +2171,6 @@ sub set_all {
# do that here, because if they *did* change the assignee, qa, or CC,
# do that here, because if they *did* change the assignee, qa, or CC,
# then we don't want to check the original ones, only the new ones.
# then we don't want to check the original ones, only the new ones.
$self
->
_check_strict_isolation
()
if
$product_changed
;
$self
->
_check_strict_isolation
()
if
$product_changed
;
# You cannot mark bugs as duplicates when changing several bugs at once
# (because currently there is no way to check for duplicate loops in that
# situation).
if
(
exists
$params
->
{
'dup_id'
}
and
$params
->
{
other_bugs
}
and
scalar
@
{
$params
->
{
other_bugs
}
}
>
1
)
{
ThrowUserError
(
'dupe_not_allowed'
);
}
}
}
# Helper for set_all that helps with fields that have an "add/remove"
# Helper for set_all that helps with fields that have an "add/remove"
...
@@ -2606,6 +2606,13 @@ sub add_comment {
...
@@ -2606,6 +2606,13 @@ sub add_comment {
return
;
return
;
}
}
# If the user has explicitly set remaining_time, this will be overridden
# later in set_all. But if they haven't, this keeps remaining_time
# up-to-date.
if
(
$params
->
{
work_time
})
{
$self
->
set_remaining_time
(
$self
->
remaining_time
-
$params
->
{
work_time
});
}
# So we really want to comment. Make sure we are allowed to do so.
# So we really want to comment. Make sure we are allowed to do so.
my
$privs
;
my
$privs
;
$self
->
check_can_change_field
(
'longdesc'
,
0
,
1
,
\
$privs
)
$self
->
check_can_change_field
(
'longdesc'
,
0
,
1
,
\
$privs
)
...
...
template/en/default/global/user-error.html.tmpl
View file @
feef94f7
...
@@ -1182,6 +1182,10 @@
...
@@ -1182,6 +1182,10 @@
to add a version to this product.
to add a version to this product.
[% END %]
[% END %]
[% ELSIF error == "multiple_alias_not_allowed" %]
You cannot set aliases when modifying multiple [% terms.bugs %]
at once.
[% ELSIF error == "need_quip" %]
[% ELSIF error == "need_quip" %]
[% title = "Quip Required" %]
[% title = "Quip Required" %]
[% docslinks = {'quips.html' => 'About quips'} %]
[% docslinks = {'quips.html' => 'About quips'} %]
...
...
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