Skip to content

Draft: Short title in URL

Bengfort requested to merge short-title-in-url into main

A study is uniquely identified by its numeric id. However, to make this more human friendly, we are planning to use the format {id}-{short_title}. This format should be used consistently, starting with URLs.

Of course, including redundant information begs the question: What should we do if the short title doesn't match the ID? I can think of different options:

  1. Respond with an error.
  2. Ignore the short title, only actually use the ID.
  3. Automatically redirect to the URL with the correct short title. (implemented in this draft)
  4. Tell users that the combination does not exist, but that the ID exists with a different short title.
  5. Variant to limit code complexity: Respond with an error on most views, and use any of the other options on the study detail view.
  6. Keep the short title out of URLs after all.

The title of the study might not be clear when the study is first registered. We therefore allow to change the short title later on. In that case option (3) is probably preferable.

On the other hand, an evil scientist who is working on study 123-evil could easily use the ID 123-good, e.g. in an ethics application, which has at least some potential to confuse reviewers. This could be prevented by choosing option (1).

Because most of our views are related to a study, this change impacts a lot of code, and it will only get worse. I would like to get a decision on this as soon as possible.

Edited by Bengfort

Merge request reports