Page MenuHomePhabricator

Fix SurveyFactory and messages mounting
Closed, ResolvedPublic

Description

A couple of issues found during testing:

  • In SurveyFactory.php -> L390 (factoryExternal function), we're looping through the array $questions - we can't use the var $question as it already exists and is being used above in L368.
  • The method getMessages() needs to account for all messages used, we included more props like questions (array of objects) and all items in this array need to be verified to mount the messages array (used when registering the survey module in Hooks.php -> onResourceLoaderRegisterModules()

Event Timeline

Change #1031547 had a related patch set uploaded (by Mimurawil; author: Mimurawil):

[mediawiki/extensions/QuickSurveys@master] T364793: Fix messaging formation in new field `questions`

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

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

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

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

https://patchdemo.wmflabs.org/wikis/42ce80c18c/w/

Change #1037233 had a related patch set uploaded (by Simone Cuomo; author: Simone Cuomo):

[mediawiki/extensions/QuickSurveys@community-safety] Improve capability of QuickSurvey

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

Change #1037233 merged by jenkins-bot:

[mediawiki/extensions/QuickSurveys@community-safety] Improve capability of QuickSurvey

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

Change #1031547 abandoned by Simone Cuomo:

[mediawiki/extensions/QuickSurveys@master] T364793: Fix messaging formation in new field `questions`

Reason:

The work for this branch and ticket has been completed in a feature branch "https://gerrit.wikimedia.org/r/c/mediawiki/extensions/QuickSurveys/+/1037233"

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

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

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

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

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

https://patchdemo.wmflabs.org/wikis/1f5a200338/w/

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

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

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

https://patchdemo.wmflabs.org/wikis/80286dd93e/w/

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

https://patchdemo.wmflabs.org/wikis/7ed125994c/w/

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

https://patchdemo.wmflabs.org/wikis/0d85df7998/w/