Closed
Bug 1001846
Opened 11 years ago
Closed 11 years ago
When editing cc_accessible using Bug.update, the method sometimes returns is_cc_accessible and sometimes cc_accessible as being changed
Categories
(Bugzilla :: WebService, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.2
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file)
422 bytes,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
Run this script several times. Before each call, make sure cc_accessible = 1:
$call = rpc_call('Bug.update', {ids => [$bug_id], is_cc_accessible => 0});
say Dumper($call->result->{bugs}->[0]->{changes});
Sometimes, I get:
$VAR1 = {
'cc_accessible' => {
'removed' => '1',
'added' => '0'
}
};
and sometimes:
$VAR1 = {
'is_cc_accessible' => {
'added' => '0',
'removed' => '1'
}
};
Note that the field name is not the same: cc_accessible vs is_cc_accessible. This is inconsistent and makes QA tests to fail randomly, because the name of the field varies from run to run. This happens with Perl 5.18.1. I suspect this is due to the new randomization of hashes in Perl 5.18, see bug 997281 for details.
Assignee | ||
Comment 1•11 years ago
|
||
The problem is here, in WebService/Bug.pm:
my %api_name = reverse %{ Bugzilla::Bug::FIELD_MAP() };
It uses reverse, but FIELD_MAP contains:
use constant FIELD_MAP => {
cc_accessible => 'cclist_accessible',
is_cc_accessible => 'cclist_accessible',
....
};
So cc_accessible and is_cc_accessible will overwrite each other, randomly. Per bug 578513, we should return is_cc_accessible, always.
Depends on: 578513
Assignee | ||
Comment 2•11 years ago
|
||
When mkanat added is_cc_accessible into FIELD_MAP, he forgot to remove the obsolete cc_accessible.
Comment 3•11 years ago
|
||
Comment on attachment 8413195 [details] [diff] [review]
patch, v1
Review of attachment 8413195 [details] [diff] [review]:
-----------------------------------------------------------------
r=dkl
Attachment #8413195 -
Flags: review?(dkl) → review+
Updated•11 years ago
|
Flags: approval?
Flags: approval4.4?
Updated•11 years ago
|
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+
Assignee | ||
Comment 4•11 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
4ad3e58..7505025 master -> master
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
dc47bf8..14208d5 4.4 -> 4.4
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•10 years ago
|
Flags: approval4.2?
Target Milestone: Bugzilla 4.4 → Bugzilla 4.2
Comment 5•10 years ago
|
||
Approved for 4.2, failing tests is bad on a release branch.
Flags: approval4.2? → approval4.2+
Assignee | ||
Comment 6•10 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
feca0d8..9d068ba 4.2 -> 4.2
You need to log in
before you can comment on or make changes to this bug.
Description
•