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

CodelistVersion.MultipleObjectsReturn in diff view with codelist version tag #1984

Open
rebkwok opened this issue Jun 10, 2024 · 0 comments
Open

Comments

@rebkwok
Copy link
Contributor

rebkwok commented Jun 10, 2024

From sentry issue
This error was raised by trying to diff this codelist with its previous version, tag 20201016.

The diff view accepts an other_tag_or_hash which it uses to filter the CodelistVersion to the one that should be diffed. However, while version hashes are unique, tags are not. For older codelists, there are many where the tag is a date or a version number, and they're the same across multiple codelist versions.

The diff view isn't documented (see #1148), but quite a lot of users know about it, and it's becoming useful now that we have coding system releases as a way to see how a codelist has changed between releases.

How to handles tags is tricky - you can diff codelist versions of different codelists, so you can't easily tell which tag the user intended to refer to. I'd say there are a few options:

  1. Make diffs possible with version hashed ONLY (if we did that, we'd probably also want to display the version hashes on the codelist page as well as the tag, because currently users need to manually type the diff url)
  2. Allow diffs by tag, but only within the same codelist (i.e. if the other_tag_or_hash is a tag, filter CodelistVersion by codelist as well as tag, which will be unique)
  3. Keep behaviour as it is now, but handle the error if there's more than one matching tag, and show some message that tells the user to diff by hash instead
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

1 participant