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

Improve behavior for PK values #1356

Closed
pavish opened this issue May 6, 2022 · 3 comments
Closed

Improve behavior for PK values #1356

pavish opened this issue May 6, 2022 · 3 comments
Assignees
Labels
ready Ready for implementation restricted: maintainers Only maintainers can resolve this issue type: bug Something isn't working work: frontend Related to frontend code in the mathesar_ui directory

Comments

@pavish
Copy link
Member

pavish commented May 6, 2022

Current behavior

  • We allow editing/removing default values for all columns, including PK columns.
  • We do not allow editing cells for PK columns.

Bugs due to the current behavior

  • Users are able to remove a dynamic default value for PK columns. Once removed, adding any new row will fail.
  • If no default value is present for a PK column, adding a new row will fail. Since we do not allow editing PK column cells, users will never be able to add a new row.

Expected behavior

  • Users should not be able to remove/modify a dynamic default value of a PK column.
  • Users should be able to edit a PK column cell in an un-saved row. They should not be allowed to do that for saved rows.
  • Creating records via the Record Selector should also work smoothly when supplying PK values
@pavish pavish added restricted: maintainers Only maintainers can resolve this issue ready Ready for implementation type: bug Something isn't working work: frontend Related to frontend code in the mathesar_ui directory labels May 6, 2022
@kgodey kgodey added this to the [08.1] 2022-05 improvements milestone May 6, 2022
@seancolsen
Copy link
Contributor

Related: #1362, #1361

@kgodey kgodey modified the milestones: [08.1] 2022-05 improvements, High Priority Jun 1, 2022
@pavish
Copy link
Member Author

pavish commented Oct 12, 2022

Blocked by #1672

@pavish pavish added needs: unblocking Blocked by other work and removed ready Ready for implementation labels Oct 12, 2022
@seancolsen seancolsen added ready Ready for implementation and removed needs: unblocking Blocked by other work labels Jan 3, 2023
@seancolsen seancolsen changed the title Disable removing dynamic default value for primary keys, allow editing PK column in new un-saved rows if no default value is set Improve behavior for PK values Jan 5, 2023
@seancolsen
Copy link
Contributor

I've done some research and exploration on this today and am closing this ticket with the following findings:

  • Users should not be able to remove/modify a dynamic default value of a PK column.

    I've tested this and not been able to identify any UI that allows users to remove/modify dynamic default values in PK columns. I suspect the reporting of this issue came from before our Table Inspector changes.

  • Users should be able to edit a PK column cell in an un-saved row. They should not be allowed to do that for saved rows. Creating records via the Record Selector should also work smoothly when supplying PK values

    I opened Should we allow users to specify PK values while adding records? If so, how? #2336 to discuss these points in more detail.

@seancolsen seancolsen closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Ready for implementation restricted: maintainers Only maintainers can resolve this issue type: bug Something isn't working work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

No branches or pull requests

3 participants