Closed
Bug 686963
Opened 13 years ago
Closed 13 years ago
Setting the work time using the Bug.update WebService method requires a comment
Categories
(Bugzilla :: WebService, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: LpSolit, Assigned: timello)
References
Details
(Keywords: regression)
Attachments
(1 file)
1.10 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
Since Bugzilla 4.0 (bug 271913), a comment is no longer required when setting the work time. This is working fine from the web UI for 4.0 and 4.2, and is also working fine from the WebService API in 4.0, but this is no longer working in 4.2. If you don't specify a comment at the same time as you specify work_time, you get the following error:
The function Bugzilla::Comment->create requires a thetext argument, and that argument was not set.
I'm pretty sure this is a regression due to bug 590334.
Flags: blocking4.2+
Assignee | ||
Updated•13 years ago
|
Assignee: webservice → timello
Assignee | ||
Comment 1•13 years ago
|
||
Ok, this patch fixes 2 problems because there were related:
1. Comments with white-spaces where allowed to be added because we were running the validators after the code actually we skip blank comments;
2. $params->{thetext} should not be undefined, otherwise _check_thetext() validator will complain.
Attachment #567888 -
Flags: review?(LpSolit)
Assignee | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
![]() |
Reporter | |
Comment 2•13 years ago
|
||
Comment on attachment 567888 [details] [diff] [review]
v1
>+ $params->{'thetext'} = $comment || '';
As '0' is a valid comment, you must replace the line above by:
$params->{'thetext'} = defined($comment) ? $comment : '';
r=LpSolit with this change.
Attachment #567888 -
Flags: review?(LpSolit) → review+
![]() |
Reporter | |
Comment 3•13 years ago
|
||
Do not forget the fix on checkin.
Flags: approval4.2+
Flags: approval+
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Frédéric Buclin from comment #2)
> Comment on attachment 567888 [details] [diff] [review] [diff] [details] [review]
> v1
>
> >+ $params->{'thetext'} = $comment || '';
>
> As '0' is a valid comment, you must replace the line above by:
>
> $params->{'thetext'} = defined($comment) ? $comment : '';
Indeed! Thanks!
Assignee | ||
Comment 5•13 years ago
|
||
Committing to: bzr+ssh://timello%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified Bugzilla/Bug.pm
Committed revision 7948.
Committing to: bzr+ssh://timello%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Bug.pm
Committed revision 7986.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 6•13 years ago
|
||
Comment on attachment 567888 [details] [diff] [review]
v1
Review of attachment 567888 [details] [diff] [review]:
-----------------------------------------------------------------
::: Bugzilla/Bug.pm
@@ +2674,3 @@
> # Fill out info that doesn't change and callers may not pass in
> $params->{'bug_id'} = $self;
> + $params->{'thetext'} = $comment || '';
"0" is a valid comment.
You need to log in
before you can comment on or make changes to this bug.
Description
•