Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplication of question when reordering last 2 questions in form builder list #2135

Open
Yelinz opened this issue Sep 30, 2022 · 0 comments
Open
Labels
bug Something isn't working form builder

Comments

@Yelinz
Copy link
Member

Yelinz commented Sep 30, 2022

Screencast.from.30.09.2022.10.02.57.webm

There seems to be a bug when reordering the 2nd last question to the last place. The 2nd last question will be duplicated if its dragged to be the last question. The duplication only happens in that specific condition.

The duplicated question does not actually exist, the next reorder request shows a null in the place of the duplicate.

{
	"operationName": "ReorderFormQuestions",
	"query": "mutation ReorderFormQuestions($input: ReorderFormQuestionsInput!, $search: String) {\n  reorderFormQuestions(input: $input) {\n    form {\n      id\n      ...FormInfo\n      questions(filter: [{search: $search}]) {\n        edges {\n          node {\n            id\n            ...QuestionInfo\n            __typename\n          }\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment FormInfo on Form {\n  id\n  name\n  slug\n  description\n  isArchived\n  isPublished\n  __typename\n}\n\nfragment QuestionInfo on Question {\n  id\n  slug\n  label\n  isRequired\n  isHidden\n  meta\n  isArchived\n  infoText\n  __typename\n}\n",
	"variables": {
		"input": {
			"form": "3-questions",
			"questions": [
				"frage",
				"zahl",
				null,
				"3rd"
			]
		},
		"search": ""
	}
}
@Yelinz Yelinz added bug Something isn't working form builder labels Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working form builder
Projects
None yet
Development

No branches or pull requests

1 participant