Page MenuHomePhabricator

Preloaded first task is incorrectly added to the task count for unrelated requests
Closed, ResolvedPublicBUG REPORT

Description

Found while investigating T359992.

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

  • Select exactly 3 task types in the task type topic selector
  • Uncheck quickly the 3 task types
  • Observe task counter in the footer of the dialog

What happens?:
The task counter is 1.

What should have happened instead?:

The task counter should be 0 since there are no task types selected.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Screenshot 2024-07-11 at 13.21.00.png (1×1 px, 264 KB)

Note: NewcomerTasksStore.fetchTasks is always adding the preloadedFirstTask to the computing of the task count after a request is made. While that may be correct for some requests where the enabled filters at the time of loading the page exactly match the ones requested, it is wrong for all requests where there are filter differences.

Event Timeline

Change #1098535 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] fix(NewcomerTaskStore): ensure preloaded first task matches current filters

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

Sgs triaged this task as Low priority.
Sgs moved this task from Triaged to Current Sprint on the Growth-Team board.
Sgs edited projects, added Growth-Team (Current Sprint); removed Growth-Team.
Sgs moved this task from Incoming to Doing on the Growth-Team (Current Sprint) board.
Sgs moved this task from Doing to Code Review on the Growth-Team (Current Sprint) board.

Change #1098535 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] fix(NewcomerTaskStore): ensure preloaded first task matches current filters

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