Bug Report: Existing survey responses aren't displayed if the survey questions are deleted or reorganized
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Bug Description
Please describe.
If this affects the front-end, screenshots would be of great help.
If you are on PostHog Cloud it would be really valuable if you can share any links where the problem occurs. This speeds up our ability to troubleshoot tremendously.
How to reproduce
-
Create a survey with at least one question.
-
Have some users answer the survey.
-
Update or delete survey questions
-
Notice that the responses stay counted, but you can't see the actual responses in the UI. As, the UI only shows currently active questions.
-
I have created an example survey here.
-
You can see there are three responses, but no actual answers being displayed.
Additional context
- From https://posthoghelp.zendesk.com/agent/tickets/56523 (moved to PostHog: https://us.posthog.com/project/2/support/tickets/57927)
- The previous question data is still available in the event payloads, but the
Event propertiesget renamed toNaNth question.- Likely because the question is no longer on the survey and returning
NaN.
- Likely because the question is no longer on the survey and returning
- This makes it hard to understand which question is which.
- With those columns added:
Debug info
Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019db682-17de-76f1-b548-be814c71efa3?t=1501
Admin: http://go/adminOrgUS/019c4ed6-add0-0000-998a-30c999608349 (project ID 311650)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the linked example survey after changing or deleting questions, then inspect the survey response UI and the event-property mapping that produces the NaNth question labels. Done means historical responses remain visible and are associated with their original questions even when the current survey questions have changed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, react
- Domain
- analytics, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100