Page MenuHomePhabricator

Write Huggle labels to Jade
Closed, DeclinedPublic

Description

This task is done when huggle users making judgments about edits is written directly to Jade.

  • When a user decides to revert obvious vandalism, a "damaging", "badfaith" label is stored in Jade: labeldata={"damaging": true, "goodfaith": false}
  • When a user decides to revert a goodfaith edit, a "damaging", "goodfaith" labels is stores in Jade: labeldata={"damaging": true, "goodfaith": true}
  • When a user decides that an edit is good, a "good", "goodfaith" label is stored in Jade: labeldata={"damaging": false, "goodfaith": true}
  • When a user thinks an edit needs expert review, TODO

We'll want to use the proposeorendorse endpoint to store the labels. See the endpoint running on beta: https://deployment.wikimedia.beta.wmflabs.org/w/api.php?action=help&modules=jadeproposeorendorse

jadeproposeorendorse -- Catch all, routing method that tries to *do the right thing* with a label
    @param title (str) The encoded entity name.  (E.g. "Jade:Diff/123456") [required if entitytype or entityid are not set]
    @param entitydata (json) The type of Jade entity (E.g., {"type": "diff", "id": 3245678}) [required if title not set]
    @param facet (str) The facet of the entity being labeled [required]
    @param labeldata (json) The relevant new label data [required]
    @param notes (str) Notes to save when creating a new proposal (A warning will be raised if a proposal already exists.  Notes will not be automatically overwritten.)
    @param endorsementcomment (str) Comment to leave with the endorsement.  Defaults to "As proposer" if not set and creating new proposal. 
    @param origin (str) A structured string representing what the user was looking at when they made this judgment [required]
    @param comment (str) Revision summary
    @param token (str) [required]
    @warning endorsingnonpreferredproposal -- This action resulted in creating an endorsement for a proposal that is not flagged as preferred. 
    @warning nochange -- This action would result in no change.  {user} has already endorsed {labeldata}.

An expected call from Huggle might look something like this:

?action=jadeproposeorendorse
&entitydata={"type": "diff", "id": 123456}
&labeldata={"damaging": true, "goodfaith": false}
&origin=Huggle 2.5.3
&comment=Submitted from Huggle
&token=+SOMESTRINGFROMSOMEWHEREELSE

If it returns warnings, they probably don't matter. You might want to catch "endorsingnonpreferredproposal" as that means the user is performing some action that disagrees with someone else. A confirm dialog would probably be enough.

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
Declinedcalbon
InvalidNone
InvalidNone
Resolvedawight
Resolvedawight
Resolvedawight
Resolvedawight
ResolvedHalfak
ResolvedNone
InvalidNone
ResolvedHalfak
Resolvedawight
ResolvedHarej
DuplicateNone
DeclinedNone
Resolvedawight
Resolvedawight
DeclinedNone
ResolvedReedy
ResolvedLadsgroup
ResolvedLadsgroup
Resolved mmodell
ResolvedNone
ResolvedNone
Resolvedhashar
ResolvedNone
Resolvedawight
DeclinedNone
DuplicateNone
DeclinedNone
DeclinedNone
DeclinedNone
DuplicateNone
DuplicateNone
DuplicateHarej
InvalidNone
DuplicateHalfak
DuplicateNone
InvalidNone
InvalidNone
Resolved ACraze
Resolved ACraze
Resolved ACraze
Resolved ACraze
DeclinedNone
Duplicate ACraze
ResolvedHalfak
ResolvedHalfak
Resolved ACraze
Resolved ACraze
ResolvedNone
ResolvedHalfak
Resolved ACraze
Resolved ACraze
Resolvedkevinbazira
Resolved ACraze
Resolved ACraze
Resolved ACraze
ResolvedNone
ResolvedHalfak
DuplicateHalfak
Resolvedkevinbazira
Resolved ACraze
Resolved ACraze
Resolved ACraze
ResolvedHalfak
Resolved ACraze
Resolved ACraze
Resolvedkevinbazira
ResolvedHalfak
Resolved ACraze
Resolved ACraze
DeclinedNone
Resolvedkevinbazira
ResolvedHalfak
DuplicateHalfak
Resolvedkevinbazira
Resolvedkevinbazira

Event Timeline

Halfak added subscribers: ACraze, Capt_Swing.

I've been talking to @Capt_Swing and @ACraze about the "suspicious" flag. We have a few good options we're thinking about and will extend the description of this task when we think we have something good.

Petrb triaged this task as Medium priority.Mar 27 2020, 9:19 PM
Aklapper lowered the priority of this task from Medium to Lowest.May 23 2021, 10:54 PM