Clean up participant hash/slug methods (tech debt)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 12
- Forks
- 21
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 5
Description
Summary
We use a few different methods for producing the participant hash and slug (hash-name) in the Responses, Consent and Contact Participants pages, and in the response downloads. This makes it difficult to ensure that hashes/slugs match across the different views. We should clean this up so that we have a central method that can be imported and used in all cases.
- Contact Participants page:
participant_hash/participant_slug - Individual Responses page:
child_id_slug, parent slug (created via JS)
There may be more places that use the slug. It can be created as a hash-nickname string concatenation, rather than via a helper method. Ideally we would always use the same helper method for this in the view classes and pass the value into templates etc. (rather than creating the slug 'on-the-fly' inside templates or JS).
Contributor guide
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 by locating participant_hash and participant_slug on the Contact Participants page, child_id_slug and the parent slug on the Individual Responses page, and slug construction in response downloads and JavaScript. Trace other hash-nickname concatenations across the view classes, templates, and JS, then confirm that all listed views and downloads use one shared helper and produce matching values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- backend, web-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100