Bug 386011 - Erroneous duplicate authors
Summary: Erroneous duplicate authors
Status: RESOLVED FIXED
Alias: None
Product: tellico
Classification: Applications
Component: general (show other bugs)
Version: 3.0.2
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Robby Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-21 06:48 UTC by Jim Sanderson
Modified: 2018-02-05 20:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.1.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Sanderson 2017-10-21 06:48:46 UTC
Authors are not kept separate under certain circumstances.
I have a book collection that has an additional field, "As By".
Authors are entered under their real name and the "As By" field is filled with the actual name as it appears on the book, real name, variation of real name or pseudonym, it's always filled.  I do this as some authors in different fields come up with the same name on their books even though they are different people.

To duplicate this bug, do this:
1. Create new book collection.
2. Add field "As By" as a text, formatted as name.
3. Enter first book: "Title 1" in "Title", "John Q. Author" in "Author" and "John Author" in "As By".
4. Enter second book: "Title 2" in "Title", "John Author" in "Author" and "John Author" in "As By".
5. Right-click on "Author, John Q." and filter by group.  Only "Title 1" will show up.
6. Right-click on "Author, John" and filter by group.  Both titles will show up even though only "Title 2" should.
   (It still shows that "Author, John" only has a single title in parentheses but 2 show up)

When you group by authors, it shows that each one only has one book (as it should) but filtering shows 2.
When you group by <people>, it shows 2 books in "Author, John" and 1 in "Author, John Q.".

More fun:
7. Add "Title 3" in "Title", "Johnny Author" in "Author" and "John Author" in "As By".
8. Right-click on "Author, John" and all 3 titles show up (even though it shows only 1 book by each author).

Still more:
9. Add "Title 4" in "Title", "Jonathan Author" in "Author" and "John Author" in "As By".
10. Right-click on "Author, John" and only the three titles with first names beginning with JOHN show up, the JONA does not.

Appears to be distinguishing by only the first 10 characters of a string somewhere (or 11 including a separator?).
Comment 1 Robby Stephenson 2017-10-23 01:59:58 UTC
(In reply to Jim Sanderson from comment #0)
> When you group by authors, it shows that each one only has one book (as it
> should) but filtering shows 2.
> When you group by <people>, it shows 2 books in "Author, John" and 1 in
> "Author, John Q.".

The action taken by Tellico when "Filter by Group" is clicked is that a filter is created that matches against an author _containing_ the relevant text rather than _equaling_ the text. This is done for the situation where a book may have multiple authors - filtering by group by full matching would then miss a book for which John Q Author was one of multiple authors.

I believe that if you want the behavior you are expecting, you can click the Filter button in the toolbar (after clicking the filter by group action from the left) and change the filter rule from "contains" to "equals" in which case only one book is shown for your example.

Does that help?
Comment 2 Robby Stephenson 2017-11-02 01:42:09 UTC
Git commit c739d878b96bf1e30f8de504d1422d911792c7ae by Robby Stephenson.
Committed on 02/11/2017 at 01:40.
Pushed by rstephenson into branch 'master'.

Use a regular expression when filtering by group instead of string match

When right-clicking in the Group View and choosing "Filter By Group",
the constructed filter did a simple match against a string containing
group name. However, when the group name was a substring of another
group, the grouping was too broad.
FIXED-IN: 3.1.1

M  +4    -0    ChangeLog
M  +3    -1    src/groupview.cpp
M  +1    -1    src/tests/CMakeLists.txt
M  +33   -0    src/tests/filtertest.cpp
M  +1    -0    src/tests/filtertest.h

https://commits.kde.org/tellico/c739d878b96bf1e30f8de504d1422d911792c7ae
Comment 3 lester 2018-02-05 20:14:27 UTC
For some reason, "Filter By Group" doesn't work for me now in tellico-3.1.1.
I'm on Gentoo linux, tellico built and installed using the official ebuild.