Page MenuHomePhabricator

Form contents should be cleared after submitting
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  1. Install the ReportIncident extension
  2. Load a user talk page
  3. Click on the "Report" link
  4. Click through to the second step in the dialog box using the primary button in the footer of the dialog.
  5. Submit incident report with valid fields
  6. Click the "Report" button again

What happens?:

Form contents are the same as they were prior to submitting.

What should have happened instead?:

The form should be empty.

Event Timeline

I partly did this in the yet to be merged patch for T338818: Implement rules for form validation, but this task can also define the behaviour when the submission fails (i.e. some kind of visual message indicating that the submission failed).

I partly did this in the yet to be merged patch for T338818: Implement rules for form validation,

Thanks; assigning this one to you then :)

but this task can also define the behaviour when the submission fails (i.e. some kind of visual message indicating that the submission failed).

I think we can cover that in T338804: [S] Inform the user about the success or failure of submitting a report

Change 960142 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/ReportIncident@master] Perform form validation on step 2

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

Change 960142 merged by jenkins-bot:

[mediawiki/extensions/ReportIncident@master] Perform form validation on step 2 and reset form on successful submit

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

Change 961380 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/ReportIncident@master] Follow-up: Reset required field disable booleans on succesful submit

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

Change 961380 merged by jenkins-bot:

[mediawiki/extensions/ReportIncident@master] Follow-up: Disable required field checks again after call to $reset.

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

The steps to replicate the issue should be good for QA and can be done on patchdemo.

Test wiki created on Patch demo by DJacksonA using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/6a32cd58e1/w

Just to add a little more context to why this is blocked is because this ticket relies upon an email being sent after the user clicks Submit... See ticket https://phabricator.wikimedia.org/T339275 for further details.

Test wiki created on Patch demo by DJacksonA using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/fdeb74d8d9/w

Test wiki on Patch demo by DJacksonA using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/fdeb74d8d9/w/

Test wiki created on Patch demo by DJacksonA using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/127fb9e231/w

Test wiki created on Patch demo by DJacksonA using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/5210b254d7/w

I have verified the fix for this issue has been implemented and is working as expected per the Ticket Description... Great work @Dreamy_Jazz!!!

Test wiki on Patch demo by DJacksonA using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/6a32cd58e1/w/

Test wiki on Patch demo by DJacksonA using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/127fb9e231/w/

Test wiki on Patch demo by DJacksonA using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/5210b254d7/w/