Bug 307958 - Loan Report buggy
Summary: Loan Report buggy
Status: RESOLVED FIXED
Alias: None
Product: tellico
Classification: Applications
Component: general (show other bugs)
Version: 2.3.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Robby Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-06 06:32 UTC by alexander.dost
Modified: 2012-10-19 17:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.3.7


Attachments
Loan View example (91.47 KB, image/png)
2012-10-06 06:33 UTC, alexander.dost
Details
Loan View Report (156.02 KB, image/png)
2012-10-08 19:08 UTC, alexander.dost
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexander.dost 2012-10-06 06:32:26 UTC
When I mark books as loaned, add the name and date of the loan and then generate the "Loan View" Report, it shows all the loaned entries, but the book names are only displayed for the books, I last marked as loaned.
All other entries are shown with the person and date, I loaned them, but the book names are missing.
See attached screenshot.
Comment 1 alexander.dost 2012-10-06 06:33:10 UTC
Created attachment 74369 [details]
Loan View example
Comment 2 Robby Stephenson 2012-10-08 04:08:23 UTC
Hmm, so far I can't reproduce it. If you save the file and reopen it, does the problem still show up? If so, can you send me the .tc file? You could attach to bug if you don't mind posting it publicly or email it to me privately.

If the bug doesn't persist after saving, can you try to walk me through steps to recreate it? Or try to provide any detail you might think relevant. Do the book still show up correctly in the main window?

Thanks
Comment 3 alexander.dost 2012-10-08 19:04:04 UTC
Hmmm. I also can't reproduce it now. Strange.

So the books now all show up with names, as expected, still, it shows one person three times for books, that are already checked-in. Why are those entries not grouped ? And why does it show old entries (checked in) ?
In this case the person "Papa". I used this for tests when I didn't get the report running properly.
I have added another screenshot with it.
Comment 4 alexander.dost 2012-10-08 19:08:46 UTC
Created attachment 74424 [details]
Loan View Report
Comment 5 Robby Stephenson 2012-10-10 03:27:51 UTC
(In reply to comment #3)
> I have added another screenshot with it.

Like I wrote in my first comment, I can't reproduce any error so far. If you save the file and reopen it, does the problem still show up? If so, can you send me the .tc file? You could attach to bug if you don't mind posting it publicly or email it to me privately. If the bug doesn't persist after saving, can you try to walk me through steps to recreate it? Or try to provide any detail you might think relevant. Do the book still show up correctly in the main window?
Comment 6 alexander.dost 2012-10-11 18:15:48 UTC
The .tc file is more than 6MB in size, so a bit big to mail. But I was able to reproduce the error now.
If you checkout a book and before you save the changes, check it in again. Then save the changes. Then check the same book out again, and it will appear twice in the loan view.
I checked it back in again, saved everything and checked out another book. Now this book shows up four times as loaned under the same name, even when I check it back in again. I can't get it out of the report anymore at all. The details show the "loaned" checkbox unchecked, but the loanview report shows it as loaned. Closing and restarting Tellico does not help.
Comment 7 Robby Stephenson 2012-10-14 23:24:49 UTC
Git commit 81ebc147d0eff0ccf5c9d8cd27de821de14f9870 by Robby Stephenson.
Committed on 15/10/2012 at 01:12.
Pushed by rstephenson into branch '2.3'.

Check for existing borrower before adding a new one

KABC::Addressee uids are not constant, so be sure to use existing
borrower uid if already present in collection. And in the collection
itself, check against existing borrower uid when adding a new one to
prevent duplication. Finally, prevent having empty uids altogether.
FIXED-IN: 2.3.7

M  +19   -13   src/borrowerdialog.cpp
M  +11   -1    src/collection.cpp
M  +1    -0    src/commands/addloans.cpp
M  +10   -9    src/loandialog.cpp

http://commits.kde.org/tellico/81ebc147d0eff0ccf5c9d8cd27de821de14f9870
Comment 8 Robby Stephenson 2012-10-14 23:24:49 UTC
Git commit 1ead9179e7ac54f10a3f45c8627944da07362224 by Robby Stephenson.
Committed on 15/10/2012 at 01:23.
Pushed by rstephenson into branch '2.3'.

Merge loans when loading dta files with duplicate borrowers

When loading data files saved before Bug 307958 was fixed, check for
duplicate borrowers and merge loans if necessary. Include unit tests.

M  +14   -3    src/collection.cpp
A  +109  -0    src/tests/data/duplicate_borrower.xml
A  +109  -0    src/tests/data/duplicate_loan.xml
M  +33   -1    src/tests/tellicoreadtest.cpp
M  +2    -0    src/tests/tellicoreadtest.h

http://commits.kde.org/tellico/1ead9179e7ac54f10a3f45c8627944da07362224
Comment 9 Robby Stephenson 2012-10-14 23:30:46 UTC
(In reply to comment #6)
> If you checkout a book and before you save the changes, check it in again.
> Then save the changes. Then check the same book out again, and it will
> appear twice in the loan view.
> I checked it back in again, saved everything and checked out another book.
> Now this book shows up four times as loaned under the same name, even when I
> check it back in again. I can't get it out of the report anymore at all. The
> details show the "loaned" checkbox unchecked, but the loanview report shows
> it as loaned. Closing and restarting Tellico does not help.
Thanks for those steps. I was able to reproduce it and I believe it's fixed now. If you want to avoid the problem right now, I think the workaround is that you have to save and close Tellico every time you check-in a book. That'll prevent the duplicates from showing up, I think.
Comment 10 alexander.dost 2012-10-15 18:01:48 UTC
Thanks for the help. Will the fixed version "repair" my wrong entries ? I still have a book, that is loaned three times, but in fact, it is already checked back in. I also can't try to checkout/checkin it because when I try to check it out, Tellico says, it is already loaned.
Comment 11 Robby Stephenson 2012-10-19 17:34:48 UTC
(In reply to comment #10)
> Thanks for the help. Will the fixed version "repair" my wrong entries ? I
> still have a book, that is loaned three times, but in fact, it is already
> checked back in. I also can't try to checkout/checkin it because when I try
> to check it out, Tellico says, it is already loaned.

It should fix it, though I can't be sure. You can try to create cut down your collection to have a smaller data file to send me if you want me to try. Copy your data file with a new name, delete all of the entries that you haven't loaned or have problems with, and then save it again and add it to this bug report or email it to me directly.