Issue 69 in ardb: Overall Card Totals not working

0 views
Skip to first unread message

codesite...@google.com

unread,
Apr 24, 2010, 7:19:39 PM4/24/10
to ardb-...@googlegroups.com
Status: New
Owner: ----

New issue 69 by goo...@baines-house.co.uk: Overall Card Totals not working
http://code.google.com/p/ardb/issues/detail?id=69

What steps will reproduce the problem?
1. Add any crypt/library cards to inventory.
2. Save inventory.
3. Export inventory to HTML.
4. View outputted HTML file in any browser.

What is the expected output? What do you see instead?
At the top of each section, there's a Vampires [0] entry and a Cards [0]
entry, which I'm assuming should be a card-total (ie. total number of
vampire cards, and total number of library cards).

What version of the product are you using? On what operating system?
ARDB 3.1.1 (and same issue with 3.0.1), on Windows 7 Home Premium 64-bit.

Please provide any additional information below.
Had a look inside the XML file generated, when you save your inventory,
and that also has <crypt size="0"> and <library size="0"> at the start of
each section.

Don't know whether the Vampires [0] and Cards [0] in the generated HTML
file are supposed to be a card-total for crypt and library cards, and
couldn't see any previous issues raised for this, but thought I'd raise
this just to check.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups "ardb-devel" group.
To post to this group, send email to ardb-...@googlegroups.com.
To unsubscribe from this group, send email to ardb-devel+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ardb-devel?hl=en.

codesite...@google.com

unread,
May 20, 2010, 4:58:19 PM5/20/10
to ardb-...@googlegroups.com
Updates:
Status: Accepted
Labels: Priority-Low

Comment #1 on issue 69 by graham.r.smith: Overall Card Totals not working
http://code.google.com/p/ardb/issues/detail?id=69

This does seem to be a problem. I'm not sure when this will be fixed
though as there
are higher priority bugs to be fixed :-(

I will add it to the accept list.

codesite...@google.com

unread,
Jul 27, 2010, 9:58:26 PM7/27/10
to ardb-...@googlegroups.com

Comment #2 on issue 69 by JFHarden: Overall Card Totals not working
http://code.google.com/p/ardb/issues/detail?id=69

This is caused in inventorymodel.cpp, the total size of the crypt and
library are intialised to be 0 on line 286 and 328 and then the xml
property set from this. The size is never updated after initialisation at
0. I verified this by changing the initialised value of 0 and compiling and
the exports do indeed show whatever I set it to.

284 // Add the crypt node
285 nCrypt = my_xmlNewChild (nRoot, NULL, wxT ("crypt"), wxT (""));
286 sCount = wxT ("0");
287 my_xmlNewProp (nCrypt, wxT("size"), sCount);
.
326 // Add the library node
327 nLibrary = my_xmlNewChild (nRoot, NULL, wxT ("library"), wxT (""));
328 sCount = wxT ("0");
329 my_xmlNewProp (nLibrary, wxT ("size"), sCount);


I am happy to fix this but what should the value be? Should it be the
number of unique cards in the library/crypt in your inventory or the total
number of cards you have/want/need?

E.G. Inventory contains only 1 Abdelsobek and 2 Adana de Sforza. Should the
crypt count show 2 or 3 (3 since there is 1 of Abdelsobek and 2 Adana)?

If it is the former (i.e. a count of unique library/crypt cards in the
inventory) then the attached patch will resolve this issue.

Attachments:
export_count.patch 715 bytes

codesite...@google.com

unread,
Jul 28, 2010, 2:45:15 AM7/28/10
to ardb-...@googlegroups.com

Comment #3 on issue 69 by graham.r.smith: Overall Card Totals not working
http://code.google.com/p/ardb/issues/detail?id=69

I think it should total number of owned cards. In your example it should 3.

codesite...@google.com

unread,
Jul 28, 2010, 4:29:38 AM7/28/10
to ardb-...@googlegroups.com

Comment #4 on issue 69 by JFHarden: Overall Card Totals not working
http://code.google.com/p/ardb/issues/detail?id=69

No problem, new patch attached which sets to the total to be the total
number of library/crypt cards the user has. I thought about adjusting the
SQL to have SQLite calculate it but I don't think it's as efficient as just
adding it up since the model already traverses all of the library and crypt
cards.

Attachments:
export_count_have_totals.patch 2.4 KB

codesite...@google.com

unread,
Jan 16, 2013, 9:29:23 AM1/16/13
to ardb-...@googlegroups.com

Comment #5 on issue 69 by carl.ced...@xelera.se: Overall Card Totals not
working
http://code.google.com/p/ardb/issues/detail?id=69

Any chance for a compile with this fix or will i have to setup a complete
development enviroment to get this bug fixed?

codesite...@google.com

unread,
Jan 21, 2013, 10:19:32 AM1/21/13
to ardb-...@googlegroups.com
Updates:
Status: Fixed

Comment #6 on issue 69 by gokturk....@gmail.com: Overall Card Totals not
working
http://code.google.com/p/ardb/issues/detail?id=69

Based on Revision 245, I assume this bug is fixed. It is included in 3.2
release. Closing.

Reply all
Reply to author
Forward
0 new messages