Last modified: 2013-10-23 13:09:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57514, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55514 - Claim guid case difference in ChangeOpClaim means duplicate claims are created when editing
Claim guid case difference in ChangeOpClaim means duplicate claims are create...
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
REL1_21-branch
All All
: Immediate blocker (vote)
: MW 1.21 version
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-09 13:47 UTC by Lydia Pintscher
Modified: 2013-10-23 13:09 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lydia Pintscher 2013-10-09 13:47:34 UTC
When you change the order of snaks, the edit summary is wrong.
Comment 1 tobias.gritschacher 2013-10-09 13:49:04 UTC
It shows "Created claim" but it should be "Changed claim"
Comment 2 Addshore 2013-10-09 15:39:06 UTC
The problem is not the summary, the summary is actually correct for the eventual action. This is instead na issue with lower vs upper case entity ids prepending the guid of claims.

ChangeOpClaim parses guids using the claim guid parser.
When parsing a claim GUID such as 
   'q1$0479EB23-FC5B-4EEC-9529-CEE21D6C6FA9'
a claim guid object is created.

This object consists of an EntityId object and a claim guid string.
When we call getSerilization() for this object we get the serilized entityId and the claim guid string. Due to the change to uppercase for EntityIds this means we get.
   'Q1$0479EB23-FC5B-4EEC-9529-CEE21D6C6FA9'

Therefore when calling $claims->hasClaimWithGuid( $guid->getSerialization() ) we get false when expecting true.
Therefore the claim is not removed before the updated claim is added and thus we have duplicate claims with identical GUIDS...
Comment 3 Addshore 2013-10-09 15:39:47 UTC
Patch to review https://gerrit.wikimedia.org/r/#/c/88752/
Comment 4 Andre Klapper 2013-10-09 23:47:14 UTC
Patch has been merged in master (and I wonder why the Gerrit bot did not update this ticket). 

Addshore: Any reason you set the Version field from "master" to "REL1_21 branch"?
Comment 5 Gerrit Notification Bot 2013-10-10 10:05:51 UTC
Change 88949 had a related patch set uploaded by Tobias Gritschacher:
Fix claim weirdness

https://gerrit.wikimedia.org/r/88949
Comment 6 Addshore 2013-10-10 10:08:26 UTC
Needed on master and on REL1_21 as we branched before this was noticed and patched.

(Not sure if that should have been added as a separate bug or not.)

Both patches are now merged.
Comment 7 Gerrit Notification Bot 2013-10-10 10:12:17 UTC
Change 88949 merged by jenkins-bot:
Fix claim weirdness (cherry picked from commit 46948189c275acd63429f6e42e26d3bc551e9ee4)

https://gerrit.wikimedia.org/r/88949

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links