Skip to content

Conversation

@PouyaMohseni
Copy link
Contributor

This update modifies the current instrument model because HBS entries now require reviewer validation. The implementation allows:

  • Any user to propose an HBS number if no validated HBS exists.
  • Only one contribution per user is allowed; if more, reflected as edits.
  • Once reviewed, the main HBS is flagged, which is reflected in the instrument model and no HBS proposals is allowed after.

resolves #496

Examples:
UI for proposing an HBS:
Screenshot 2026-01-29 at 6 22 54 PM

Basic validation function:
Screenshot 2026-01-29 at 6 25 02 PM

Contributor view when the proposal is under review:
Screenshot 2026-01-29 at 6 25 18 PM

- Added HornbostelSachs model with fields: instrument FK, hornbostel_sachs_class, contributor, is_main, review_status, on_wikidata
- Linked HornbostelSachs to Instrument model via FK
- Auto-update instrument main HBS and unset others on save
- Handle add-class modal and form
- Update NameValidator to validate HBS input
- Posts classification through instrument/<int:pk>/names/ endpoint
- show main Hornbostel-Sachs class on instrument detail page
- add buttons to propose or edit HBS if authenticated
- include addClass.html partial
- Enable list filtering by `review_status`
- Restrict editable fields for users in the 'reviewer' group
@yinanazhou
Copy link
Member

This overlaps with the new instrument feature. I recommend you to hold this now.

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

Successfully merging this pull request may close these issues.

Feature request: a button to edit/add HBS number

3 participants