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

Expand the editor's validation routine for funding info to cover award and funding elements #1533

Closed
amoeba opened this issue Sep 30, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@amoeba
Copy link
Contributor

amoeba commented Sep 30, 2020

When an EML 2.2.0 record containing structured funding information (awward) but not the old-style funding information and the editor config specifies funding information as a required field, users get a validation error which stops them from saving.

This really only affects the data team right now as they do their typical ticket processing. The current workaround they use is to enter a throwaway value in the field tied to the funding element and remove it programatically after they save in the editor.

As discussed in #1403 and on Slack, prior to getting full structured funding support in, we can relax validation for the presence of funding information in order to prevent users from having to put in throwaway values to get around validation. This quick fix will probably still be useful after structured funding information is put in.

@amoeba amoeba added the bug label Sep 30, 2020
@amoeba amoeba added this to the 2.13.3 milestone Sep 30, 2020
@amoeba amoeba self-assigned this Sep 30, 2020
amoeba added a commit that referenced this issue Oct 7, 2020
Closes #1533

The change here checks for the presence of the award element by querying the project's DOM instead of just checking the attribute on the Backbone model like we do for the funding element because EMLProject doesn't currently parse the award element. Once that lands, we can simplify this validation code.
@amoeba
Copy link
Contributor Author

amoeba commented Oct 7, 2020

Okay, this is in and moved to the Review/QA column on ZenHub. I ended up having to query the project's objectDOM since the project model doesn't currently parse award. We'll wanna revisit this when we put in support for structured funding in #1403. I'll drop a note over there too.

@laurenwalker
Copy link
Member

Works great, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants