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

Simplify the way "edit list" title is determined. #2418

Merged
merged 3 commits into from
May 11, 2022

Conversation

demiankatz
Copy link
Member

@demiankatz demiankatz commented May 4, 2022

This addresses a problem discovered while testing #2417: in PostgreSQL, new rows fetched from the database come with the ID pre-populated from the sequence, even if they are never saved. This interferes with correctly differentiating between "create row" and "edit row" titles. Fortunately, an existing flag offers an easier way to do this correctly.

Note that the underlying cause of the problem may still be a problem, since hitting "create list" repeatedly exhausts IDs unnecessarily. However, I'm not going to worry too much about that right now, since I'm hopeful that switching everything to Doctrine will likely change the situation anyway (see #2233).

TODO

  • Run full test suite with MySQL
  • Run full test suite with PostgreSQL

@demiankatz demiankatz added this to the 8.1 milestone May 6, 2022
Copy link
Contributor

@EreMaijala EreMaijala left a comment

Choose a reason for hiding this comment

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

The change is good, but should

<form class="form-edit-list" method="post" name="<?=empty($this->list->id) ? 'newList' : 'editListForm'?>">
be changed as well?

@demiankatz
Copy link
Member Author

Good catch, @EreMaijala -- I've made the suggested edit and re-run tests in both MySQL and PostgreSQL. I think all is well now, but I'll await your approval before merging.

@demiankatz demiankatz merged commit 56cf186 into vufind-org:dev May 11, 2022
EreMaijala pushed a commit to EreMaijala/vufind that referenced this pull request Nov 10, 2022
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