Skip to content

[ENG-12678] Unable to submit a project to a collection after editing any section - #1105

Merged
brianjgeiger merged 2 commits into
CenterForOpenScience:feature/pbs-26-22from
sh-andriy:fix/ENG-12678
Nov 19, 2026
Merged

brianjgeiger merged 2 commits into
CenterForOpenScience:feature/pbs-26-22from
sh-andriy:fix/ENG-12678

Conversation

@sh-andriy

@sh-andriy sh-andriy commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Submitting a project to a collection with a CEDAR template failed with "Submitted object must have a published CEDAR metadata record..." after any section was edited. When the Collection Metadata step opened again, the saved answers were loaded with instanceObject, which doesn't rebuild the editor's validity report, so the record was saved as a draft and the submission was rejected. Update on an existing submission had the same issue and switched its published record back to draft.

The CEDAR form on the project, registration and file metadata pages had the same problem: editing a published record and saving it, even without changes, turned it back to draft (ANG-630, ENG-11382). The draft button also showed a raw translation key (ENG-12424).

Summary of Changes

  1. The collection metadata step loads the template and saved answers together with templateAndInstanceObject, so the editor rechecks them.
  2. The metadata page CEDAR form loads the template and saved answers the same way when editing a record, and checks the editor's report again on save.
  3. Added the missing "Save draft" label.
  4. Added templateAndInstanceObject to CedarEditorElement.
  5. Updated unit tests.

Screenshot(s)

n/a

Side Effects

None expected. Incomplete metadata is still saved as a draft and blocked on submit.

QA Notes

Only reproducible with a template that has required fields (test3's Selenium Collection has a required Type, uat1's doesn't).

  1. Open https://test3.osf.io/collections/selenium/add, select a project and complete all steps.
  2. Click "Click to edit" on any section and save the steps again without changing the collection metadata.
  3. Add to Collection, it should go through.
  4. Open an accepted submission with Update and save all steps without changes, its CEDAR record should stay published.
  5. Open a published community metadata record (template with required fields) on a project, registration or file, click Edit and save without changes, it should stay published.
  6. On Add community metadata record, after selecting a template with required fields, the button should say "Save draft".

@brianjgeiger
brianjgeiger requested a review from nsemets November 19, 2026 14:49
@brianjgeiger
brianjgeiger merged commit b1d7ee8 into CenterForOpenScience:feature/pbs-26-22 Nov 19, 2026
3 checks passed
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.

3 participants