MARC Expert Search "Add Rows" adds duplicate row

Bug #1154656 reported by Michael Peters
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.7
Fix Released
Medium
Unassigned
2.8
Fix Released
Medium
Unassigned

Bug Description

Evergreen 2.3.x to Master

When a user utilizes the "MARC Expert Search" feature in TPAC and attempts to "add a new row", the initial search row is duplicated instead of creating a new blank row.

In my opinion, adding a new row should add a new blank row rather than duplicating the input already existing on the initial row.

This happens in both Staff Clients and regular TPAC searches in the browser.

Revision history for this message
Ben Shum (bshum) wrote :

Confirmed.

Changed in evergreen:
milestone: none → 2.4.0-beta
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Ben Shum (bshum) wrote :

So it seems that the cloneNode used in Open-ILS/web/js/ui/default/opac/simple.js is grabbing both the expert row and the values to be cloned when adding a new row. Perhaps to find out how to reset values for tag, subfield, and term back to NULL during each add row. Hmm.

Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-beta → 2.4.0-rc
Revision history for this message
Ben Shum (bshum) wrote :

Hmm, same problem exists when clicking add row for advanced search if you put any terms in the title field (second row by default). Probably warrants a new bug for that one, but the same approach is used in both of those functions in that simple.js file.

Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-rc → none
Revision history for this message
Erica Rohlfs (erohlfs) wrote :

Still seeing this behavior in 2.6.3

Changed in evergreen:
assignee: nobody → Michael Peters (mrpeters)
Revision history for this message
Michael Peters (mrpeters) wrote :

This branch in working fixes this problem.

This patch changes the behavior of the "Add Search Row" link
(JavaScript function from simple.js "addExpertRow()") so that
we are always cloning the initial "empty" row instead of
potentially cloning a row -- by way of cloneNode() -- with user
input in place, and causing duplicate search rows.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mrpeters/lp1154656_marc_expert_search_duplicate_rows

tags: added: pullrequest
Revision history for this message
Michael Peters (mrpeters) wrote :

Pushed one more commit to this branch, requested by PINES.

Previously, "Add Search Row" added new rows without the labels
being bold because they have an id=null. This sets a selector
for the expert_* labels so that the new rows are bolded too.

This makes for better readibility on the page as the rows align properly.

Revision history for this message
Michael Peters (mrpeters) wrote :

One last commit pushed up to fix the inadvertently broken "Add Search Row" link on the Advanced Search tab.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mrpeters/lp1154656_marc_expert_search_duplicate_rows

Revision history for this message
Adam Bowling (abowling) wrote :

Pushed a fix to "Add Search Row" on the Advanced Search tab that populates the new search row with a blank input, rather than a pre-populated one from the second existing search row. Same behavior as was on the Expert Search.

Revision history for this message
Adam Bowling (abowling) wrote :

Here's the patch:

advanced_search_add_new_row_blank_input:user/abowling/advanced_search_add_new_row_blank_input

Revision history for this message
Adam Bowling (abowling) wrote :
Kathy Lussier (klussier)
Changed in evergreen:
assignee: Michael Peters (mrpeters) → nobody
Revision history for this message
Erica Rohlfs (erohlfs) wrote :

As part of Bug Squashing Day (March 3, 2015), I do not see a change in behavior within either the staff client or OPAC. In verifying the code, I see the code Adam submitted. However, I do not see Michael's code applied to this test system. I am currently experiencing the same behavior with the MARC Expert Search duplicating the User's input when I select Add Search Row. I do not see Add Search Row creating a new, blank row.

Revision history for this message
Kathy Lussier (klussier) wrote :

Thanks Erica! In IRC last week, Michael indicated he thought that we would need to apply just Adam's branch. Could either Adam or Michael combine these into one working branch?

Thanks!
Kathy

Changed in evergreen:
assignee: nobody → Michael Peters (mrpeters)
Revision history for this message
Bill Erickson (berick) wrote :

Removing pullrequest tag pending resolution to Kathy's request from 2015-03-02.

tags: removed: pullrequest
Revision history for this message
Michael Peters (mrpeters) wrote :
tags: added: pullrequest
Revision history for this message
RASHMA KUMARAN (rkumaran) wrote :

Verified in Evergreen 2.8

Creates a new blank row when "Marc Expert Search" feature is used in both Staff Client and IE 10.

"Add Search Row" on the Advanced Search tab and Marc Expert Search tab populates a New search row with a blank input.

Revision history for this message
RASHMA KUMARAN (rkumaran) wrote :

I have tested this Code and signing off on it - <email address hidden>

tags: added: signedoff
removed: expert marc pullrequest search tpac
tags: added: expert marc pullrequest search tpac
no longer affects: evergreen/2.3
no longer affects: evergreen/2.4
Changed in evergreen:
milestone: none → 2.9-alpha
Changed in evergreen:
assignee: Michael Peters (mrpeters) → nobody
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I confirmed the bug on 2.7 also and tested the patch on master. I added Rashma's signoff, as well as mine, and some instructions on how to reproduce the bug and what you should expect after the patch is applied to the commit message.

Pushed to master, rel_2_7, and rel_2_8.

Thanks, everyone!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
milestone: 2.9-alpha → 2.9-beta
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.