Skip to content

dashboard: add "Edit Title" option for submissions without an attached INSPIRE ID#961

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-edit-title-option
Draft

dashboard: add "Edit Title" option for submissions without an attached INSPIRE ID#961
Copilot wants to merge 3 commits intomainfrom
copilot/add-edit-title-option

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Coordinators creating submissions without an INSPIRE ID provide a provisional title, but had no way to update it from the dashboard before attaching an INSPIRE record. This adds an "Edit Title" button alongside the existing "Attach INSPIRE Record" button for such submissions.

Changes

  • Backend (dashboard/views.py): New POST /dashboard/update_title/<recid> endpoint — guards against submissions that already have an INSPIRE ID, enforces coordinator/admin-only access, rejects empty titles
  • Template (dashboard-submissions.html): Renders "Edit Title" button next to "Attach INSPIRE Record" when requires_inspire_id and submission_status == 'todo'
  • Modal (edit-title-widget.html): New Bootstrap modal with input field, loading/success/error states
  • JS (hepdata_dashboard.js): Binds .edit-title-btn click to populate and open the modal; handles AJAX POST and reloads dashboard on success
  • Tests (dashboard_test.py): Covers successful update, empty title rejection, and rejection when an INSPIRE ID is already attached

…INSPIRE ID

Agent-Logs-Url: https://github.com/HEPData/hepdata/sessions/32e73825-d444-4737-b992-19c670171d01

Co-authored-by: GraemeWatt <11544204+GraemeWatt@users.noreply.github.com>
Copilot AI changed the title [WIP] Add 'Edit Title' option for submissions without INSPIRE ID dashboard: add "Edit Title" option for submissions without an attached INSPIRE ID Mar 31, 2026
Copilot AI requested a review from GraemeWatt March 31, 2026 18:27
@GraemeWatt GraemeWatt requested review from ItIsJordan April 1, 2026 13:46
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.

dashboard: add an "Edit Title" option for submissions without an attached INSPIRE ID

3 participants