Bulk search-and-replace has no effect under certain specific conditions

Bug #1516890 reported by FaceDeer on 2015-11-17
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charles Haley

Bug Description

This is a fairly harmless bug, but fully reproducible and I could imagine it causing some trouble if the user doesn't notice it's happened.

I've added a custom "text, column shown in the tag browser" column in my library that I've been using to identify cases wherein an author's name gets changed by a metadata update. The column is called "Old Authors" and I have a saved search-and-replace that I use to copy the contents of the existing default author column into it. That way I can later compare them and notice when the default author column has changed.

The problem I've noticed is that the search-and-replace function does not actually perform the search-and-replace operation when every row's data set is identical. For example, if you create a new library, add an "#oldauthors" column as described above, and then populate the data thusly:

 Book | authors | #oldauthors
 1 | Fred | Frank
 2 | Fred | Frank

And then select both rows and try to apply the following case-sensitive regular expression search-and-replace:

Search field: authors
Search for: (.*)
Replace with: \1
Destination field: #oldauthors

Nothing happens, the data remains unchanged. But if you instead modify the starting data like so:

 Book | authors | #oldauthors
 1 | Fred | Adam
 2 | Fred | Frank

and run the exact same search-and-replace on the two rows, it works exactly as expected: the "Old Author" column is set to "Fred" for both rows.

I just updated to version 2.44.1 (64 bit) running on Windows 10 and reproduced this bug in a fresh new library. But I've been seeing this bug for some time now in older versions, it's not something that was recently introduced.

Changing the component for this bug.

 assignee cbhaley
 status triaged

Changed in calibre:
assignee: nobody → Charles Haley (cbhaley)
status: New → Triaged
Charles Haley (cbhaley) on 2015-11-17
Changed in calibre:
status: Triaged → Fix Committed

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers