opensafely-core / opensafely-core/opencodelists
Enhancement request: Add author to all codelist versions
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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