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
f45ef933
Commit
f45ef933
authored
Feb 16, 2013
by
Simon Green
Committed by
Frédéric Buclin
Feb 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 840824: It is possible to create a new bug with a non active target…
Bug 840824: It is possible to create a new bug with a non active target milestone, version or component r/a=LpSolit
parent
aa73e4b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
Bug.pm
Bugzilla/Bug.pm
+3
-6
No files found.
Bugzilla/Bug.pm
View file @
f45ef933
...
@@ -1465,8 +1465,7 @@ sub _check_component {
...
@@ -1465,8 +1465,7 @@ sub _check_component {
$name
||
ThrowUserError
(
"require_component"
);
$name
||
ThrowUserError
(
"require_component"
);
my
$product
=
blessed
(
$invocant
)
?
$invocant
->
product_obj
my
$product
=
blessed
(
$invocant
)
?
$invocant
->
product_obj
:
$params
->
{
product
};
:
$params
->
{
product
};
my
$old_comp
=
blessed
(
$invocant
)
?
$invocant
->
component
my
$old_comp
=
blessed
(
$invocant
)
?
$invocant
->
component
:
''
;
:
$params
->
{
component
};
my
$object
=
Bugzilla::
Component
->
check
({
product
=>
$product
,
name
=>
$name
});
my
$object
=
Bugzilla::
Component
->
check
({
product
=>
$product
,
name
=>
$name
});
if
(
$object
->
name
ne
$old_comp
&&
!
$object
->
is_active
)
{
if
(
$object
->
name
ne
$old_comp
&&
!
$object
->
is_active
)
{
ThrowUserError
(
'value_inactive'
,
{
class
=>
ref
(
$object
),
value
=>
$name
});
ThrowUserError
(
'value_inactive'
,
{
class
=>
ref
(
$object
),
value
=>
$name
});
...
@@ -1929,8 +1928,7 @@ sub _check_target_milestone {
...
@@ -1929,8 +1928,7 @@ sub _check_target_milestone {
my
(
$invocant
,
$target
,
undef
,
$params
)
=
@_
;
my
(
$invocant
,
$target
,
undef
,
$params
)
=
@_
;
my
$product
=
blessed
(
$invocant
)
?
$invocant
->
product_obj
my
$product
=
blessed
(
$invocant
)
?
$invocant
->
product_obj
:
$params
->
{
product
};
:
$params
->
{
product
};
my
$old_target
=
blessed
(
$invocant
)
?
$invocant
->
target_milestone
my
$old_target
=
blessed
(
$invocant
)
?
$invocant
->
target_milestone
:
''
;
:
$params
->
{
target_milestone
};
$target
=
trim
(
$target
);
$target
=
trim
(
$target
);
$target
=
$product
->
default_milestone
if
!
defined
$target
;
$target
=
$product
->
default_milestone
if
!
defined
$target
;
my
$object
=
Bugzilla::
Milestone
->
check
(
my
$object
=
Bugzilla::
Milestone
->
check
(
...
@@ -1960,8 +1958,7 @@ sub _check_version {
...
@@ -1960,8 +1958,7 @@ sub _check_version {
$version
=
trim
(
$version
);
$version
=
trim
(
$version
);
my
$product
=
blessed
(
$invocant
)
?
$invocant
->
product_obj
my
$product
=
blessed
(
$invocant
)
?
$invocant
->
product_obj
:
$params
->
{
product
};
:
$params
->
{
product
};
my
$old_vers
=
blessed
(
$invocant
)
?
$invocant
->
version
my
$old_vers
=
blessed
(
$invocant
)
?
$invocant
->
version
:
''
;
:
$params
->
{
version
};
my
$object
=
Bugzilla::
Version
->
check
({
product
=>
$product
,
name
=>
$version
});
my
$object
=
Bugzilla::
Version
->
check
({
product
=>
$product
,
name
=>
$version
});
if
(
$object
->
name
ne
$old_vers
&&
!
$object
->
is_active
)
{
if
(
$object
->
name
ne
$old_vers
&&
!
$object
->
is_active
)
{
ThrowUserError
(
'value_inactive'
,
{
class
=>
ref
(
$object
),
value
=>
$version
});
ThrowUserError
(
'value_inactive'
,
{
class
=>
ref
(
$object
),
value
=>
$version
});
...
...
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