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
b1fa012b
Commit
b1fa012b
authored
Jul 22, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 577054: ChoiceInterface was denying the deletion of any value if
the field had *any* value-controlling values. r=LpSolit, a=LpSolit
parent
e1109183
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
ChoiceInterface.pm
Bugzilla/Field/ChoiceInterface.pm
+9
-3
confirm-delete.html.tmpl
...ate/en/default/admin/fieldvalues/confirm-delete.html.tmpl
+2
-2
No files found.
Bugzilla/Field/ChoiceInterface.pm
View file @
b1fa012b
...
...
@@ -39,11 +39,11 @@ sub FIELD_NAME { return $_[0]->DB_TABLE; }
sub
_check_if_controller
{
my
$self
=
shift
;
my
$vis_fields
=
$self
->
controls_visibility_of_fields
;
my
$values
=
$self
->
controlled_values
;
if
(
@$vis_fields
||
scalar
(
keys
%
$values
)
)
{
my
$values
=
$self
->
controlled_values_array
;
if
(
@$vis_fields
||
@$values
)
{
ThrowUserError
(
'fieldvalue_is_controller'
,
{
value
=>
$self
,
fields
=>
[
map
(
$_
->
name
,
@$vis_fields
)],
vals
=>
$values
});
vals
=>
$
self
->
controlled_
values
});
}
}
...
...
@@ -142,6 +142,12 @@ sub controlled_values {
return
$self
->
{
controlled_values
};
}
sub
controlled_values_array
{
my
(
$self
)
=
@_
;
my
$values
=
$self
->
controlled_values
;
return
[
map
{
@
{
$values
->
{
$_
}
}
}
keys
%
$values
];
}
sub
is_visible_on_bug
{
my
(
$self
,
$bug
)
=
@_
;
...
...
template/en/default/admin/fieldvalues/confirm-delete.html.tmpl
View file @
b1fa012b
...
...
@@ -63,7 +63,7 @@
[% IF value.is_default || value.bug_count || (value_count == 1)
|| value.controls_visibility_of_fields.size
|| value.controlled_values.size
|| value.controlled_values
_array
.size
%]
<p>Sorry, but the '[% value.name FILTER html %]' value cannot be deleted
...
...
@@ -123,7 +123,7 @@
</li>
[% END %]
[% IF value.controlled_values.size %]
[% IF value.controlled_values
_array
.size %]
<li>This value controls the visibility of the following values in
other fields:<br>
[% FOREACH field_name = value.controlled_values.keys %]
...
...
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