Page MenuHomePhabricator

Results page - submit review decisions
Closed, ResolvedPublic8 Estimated Story Points

Description

(!) DOES NOT INCLUDE LOADING STATE (!)

As a mismatch reviewer
I want to submit my decision for a mismatch
in order to later mark the mismatch as resolved so no other reviewer will spend time on this mismatch

Screenshots/mockups:
Link to Figma.

Screenshot 2021-09-21 at 17.30.26.png (476×1 px, 67 KB)

Screenshot 2021-09-21 at 17.30.35.png (470×1 px, 75 KB)

Screenshot 2021-09-21 at 17.30.50.png (460×1 px, 74 KB)

Screenshot 2021-09-21 at 17.31.08.png (480×1 px, 69 KB)

Screenshot 2021-09-21 at 17.34.26.png (542×1 px, 73 KB)

BDD
GIVEN a mismatch
WHEN reviewing it in the results page
THEN I can submit my review decision to the mismatch store

GIVEN a mismatch
WHEN submitting a review decision encounters an error
THEN an error message is shown

Acceptance criteria:

  • reviewers can submit their decision to the store
  • error message is shown when an error on submit is encountered in the same way as in T289344
  • T290953 tackles the dialog component that is displayed after the user submit their decision

Notes:

  • The last submission "wins" so if someone submits a new decision for something that already has a decision, we overwrite the existing decision.

Related Objects

StatusSubtypeAssignedTask
ResolvedItamarWMDE
ResolvedLydia_Pintscher
ResolvedItamarWMDE
ResolvedLydia_Pintscher
ResolvedSilvan_WMDE
Resolvedguergana.tzatchkova
ResolvedSilvan_WMDE
ResolvedLydia_Pintscher
ResolvedItamarWMDE
Resolvedguergana.tzatchkova
ResolvedSilvan_WMDE
ResolvedItamarWMDE
InvalidItamarWMDE
ResolvedItamarWMDE
Resolvedguergana.tzatchkova
ResolvedItamarWMDE
ResolvedItamarWMDE
ResolvedSilvan_WMDE
Resolvedguergana.tzatchkova
ResolvedSarai-WMDE
ResolvedSarai-WMDE
ResolvedSilvan_WMDE
Resolvedguergana.tzatchkova
ResolvedItamarWMDE
ResolvedItamarWMDE
Resolvedguergana.tzatchkova
ResolvedSilvan_WMDE
Resolvedguergana.tzatchkova
ResolvedNone

Event Timeline

Notes from task breakdown:

  • create a web endpoint that receives mismatches and updates them in the database (T292050)
    • payload is expected to be an array of full mismatch data, including the updated review_status
    • can't re-use the existing single-mismatch MismatchPutRequest
    • create new batch validation rules (can't re-use the single-mismatch rules)
    • respond with a redirect back to the results page (which will pick the new results from the db and display them on the page)
    • feature test the new route
  • send mismatches from the internal Resultspage data model to that endpoint on submit (T292054, depends on T289557)
    • create one form for each result (i.e. item), with the mismatches table and a submit button
    • submitting the form will trigger a handler to send the data
    • the buttons will be disabled until the new endpoint task is done
    • write a unit test for the Results page that mocks $inertia (see Home.vue) and makes sure that the put method is called with the correct URL and payload
    • payload is expected to be an array of full mismatch data, including the updated review_status
  • tie together changed frontend data model with the endpoint (T292058, depends on T292050 and T292054)
    • enable the submit buttons
    • test e2e behaviour with browser tests: user can submitting a selected value and the new state appears on the results page
  • handle errors and display a Wikit message in the same way as done on the Home page (see T289344) (T292055)
    • triggers on response statuses >=500 (handled in \App\Exception\Handler.php already)
    • modify the existing redirect(route('home') in Handler.php to something more generic like back()
    • Figma design
    • maybe move the shared error message box including styles into its own vue component (and replace in Home.vue)
    • test e2e behaviour with browser tests