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
20ed8a92
Commit
20ed8a92
authored
May 12, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 556123: process_bug.cgi: move the setting of comments and work_time
into Bugzilla::Bug::set_all r=dkl, a=mkanat
parent
72d9f52a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
Bug.pm
Bugzilla/Bug.pm
+21
-0
process_bug.cgi
process_bug.cgi
+9
-8
No files found.
Bugzilla/Bug.pm
View file @
20ed8a92
...
...
@@ -1848,6 +1848,27 @@ sub _set_global_validator {
# "Set" Methods #
#################
sub
set_all
{
my
$self
=
shift
;
my
(
$params
)
=
@_
;
if
(
exists
$params
->
{
'comment'
}
or
exists
$params
->
{
'work_time'
})
{
# Add a comment as needed to each bug. This is done early because
# there are lots of things that want to check if we added a comment.
$self
->
add_comment
(
$params
->
{
'comment'
}
->
{
'body'
},
{
isprivate
=>
$params
->
{
'comment'
}
->
{
'is_private'
},
work_time
=>
$params
->
{
'work_time'
}
});
}
my
%
normal_set_all
;
foreach
my
$name
(
keys
%
$params
)
{
if
(
$self
->
can
(
"set_$name"
))
{
$normal_set_all
{
$name
}
=
$params
->
{
$name
};
}
}
$self
->
SUPER::
set_all
(
\%
normal_set_all
);
}
sub
set_alias
{
$_
[
0
]
->
set
(
'alias'
,
$_
[
1
]);
}
sub
set_assigned_to
{
my
(
$self
,
$value
)
=
@_
;
...
...
process_bug.cgi
View file @
20ed8a92
...
...
@@ -322,7 +322,8 @@ if (defined $cgi->param('keywords')) {
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)
;
deadline remaining_time estimated_time
work_time)
;
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
=
(
...
...
@@ -340,16 +341,16 @@ foreach my $field_name (@set_fields) {
}
}
if
(
should_set
(
'comment'
))
{
$set_all_fields
{
comment
}
=
{
body
=>
scalar
$cgi
->
param
(
'comment'
),
is_private
=>
scalar
$cgi
->
param
(
'commentprivacy'
),
};
}
my
@custom_fields
=
Bugzilla
->
active_custom_fields
;
foreach
my
$b
(
@bug_objects
)
{
if
(
should_set
(
'comment'
)
||
$cgi
->
param
(
'work_time'
))
{
# Add a comment as needed to each bug. This is done early because
# there are lots of things that want to check if we added a comment.
$b
->
add_comment
(
scalar
(
$cgi
->
param
(
'comment'
)),
{
isprivate
=>
scalar
$cgi
->
param
(
'commentprivacy'
),
work_time
=>
scalar
$cgi
->
param
(
'work_time'
)
});
}
$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'
);
...
...
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