Page MenuHomePhabricator

Survey names should be unique
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

Since we can only distinguish between survey initial impressions by using the survey name, it's important that multiple surveys don't share a name at any moment in time. We can add validation to check for this condition.

Steps for QA

  1. Two surveys with the same name would need to be deployed to beta
  2. Check logs for "Bad survey configuration: The survey name XXX is not unique"

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptJun 15 2020, 12:32 PM

Change 605595 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/QuickSurveys@master] Extract logic from ServiceWiring

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

Change 605595 merged by jenkins-bot:
[mediawiki/extensions/QuickSurveys@master] Extract logic from ServiceWiring

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

ARamirez_WMF renamed this task from Survey names should be unique to Survey names should be unique [S].Oct 4 2021, 3:17 PM
ARamirez_WMF triaged this task as Low priority.
ARamirez_WMF renamed this task from Survey names should be unique [S] to Survey names should be unique .Oct 4 2021, 3:20 PM
ARamirez_WMF set the point value for this task to 2.

Would we throw an exception when a survey name is not unique? Because it's read from the config, I'm just wondering when that would get caught and shown to the admin setting it up. If someone accidentally deployed a not unique survey name to prod, I wouldn't want users seeing it.

Change 730883 had a related patch set uploaded (by Mepps; author: Mepps):

[mediawiki/extensions/QuickSurveys@master] WIP: One way of validating unique survey names

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

โ€ข mepps updated the task description. (Show Details)
โ€ข mepps updated the task description. (Show Details)
โ€ข mepps updated the task description. (Show Details)

QUESTION - if there are two (or more) QS with same names, how to specify WHICH is considered the duplicate?

QUESTION - is this ALL surveys or just Quick Surveys?

@ERayfield did someone give you an answer to this?

@ARamirez_WMF , nope, although I am sure it will happen at some point in time

I did answer both questions in slack where they were asked as well.

https://wikimedia.slack.com/archives/C0269GFNG3Z/p1638222156195200 and https://wikimedia.slack.com/archives/C0269GFNG3Z/p1638222190195600

QUESTION - if there are two (or more) QS with same names, how to specify WHICH is considered the duplicate?

I think Maggie and I assumed the moment you see one with a name you've already seen, that's the one we error as duplicate. I guess that means the second one is the one erroring out.

QUESTION - is this ALL surveys or just Quick Surveys?

Joaquin Oltra Hernandez: I don't understand this question. What do you mean All / Quick? QuickSurveys is the extension name, and there you configure surveys. Do you mean internal / external surveys?

Ellen Rayfield:
no, I don't know if there is more than one type of survey - if only dealing with QS, then that is cool. If there are other survey types/definitions that need to be worried about then I am going to get worried

I guess the answer is just QuickSurveys, I'm not sure what other surveys you may be referring to.

Change 743488 had a related patch set uploaded (by EllenR; author: EllenR):

[mediawiki/extensions/QuickSurveys@master] Checks name of enabled Quick Survey for duplicate, logs if issue

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

Change 743488 had a related patch set uploaded (by EllenR; author: EllenR):

[mediawiki/extensions/QuickSurveys@master] Checks name of enabled Quick Survey for duplicate, logs if issue

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

Reviewed; now it's waiting on a second set of eyes.

Change 743488 merged by jenkins-bot:

[mediawiki/extensions/QuickSurveys@master] Checks name of enabled Quick Survey for duplicate, logs if issue

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

Change 730883 abandoned by Mepps:

[mediawiki/extensions/QuickSurveys@master] WIP: One way of validating unique survey names

Reason:

This was just meant as an example.

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

Change 833073 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/QuickSurveys@master] Fix broken "survey name must be unique" check

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

Change 833074 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/QuickSurveys@master] Dramatically simplify uniqueness check

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

Change 833073 merged by jenkins-bot:

[mediawiki/extensions/QuickSurveys@master] Fix broken "survey name must be unique" check

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

Change 833074 merged by jenkins-bot:

[mediawiki/extensions/QuickSurveys@master] Dramatically simplify uniqueness check

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