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

Lease date field error when non-date text entered #4757

Closed
jlhardes opened this issue Feb 26, 2021 · 7 comments · Fixed by #4888
Closed

Lease date field error when non-date text entered #4757

jlhardes opened this issue Feb 26, 2021 · 7 comments · Fixed by #4888
Assignees
Labels
Milestone

Comments

@jlhardes
Copy link
Contributor

Descriptive summary

In Hyrax 3.x, entering non-date text in the Lease date field ("asdfas", for example) on a Work produces a stack trace error when saving the Work.

Rationale

Stack trace errors shouldn't happen for this action.

Expected behavior

Error message should show on Work form (like it does when doing this same action on Embargo) to indicate:

Visibility When setting visibility to "lease" you must also specify lease reduced access date.
Lease reduced access date Must be a future date.

Error checking applied to Embargo seems to not be applied to Lease.

Actual behavior

See attached stack trace error screenshot

Steps to reproduce the behavior

  1. Login to nurax-dev
  2. Create a new Work
  3. Fill in required text fields (title, creator, rights statement)
  4. Select Lease for Visibility
  5. Enter "adfasdg" (or text that is not a date) in date field
  6. Check box for deposit agreement
  7. Click Save button

Screen Shot 2021-02-26 at 10 50 15 AM

@rjkati
Copy link

rjkati commented Feb 26, 2021

In both firefox and chrome on windows, I'm unable to enter non-numeric characters into the Lease date field. @crisr15 can you duplicate this on a Mac?

@no-reply
Copy link
Contributor

@rjkati @jlhardes i'm also confused and unable to reproduce. the field (i think) we're talking about is a date picker, which browsers are hopefully (mine is) restricting to date entries

@jlhardes
Copy link
Contributor Author

Safari on Mac is not giving a date picker for Lease or Embargo date fields for me so maybe that is the problem here. I am able to completely remove the default value and enter any text but then that seems to produce the error screen. Chrome on Mac and Firefox on Mac are both showing the date picker. In those browsers, the only way I can enter a value is as a structured date.

@no-reply
Copy link
Contributor

no-reply commented Feb 26, 2021

@jlhardes can we call this one a non-blocker for 3.0.0 then?

i'm tempted to say it's still high-priority, but since it's browser specific i'm inclined to put it in as a 3.0.1. thoughts?

@jlhardes
Copy link
Contributor Author

jlhardes commented Mar 1, 2021

Yes, I think this is not a blocker for 3.0 but it is a priority for 3.x.

@jeremyf jeremyf assigned jeremyf and unassigned rjkati Apr 26, 2021
@jeremyf
Copy link
Contributor

jeremyf commented Apr 26, 2021

I will be debugging and testing with Safari.

jeremyf added a commit that referenced this issue Apr 26, 2021
Prior to this commit, we were not verifying that a user's input for a
release_date was in fact a parseable date.  Chrome and Firefox apply a
date picker "widget" that enforces entries for a `type="date"`.
However, Safari does not.

Closes #4757

Note, to test this in the UI requires a fix for #4833.  That fix, at the
time of crafting this commit message, can be seen at PR #4885.
jeremyf added a commit that referenced this issue Apr 26, 2021
Prior to this commit, we were not verifying that a user's input for a
release_date was in fact a parseable date.  Chrome and Firefox apply a
date picker "widget" that enforces entries for a `type="date"`.
However, Safari does not.

Closes #4757

Note, to test this in the UI requires a fix for #4833.  That fix, at the
time of crafting this commit message, can be seen at PR #4885.
jeremyf added a commit that referenced this issue Apr 26, 2021
Prior to this commit, we were not verifying that a user's input for a
release_date was in fact a parseable date.  Chrome and Firefox apply a
date picker "widget" that enforces entries for a `type="date"`.
However, Safari does not.

Closes #4757

Note, to test this in the UI requires a fix for #4833.  That fix, at the
time of crafting this commit message, can be seen at PR #4885.
jeremyf added a commit that referenced this issue May 4, 2021
Prior to this commit, we were not verifying that a user's input for a
release_date was in fact a parseable date.  Chrome and Firefox apply a
date picker "widget" that enforces entries for a `type="date"`.
However, Safari does not.

Closes #4757

Note, to test this in the UI requires a fix for #4833.  That fix, at the
time of crafting this commit message, can be seen at PR #4885.
jeremyf added a commit that referenced this issue May 4, 2021
Prior to this commit, we were not verifying that a user's input for a
release_date was in fact a parseable date.  Chrome and Firefox apply a
date picker "widget" that enforces entries for a `type="date"`.
However, Safari does not.

Closes #4757

Note, to test this in the UI requires a fix for #4833.  That fix, at the
time of crafting this commit message, can be seen at PR #4885.
no-reply pushed a commit that referenced this issue May 4, 2021
Prior to this commit, we were not verifying that a user's input for a
release_date was in fact a parseable date.  Chrome and Firefox apply a
date picker "widget" that enforces entries for a `type="date"`.
However, Safari does not.

Closes #4757

Note, to test this in the UI requires a fix for #4833.  That fix, at the
time of crafting this commit message, can be seen at PR #4885.
@jlhardes
Copy link
Contributor Author

jlhardes commented May 5, 2021

It is no longer possible to enter non-date text on Safari for Lease or Embargo dates. This is fixed!

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

Successfully merging a pull request may close this issue.

4 participants