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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
56665569
Commit
56665569
authored
May 16, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 556154: process_bug.cgi: move the stuff in the loop after $b->set_all
into Bugzilla::Bug::set_all r=dkl, a=mkanat
parent
b58573f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
19 deletions
+36
-19
Bug.pm
Bugzilla/Bug.pm
+20
-0
process_bug.cgi
process_bug.cgi
+16
-19
No files found.
Bugzilla/Bug.pm
View file @
56665569
...
...
@@ -1869,6 +1869,26 @@ sub set_all {
}
}
$self
->
SUPER::
set_all
(
\%
normal_set_all
);
$self
->
reset_assigned_to
if
$params
->
{
'reset_assigned_to'
};
$self
->
reset_qa_contact
if
$params
->
{
'reset_qa_contact'
};
foreach
my
$url
(
@
{
$params
->
{
see_also
}
->
{
add
}
||
[]
})
{
$self
->
add_see_also
(
$url
);
}
foreach
my
$url
(
@
{
$params
->
{
see_also
}
->
{
remove
}
||
[]
})
{
$self
->
remove_see_also
(
$url
);
}
# And set custom fields.
my
@custom_fields
=
Bugzilla
->
active_custom_fields
;
foreach
my
$field
(
@custom_fields
)
{
my
$fname
=
$field
->
name
;
if
(
exists
$params
->
{
$fname
})
{
$self
->
set_custom_field
(
$field
,
$params
->
{
$fname
});
}
}
}
sub
set_alias
{
$_
[
0
]
->
set
(
'alias'
,
$_
[
1
]);
}
...
...
process_bug.cgi
View file @
56665569
...
...
@@ -323,7 +323,7 @@ my @set_fields = qw(op_sys rep_platform priority bug_severity
component target_milestone version
bug_file_loc status_whiteboard short_desc
deadline remaining_time estimated_time
work_time)
;
work_time
set_default_assignee set_default_qa_contact
)
;
push
(
@set_fields
,
'assigned_to'
)
if
!
$cgi
->
param
(
'set_default_assignee'
);
push
(
@set_fields
,
'qa_contact'
)
if
!
$cgi
->
param
(
'set_default_qa_contact'
);
my
%
field_translation
=
(
...
...
@@ -331,6 +331,8 @@ my %field_translation = (
rep_platform
=>
'platform'
,
short_desc
=>
'summary'
,
bug_file_loc
=>
'url'
,
set_default_assignee
=>
'reset_assigned_to'
,
set_default_qa_contact
=>
'reset_qa_contact'
,
);
my
%
set_all_fields
;
...
...
@@ -347,29 +349,24 @@ if (should_set('comment')) {
is_private
=>
scalar
$cgi
->
param
(
'commentprivacy'
),
};
}
if
(
should_set
(
'see_also'
))
{
$set_all_fields
{
'see_also'
}
->
{
add
}
=
[
split
(
/[\s,]+/
,
$cgi
->
param
(
'see_also'
))];
}
if
(
should_set
(
'remove_see_also'
))
{
$set_all_fields
{
'see_also'
}
->
{
remove
}
=
[
$cgi
->
param
(
'remove_see_also'
)];
}
my
@custom_fields
=
Bugzilla
->
active_custom_fields
;
foreach
my
$field
(
@custom_fields
)
{
my
$fname
=
$field
->
name
;
if
(
should_set
(
$fname
,
1
))
{
$set_all_fields
{
$fname
}
=
[
$cgi
->
param
(
$fname
)];
}
}
foreach
my
$b
(
@bug_objects
)
{
$b
->
set_all
(
\%
set_all_fields
);
$b
->
reset_assigned_to
if
$cgi
->
param
(
'set_default_assignee'
);
$b
->
reset_qa_contact
if
$cgi
->
param
(
'set_default_qa_contact'
);
if
(
should_set
(
'see_also'
))
{
my
@see_also
=
split
(
','
,
$cgi
->
param
(
'see_also'
));
$b
->
add_see_also
(
$_
)
foreach
@see_also
;
}
if
(
should_set
(
'remove_see_also'
))
{
$b
->
remove_see_also
(
$_
)
foreach
$cgi
->
param
(
'remove_see_also'
)
}
# And set custom fields.
foreach
my
$field
(
@custom_fields
)
{
my
$fname
=
$field
->
name
;
if
(
should_set
(
$fname
,
1
))
{
$b
->
set_custom_field
(
$field
,
[
$cgi
->
param
(
$fname
)]);
}
}
}
# Certain changes can only happen on individual bugs, never on mass-changes.
...
...
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