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

assign unique survey name when importing survey from Collect #1622

Merged
merged 2 commits into from
Jul 26, 2021

Conversation

SteRiccio
Copy link
Member

No description provided.

@SteRiccio SteRiccio self-assigned this Jul 26, 2021

while (isDuplicate(currentName)) {
count += 1
currentName = `${nameWithoutCount}_${count}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about use a timestamp, maybe it is easier

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's ugly!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the suffix _count is easier to read and to modify, if needed

@mergify mergify bot merged commit 86d113e into master Jul 26, 2021
@mergify mergify bot deleted the bugfix/collect-import-duplicate-name branch July 26, 2021 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants