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 Project and TaskType names unique by Organization (second try) #5381

Merged
merged 6 commits into from
Apr 15, 2021

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Apr 8, 2021

Project and TaskType names had to be globally unique. Now, they are uniqe per organization.

Reverts #5379 (which reverted the original #5334 )

Difference being that the unique constraint is no longer enforced in the database, but only via scala, compare issue description in #5388 I also made sure that the name is immutable (front-end already grayed out the form value, but backend didn’t enforce it) See last commits for the diff.

Quoted from original PR:

TODO

  • change unique constraints in schema
  • add organization during insert
  • change project api (by orga+name/by id/by disambiguation)?
  • change edit view route
  • use new api in frontend
  • adapt task search form
  • task search form persistence? → follow-up Double-Check that localstorage persistence typechecks work #5337
  • how to access project name for rendering form?
  • adapt access queries
  • rest api versioning
  • evolutions
  • snapshot tests

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • List projects, create project, edit project, should all still work as expected
  • Create tasks, search for tasks by project, should show.
  • Try to create second project with the same name, should fail with readable message.
  • Create second organization
  • Create project with name used in other org, should work
  • Edit projects, the ones across organizations should not influence each other
  • same with task types.

Issues:


@fm3 fm3 self-assigned this Apr 8, 2021
@fm3 fm3 changed the title [WIP] Make Project and TaskType names unique by Organization (second try) Make Project and TaskType names unique by Organization (second try) Apr 12, 2021
@fm3 fm3 marked this pull request as ready for review April 12, 2021 11:37
@fm3 fm3 requested a review from youri-k April 12, 2021 11:39
@fm3 fm3 enabled auto-merge (squash) April 13, 2021 06:31
@fm3 fm3 disabled auto-merge April 13, 2021 07:05
Copy link
Contributor

@youri-k youri-k left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@fm3 fm3 enabled auto-merge (squash) April 15, 2021 14:11
@fm3 fm3 merged commit 81bb40f into master Apr 15, 2021
@fm3 fm3 deleted the revert-5379-revert-5334-project-tasktype-unique-by-orga branch May 3, 2021 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project/Task type names names should not have to be unique across all organizations
2 participants