Page MenuHomePhabricator

'Under review' filter does not find articles if 'Pending AfC submissions' is present
Closed, ResolvedPublic1 Estimated Story Points

Description

  1. In testwiki, enable the gadget "Yet Another AFC Helper Script" in Preferences-Gadgets to enable 'Review (AFCH)' options.
  2. After the article in Draft namesapce will be created and submitted for review (via Review (AFCH) options), it'll have:

Categories: Pending AfC submissions AfC submissions by date/18 July 2018.

  1. Apply the option 'Mark as under review' - the category: Pending AfC submissions being reviewed now will be added.

The 'Article for creation' Under review filter will not find draft articles that have both: Pending AfC submissions and Pending AfC submissions being reviewed now. The examples are on https://test.wikipedia.org/wiki/Special:NewPagesFeed.

Event Timeline

Is this a matter of changing the order in which we map states to categories? i.e. at the moment we have:

			self::PENDING => 'Pending_AfC_submissions',
			self::UNDER_REVIEW => 'Pending_AfC_submissions_being_reviewed_now',
			self::DECLINED => 'Declined_AfC_submissions',

and it uses the first category it finds. It sounds like under review should trump pending.

MusikAnimal renamed this task from [testwiki] 'Under review' filter does not find articles if 'Pending AfC submissions' is present to 'Under review' filter does not find articles if 'Pending AfC submissions' is present.Jul 19 2018, 6:34 PM

Change 446882 had a related patch set uploaded (by MusikAnimal; owner: MusikAnimal):
[mediawiki/extensions/PageTriage@master] Look for 'pending review' category before 'pending' for AfC draft state

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

Is this a matter of changing the order in which we map states to categories? i.e. at the moment we have:

			self::PENDING => 'Pending_AfC_submissions',
			self::UNDER_REVIEW => 'Pending_AfC_submissions_being_reviewed_now',
			self::DECLINED => 'Declined_AfC_submissions',

and it uses the first category it finds. It sounds like under review should trump pending.

What he said!

Also to note: By design, drafts cannot be in more than one state in the database. Some drafts (example) can be in the pending, under view, and declined categories. In this case, I don't think the draft should show up in the "declined" filtered list, or the "pending" list either, but only in "under review". The above patch force this behaviour.

MusikAnimal moved this task from Ready to Needs Review/Feedback on the Community-Tech-Sprint board.
MusikAnimal set the point value for this task to 1.

Change 446882 merged by jenkins-bot:
[mediawiki/extensions/PageTriage@master] Look for 'pending review' category before 'pending' for AfC draft state

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

@Etonkovidova This is up for you to test on beta now. It will be available on testwiki next Tuesday afternoon, PST.

Checked in enwiki betalabs - it seems that the fix is not working.

Take a look at the most recently created drafts - https://en.wikipedia.beta.wmflabs.org/wiki/Draft:Mavetuna78_3, https://en.wikipedia.beta.wmflabs.org/wiki/Draft:Mavetuna78_2, and https://en.wikipedia.beta.wmflabs.org/wiki/Draft:Mavetuna78_1.

The drafts have the right template displayed - Review in progress.; Categories will be listed in unchanged order:
Categories: Pending AfC submissions | Pending AfC submissions being reviewed now | AfC submissions by date/19 July 2018

Beta hasn't been updated to the latest PageTriage code yet https://en.wikipedia.beta.wmflabs.org/wiki/Special:Version — should be soon (it's only been 2 hours).

@Samwilson I re-checked just now - in betalabs when a user who is just in Users group clicks Submit there is a captcha error on the page and an article stays in Unsubmitted state:

Screen Shot 2018-07-20 at 10.26.07 AM.png (352×1 px, 74 KB)

Also, Under review filter still does not work.

Change 447081 had a related patch set uploaded (by MusikAnimal; owner: MusikAnimal):
[mediawiki/extensions/PageTriage@master] Iterate through AfC cats instead of draft cats when setting AfC state

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

in betalabs when a user who is just in Users group clicks Submit there is a captcha error on the page and an article stays in Unsubmitted state

This might be an issue with the AFCH script (not our responsibility). New-ish users do not have access to it, so for the purposes of testing just make sure you use your (auto)confirmed account. Draft authors won't use AFCH to submit, instead using the "Submit your draft for review" button within the template.

Also, Under review filter still does not work.

Indeed, it's iterating over the categories on the page then doing comparisons against the defined AfC categories. It should happen in the reverse way. Above patch should fix this, and I added a unit test. Will ping you when it's merged!

Change 447081 merged by jenkins-bot:
[mediawiki/extensions/PageTriage@master] Iterate through AfC cats instead of draft cats when setting AfC state

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

Checked in betalabs - 'Under review' filters finds the articles with Pending AfC submissions being reviewed now category (independently if other AfC categories are present or not).
e.g. the article with follwoing categories will be displayed if 'Under review' filter is present:

Categories: Pending AfC submissions Pending AfC submissions being reviewed now AfC submissions by date/27 July 2018