opensafely-core / opensafely-core/opencodelists

Enhancement request: Add author to all codelist versions

Open
#2,866 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
60
Forks
16
Avg merge
4d 12h
Merged PRs (30d)
17

Description

Summary

Not all codelist versions are created with an author.

What would you like to achieve?

Creating a codelist version in the "normal" way (via the "Create a codelist" page, or by creating a new version in a codelist that supports the builder) adds the user to the codelists as an author. Creating a codelist by uploading a new version (for older codelists that were created by csv uploads, or dm+d codelists until recently) uses the create_old_style_version action and doesn't include the author (also it easily could, from the request).

Who would benefit and how?

It's not obvious who created the last version of a codelist. A user may want to publish a version that's under-review, and it's impossible to find out who created it to see if there's a reason they haven't published it yet.
E.g. https://bennettoxford.slack.com/archives/C33TWNQ1J/p1760600078349889

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in codelists/actions.py at create_old_style_version, following how the upload request supplies its user. Compare this path with normal codelist creation and builder version creation. Done means versions created through older CSV uploads and dm+d uploads include the creating user as an author.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.