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

As an admin, when I change work slugs I want past slugs stored and used for redirects on public views so that links for edited works continue to resolve. #613

Closed
5 tasks done
rlskoeser opened this issue May 14, 2020 · 1 comment
Assignees

Comments

@rlskoeser
Copy link
Contributor

rlskoeser commented May 14, 2020

testing notes

The scenario for this is if someone cites or links to a book page (including urls in the data exports) and we change records in the database, we want that link to still resolve if possible. The easiest way to test it might be this: choose a work record on the test database and open up multiple different work detail pages in different tabs (bibliography, circulation activities, card list) so that you have URLs ready to test after you make changes. Then test that:

  • when you edit a work and change the slug, the a past slug — it should be visible but read only in the admin edit page
  • all work details pages for the old slug should redirect to the new slug — you should see the content instead of a 404, and the location in your browser should show the new slug
  • test that if you add or edit a work and try to use a slug that is a previously used slug on a different work, you get a validation error

Should be able to adapt implementation from #434 (but simpler since there is no book merge method).

dev notes

  • add alternate/old slugs field to work
  • make old slugs visible (read only) in admin
  • validate new slugs to avoid collisions with old slugs
  • add old slug on save if slug changes
  • permanent redirect on old slug match for all work detail pages
@rlskoeser rlskoeser added this to the v1.1 milestone May 14, 2020
@rlskoeser rlskoeser removed this from the v1.1 milestone May 29, 2020
@rlskoeser rlskoeser self-assigned this Jul 7, 2020
@rlskoeser
Copy link
Contributor Author

@jkotin this is available for testing now, see the notes in the issue description. It's similar to functionality we previously implemented for members that Cate tested and signed off. I decided it was important to implement now to make the book urls in the data exports more durable.

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

No branches or pull requests

2 participants