Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenable draft edit #941

Merged
merged 15 commits into from
May 31, 2019
Merged

Reenable draft edit #941

merged 15 commits into from
May 31, 2019

Conversation

jabrah
Copy link
Contributor

@jabrah jabrah commented May 29, 2019

Closes #905


Reopening this PR from the pass-ember repo, instead of from my fork so that other people can make changes.

Only limited tests so far.

My biggest concern is the way Journal data is loaded in the case of a draft submission with a Publication with no DOI. This is handled similarly to how DOI would be loaded into the widget: if applicable, it will send the selectJournal action to kick off it's logic and add the Journal metadata to the workflow service. Applicability here is if a Journal object is passed to the component from the submission/new route, which should happen only when loading draft submissions.


Changes

  • Of course, the "Edit" button for draft submissions is now enabled
  • Publication objects now persist after the workflow basics step
    • This fixed a bug where a user was not able to navigate to the submission details page of a draft submission (there was no Article link to click in the submissions table)
  • Files are now uploaded immediately to Fedora in the workflow files step
  • User entered metadata is maintained through edits
    • Metadata is only saved to the submission after the user leaves the workflow metadata step; the user has to click Next to bring up the workflow files step
  • Enhance the "delete draft submission" feature
    • Publication object and all associated File objects are deleted, then the Submission is deleted
  • Plenty of code cleanup
  • A couple unrelated bugs fixed
    • Livereload script shouldn't be tried when loading the app
    • TransitionAborted errors are ignored. There was a bug where this error appeared every time a user entered the submission workflow, or any time a URL query param is modified

@markpatton
Copy link
Contributor

I made a few cleanups and fixes. Looks good to me now.

@jabrah
Copy link
Contributor Author

jabrah commented May 29, 2019

Files are not yet persisted in a Draft submission yet. This means that if a user uploads a file (and clicks Next to get to the Review step), but then leaves the workflow, when they go to edit the submission, the file will no longer be attached to the submission. The user will have to re-add the file(s).

Workflow should be modified to persist the File objects when the submission is auto-saved (currently happens when the user transitions between steps).

@jabrah jabrah force-pushed the reenable-draft-edit branch from 345d220 to cec3500 Compare May 31, 2019 13:46
@jabrah jabrah merged commit ff14627 into master May 31, 2019
@markpatton markpatton deleted the reenable-draft-edit branch September 24, 2019 17:18
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.

Re-enable editing of draft submissions
2 participants