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

Author not added to work if neither the pop-up author name, nor "Create a new record for" is selected on /books/add #6980

Open
scottbarnes opened this issue Sep 20, 2022 · 0 comments
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 2 Important, as time permits. [managed] Theme: Editing Issues related to the user editing/wiki editing experience. [managed] Type: Bug Something isn't working. [managed]
Milestone

Comments

@scottbarnes
Copy link
Collaborator

scottbarnes commented Sep 20, 2022

When entering a book via http://localhost:8080/books/add, the text entered into the "Author" field is only added to the book's record if the patron clicks on the pop-up for (1) the existing author name, if the author exists, or (2) "Create a new record for" if the author does not exist.

For people typing quickly or using tab on the keyboard to switch fields, it can be easy to overlook clicking on those, as nothing prevents one from entering an author name, not clicking one of the pop-ups, and then clicking "Add"; in this case the author entered in the author field will be absent from the work.

Evidence / Screenshot (if possible)

Adding a new author fails without clicking one of the pop-ups in the author field

Adding a new book with a new author, without clicking on the pop-up to select an existing author or to create a new one:
image

With all the fields completed as above, the HTML for the form has not updated to include the author name, yet one can add the book, even with <input id="author-0-key" ... value=""

Note1: In hindsight I realize using the name "Happy Book" may think that book is the "Happy Path", but really I just like happy things. "Happy Book" in this case still fails.

Note2: for all of these I realize I should have changed the highlighted field, as in each case the HTML to which I am referring is immediately below the highlighted text:
image

The book now lacks an author:
image

How it should look

Adding an author and clicking the pop-up in the author field will properly update the form data:
image

Here, the <input id="author-0-key" ... value="__new__" is properly set:
image

As a result, the author new author is added to the work:
image

This error also happens with existing authors

Adding a new book for Daniel Defoe, but not clicking on his name in the pop-up:
image

His author ID is not entered in input_id="author-0-key" ... value="">
image

And it does not show up in the work:
image

But if his name is clicked, input_id="author-0-key" ... value="/authors/OL18283A"> shows up:
image

Relevant url?

http://localhost:8080/books/add or https://www.openlibrary.org/books/add

Steps to Reproduce

  1. http://localhost:8080/books/add
  2. Add an existing or new author, but do not click a pop-up with the existing author name, or to create a new record.
  3. Click "Add"
  4. The "Author" field in the created work will be empty.
  • Actual: The author in the author input box on /books/add is not added to the work.
  • Expected: The author in the author input box on /books/add is added to the work.

Details

  • Logged in (Y/N)? Y
  • Browser type/version? Firefox 103.0.2 (64-bit)
  • Operating system? Manjaro: 5.19.1-3-MANJARO
  • Environment (prod/dev/local)? dev

Proposal & Constraints

I propose there be some sort of constraint (along with visual feedback about what's wrong) that prevents a patron from both filling out the author field and clicking "Add" on /books/new without also clicking the pop-up to either create a record for an author or to select an existing author.

Related files

Stakeholders

@scottbarnes scottbarnes added Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed] labels Sep 20, 2022
@mekarpeles mekarpeles added Priority: 2 Important, as time permits. [managed] Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] and removed Needs: Lead labels Sep 26, 2022
@mekarpeles mekarpeles added this to the Next (proposed) milestone Sep 26, 2022
@mekarpeles mekarpeles added the Theme: Editing Issues related to the user editing/wiki editing experience. [managed] label Sep 26, 2022
@cdrini cdrini removed the Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 2 Important, as time permits. [managed] Theme: Editing Issues related to the user editing/wiki editing experience. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

No branches or pull requests

3 participants