Page MenuHomePhabricator

WikiGrok version B not recording data
Closed, ResolvedPublic

Description

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.


Version: unspecified
Severity: normal

Details

Reference
bz72069

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:55 AM
bzimport set Reference to bz72069.
bzimport added a subscriber: Unknown Object (MLST).

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?).

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? :)

@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.

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 :)

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.

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 :)

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 :)

I don't want to block this, so feel free to do so :)

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*

Yeh data was not getting saved when you completed wikigrok dialog b.