Last modified: 2014-10-16 18:59:38 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 T74069, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72069 - WikiGrok version B not recording data
WikiGrok version B not recording data
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
alpha (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-15 02:21 UTC by Ryan Kaldari
Modified: 2014-10-16 18:59 UTC (History)
6 users (show)

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


Attachments

Description Ryan Kaldari 2014-10-15 02:21:37 UTC
Version B is not recording data on Tool Labs. BTW, there is now an api2.php that supports recording multiple claims at once, if you want to try it out.
Comment 1 Florian 2014-10-15 18:35:01 UTC
Can you give an example URL and what data should be logged and which isn't logged? (Or is the data, already should be logged in DialogB, not logged?).
Comment 3 Florian 2014-10-15 21:08:26 UTC
There is a difference in the call of recordOccupation() function of WikiGrokApi. (Unhappily there is no documentation :P). The function is defined to take 3 arguments (occupationId, occupation, claimIsCorrect).

Dialog A gives these three arguments (https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/javascripts/modules/wikigrok/WikiGrokDialog.js#L108) and implied, that version A data is logged sucessful, this is the correct call.

In contrast to this, Dialog B gives only one argument (https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/javascripts/modules/wikigrok/WikiGrokDialog.js#L108), the answer, which should be occupationId (which is missing in the request). But i would appreciate it to clarify this, before further actions :)

@Kaldari: I can't find the api code (maybe i haven't searched enough), but does the api checks for the "correct" value, and when, how? :)
Comment 4 Ryan Kaldari 2014-10-15 21:22:30 UTC
@Florian: That code just lives on Tool Labs right now (for testing). The code is at https://github.com/kaldari/WikiGrokAPI (with some limited documentation). api2.php (which handles multiple claims at once) doesn't have any documentation yet though.
Comment 5 Jon 2014-10-15 21:25:01 UTC
Florian your diagnosis towards the JS bit sounds about right :)
Florian yup to the documentation we have a TODO note to sort this out this week :)
Comment 6 Ryan Kaldari 2014-10-15 21:33:58 UTC
I added more error handling to the API just now. WikiGrok version B definitely needs to pass the occupation_id. The 'correct' param, however, is optional.
Comment 7 Florian 2014-10-15 21:42:28 UTC
Kaldari and i discusses to make the "correct" param to an optional one, so it's not blocking the recording of an answer. Still neded is the occupation_id and occupation param, which should be in request, after we use the same Api call of recordOccupation() like it is in dialog a and like it is defined. After this, it should work.

After i got back my development environment, i can try to work on this, if there is no one other, who did already :)
Comment 8 Jon 2014-10-15 22:40:54 UTC
We need to get a fix out before the next deployment train so I might pick this up Florian if that's okay. But thanks for making it easier for me to work out how :)
Comment 9 Florian 2014-10-16 04:22:39 UTC
I don't want to block this, so feel free to do so :)
Comment 11 Florian 2014-10-16 12:25:42 UTC
Just to clarify: Kaldari means, that there is NO data logged, right? Or just, that it isn't logged, that version b is used? *confused*
Comment 12 Jon 2014-10-16 18:59:38 UTC
Yeh data was not getting saved when you completed wikigrok dialog b.

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


Navigation
Links