Page MenuHomePhabricator

Only reject a suggestion after multiple user choices
Closed, ResolvedPublicFeature

Description

Feature summary:
We need a threshold number of user requests before rejecting a suggestion.
Initially this should be 3 users, but make sure it's easily configurable.

Note that it does not matter which campaign the suggestion is rejected from. As long as 3 different users have rejected the given suggestion for a particular image, it should be marked as rejected.

Related:

Technical info
We need to add two new columns to the Suggestions table:

  • google_vision_submitted
  • metadata_to_concept_submitted

Both should be Boolean values defaulting to False

When the user rejects a suggestion, the server adds a new row in the Suggestions table.
Just before this happens, we need to:

1 - Query the database to get all Suggestions with:

  • update_status = 0 (rejection)
  • file_name = <file the user rejected the suggestion from>
  • depict_item = <item rejected by user>

2 - IF there are already 2 Suggestions in the results:
Commit the new Suggestion to the database with either, google_vision_submitted = True, metadata_to_concept_submitted = True, OR Both = True (depending on the which services are True in the Suggestion data you are currently processing)

ELSE:
Commit the rejection to the database with both submit columns left at default value of False

NOTE: best to actually check for >1 suggestions instead of =2 to catch unexpected extra rejections
IMPORTANT: For this patch, nothing else need to happen other than store the rejection submitted status in the database. As part of T315668: Submit reviews back to MachineVision service, we will need to successfully send the rejection back to the GoogleVision service (and equivalent for Metadata-to-Concept) in order to commit the suggestion with google_vision_submitted = True

Details

Event Timeline

NavinoEvans raised the priority of this task from Low to Medium.
NavinoEvans moved this task from Pending to In progress on the ISA board.

Change 831621 had a related patch set uploaded (by Eugene233; author: Eugene233):

[labs/tools/Isa@master] Only reject a suggestion after multiple user choices

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

Change 831621 merged by jenkins-bot:

[labs/tools/Isa@master] Only reject a suggestion after multiple user choices

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

NavinoEvans moved this task from Review to Merged on the ISA board.