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

Make items.text_id unique #881

Closed
smadbe opened this issue Jan 24, 2023 · 0 comments · Fixed by #896
Closed

Make items.text_id unique #881

smadbe opened this issue Jan 24, 2023 · 0 comments · Fixed by #896
Assignees

Comments

@smadbe
Copy link
Contributor

smadbe commented Jan 24, 2023

Motivations

The text_id of items is used as "identifier" internal to tasks themselves. It can be used for tasks to request to navigate to another tasks (tasks do not know the id of the platform but may know the text_id of another task)

Subtasks

  • On existing data:
    • set text_id to null when it is just a empty string
    • if several items have the same text_id append "2", "3", "4" to duplicates (1 occurrence in former prod copy)
  • Add a unique index on text_id(the index will be soon used for querying)
  • Update the create and update item service doc to inform about the constraint
  • On create and update item services: there should be a way for the caller (frontend) to know that an error is a problem of text_id uniqueness. -> extract the info from the sql error and pass the info in 403 response
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 a pull request may close this issue.

2 participants