Page MenuHomePhabricator

Help panel: create API module for posting messages to help desk, remove MessagePoster implementation
Closed, ResolvedPublic

Description

The API module will receive a POST request from step two of the help panel "ask a question" flow. It should:

  1. Save the user's email, if a new one was supplied
  2. send a verification email if the user's address is not yet confirmed.
  3. Create a new section header on the help desk, and append a timestamp.
  4. Post the received text with signature as an edit from the authorized user, using a help-panel tag (T211118)
  5. Return a response containing:
    1. success or error message & error code
    2. the section header, so that we can construct a link to take the user directly to their question on help desk
    3. the user's edit count after making the edit with the request.

The second part of this task is removing the MessagePoster implementation in favor of the new API module.

Details

Related Gerrit Patches:
mediawiki/extensions/GrowthExperiments : masterHelp Panel: Add API module to post questions

Related Objects

Event Timeline

kostajh created this task.Dec 6 2018, 8:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 6 2018, 8:09 PM
kostajh renamed this task from Create API module for posting messages to help desk to Create API module for posting messages to help desk, remove MessagePoster implementation.Dec 6 2018, 8:10 PM
kostajh updated the task description. (Show Details)
kostajh updated the task description. (Show Details)Dec 7 2018, 4:05 PM
kostajh removed kostajh as the assignee of this task.Dec 7 2018, 9:57 PM

Unassigning for now since I'm about to sign off for the day.

Change 478769 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] WIP: Help Panel: Add API module to post questions

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

MMiller_WMF renamed this task from Create API module for posting messages to help desk, remove MessagePoster implementation to Help panel: create API module for posting messages to help desk, remove MessagePoster implementation.Dec 11 2018, 10:37 PM
MMiller_WMF added a subscriber: MMiller_WMF.

Change 478769 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Help Panel: Add API module to post questions

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

Etonkovidova closed this task as Resolved.Dec 21 2018, 1:05 AM
Etonkovidova added a subscriber: Etonkovidova.

Checked in betalabs api - works as expected - e.g.

{
    "helppanelquestionposter": {
        "result": "success",
        "revision": 387966,
        "isfirstedit": 0,
        "viewquestionurl": "https://en.wikipedia.beta.wmflabs.org/wiki/Wikipedia:Help_desk#Help_panel_question_(01:00,_21_December_2018)",
        "email": "already_confirmed"
    }
}

The questions are correctly posted and email address is correctly identified as confirmed or as non-confirmed.