Bug 7683

Summary: statistic wizard: cataloging
Product: Koha Reporter: delaye <stephane.delaye>
Component: ReportsAssignee: Julian Maurice <julian.maurice>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P5 - low CC: bgkriegel, brendan, gitbot, jcamins, jonathan.druart, julian.maurice, koha.aixmarseille, kyle, mathsabypro, paul.poulain, sandboxes, vanoudt
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 7683: Cataloguing statistics wizard improvements
Before/After Screenshot
Bug 7683: Cataloguing statistics wizard improvements
Bug 7683 fix POD doc
Bug 7683: Fix plack compatibility
Bug 7683: Cataloguing statistics wizard improvements
Bug 7683 fix POD doc
Bug 7683: Fix plack compatibility
Bug 7683: Add unit tests for GetMarcSubfieldStructureFromKohaField
Bug 7683 [Follow-up] Avoid printing useless '=1'
Bug 7683: Cataloguing statistics wizard improvements
Bug 7683 fix POD doc
Bug 7683: Fix plack compatibility
Bug 7683: Add unit tests for GetMarcSubfieldStructureFromKohaField
Bug 7683 [Follow-up] Avoid printing useless '=1'
Bug 7683 [Follow-up] Move unit tests in t/db_dependent/Biblio.t
Bug 7683: Remove use of items.statisticvalue and DHTMLcalendar()
Bug 7683: Finish the removal of items.statisticvalue
Bug 7683: Cataloguing statistics wizard improvements
Bug 7683 fix POD doc
Bug 7683: Fix plack compatibility
Bug 7683: Add unit tests for GetMarcSubfieldStructureFromKohaField
Bug 7683 [Follow-up] Avoid printing useless '=1'
Bug 7683 [Follow-up] Move unit tests in t/db_dependent/Biblio.t
Bug 7683: Remove use of items.statisticvalue and DHTMLcalendar()
Bug 7683: Finish the removal of items.statisticvalue
Bug 7683: Remove dead code about dewey and lccn filters
Bug 7683: Fix a shift in date filter indexes
Bug 11579: Show ordernumber in basket.pl tables
Bug 11439: (follow-up) adjust for change in list returned by OCLC XISBN
Bug 9823: Refactor return from GetReservesFromBiblionumber
Bug 9823: QA follow-up for GetReservesFromBiblionumber calls
Bug 9823: (follow-up) improve POD for C4::Reserves::GetReservesFromBiblionumber
Bug 7679: circulation statistics wizard improvements
Bug 7679: Followup: circulation statistics wizard improvements
Bug 7679: Fix criteria display
Bug 7679: Group different case values in the same row/column
Bug 7679: Fix several bugs in circulation statistics wizard
Bug 7683: Cataloguing statistics wizard improvements
Bug 7683 [Follow-up] Move unit tests in t/db_dependent/Biblio.t
Bug 7683: Remove use of items.statisticvalue and DHTMLcalendar()
Bug 7683: Remove dead code about dewey and lccn filters
Bug 7683: Fix a shift in date filter indexes
Bug 7683: Cataloguing statistics wizard improvements
Bug 7683 [Follow-up] Move unit tests in t/db_dependent/Biblio.t
Bug 7683: Remove use of items.statisticvalue and DHTMLcalendar()
Bug 7683: Remove dead code about dewey and lccn filters
Bug 7683: Fix a shift in date filter indexes
Bug 7683: Cataloguing statistics wizard improvements
Bug 7683 [Follow-up] Move unit tests in t/db_dependent/Biblio.t
Bug 7683: Remove use of items.statisticvalue and DHTMLcalendar()
Bug 7683: Remove dead code about dewey and lccn filters
Bug 7683: Fix a shift in date filter indexes
[SIGNED-OFF] Bug 7683: Cataloguing statistics wizard improvements
[SIGNED-OFF] Bug 7683: [Follow-up] Move unit tests in t/db_dependent/Biblio.t
[SIGNED-OFF] Bug 7683: Remove use of items.statisticvalue and DHTMLcalendar()
[SIGNED-OFF] Bug 7683: Remove dead code about dewey and lccn filters
[SIGNED-OFF] Bug 7683: Fix a shift in date filter indexes
Bug 7683: Catalog statistics wizard: QA fixes
Bug 7683: Catalog statistics wizard: QA fixes
Bug 7683: Cataloguing statistics wizard improvements
Bug 7683: Remove dead code about dewey and lccn filters
Bug 7683: Fix a shift in date filter indexes
Bug 7683: Catalog statistics wizard: QA fixes
Bug 7683: Relabel "acquired date" and "removed date"
[PASSED QA] Bug 7683: Cataloguing statistics wizard improvements
[PASSED QA] Bug 7683: Remove dead code about dewey and lccn filters
[PASSED QA] Bug 7683: Fix a shift in date filter indexes
[PASSED QA] Bug 7683: Catalog statistics wizard: QA fixes
[PASSED QA] Bug 7683: Relabel "acquired date" and "removed date"

Description delaye 2012-03-08 15:31:12 UTC
In the cataloguing wizard, add the following lines that can be used as row/column/filter: 
* status 
* item creation date (range with dynamic calendar) 
* item suppresion date (range with dynamic calendar) 
* origin : items.materials - authorized value list "origin" 995$s 
* Domaine : 995$t items.statisticvalue "domain" av list 

Adds options for distinct biblionumber count on title and items.

Add 3 options (radio buttons)
     - Titles count "COUNT (biblionumber)"
     - Counting of copies "COUNT (ItemNumber)" (current behavior)
     - Counting of copies deleted "COUNT (deleteditems.itemnumber)"

   - Add to selected row or column + filter combo:
     - items.notforloan
     - items.materials
     - items.statisticvalue

     For each of these fields, retrieve the label and the code value allowed in the grid cataloging default.
     If no MARC field is mapped to the field in question, it does not show this line in the wizard.
     If the MARC field is associated with a legal value, it displays a dropdown list for the filter, if a text field.

   - Add to selected row or column + filter on a date range
     - Items.dateaccessioned (create Date)
     - Deleteditems.timestamp (date deleted) (Only if the third option (eg count. Del.) Is selected)
Comment 1 Julian Maurice 2012-10-10 14:59:54 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall (khall) 2012-10-12 13:55:35 UTC
When I apply this patch, all the text on catalogue_stats.pl is shrunk/squished. Is this intended?
Comment 3 Kyle M Hall (khall) 2012-10-12 13:56:17 UTC
Created attachment 12785 [details]
Before/After Screenshot
Comment 4 Julian Maurice 2012-10-12 14:03:59 UTC
Hmm no it is not intended. The patch doesn't seem to contain a change that can cause that...
I will take a look.
Comment 5 Julian Maurice 2012-10-12 14:11:44 UTC
Nothing change for me... are you sure the patch is the cause of this?
Comment 6 Kyle M Hall (khall) 2012-10-12 15:07:36 UTC
The only thing I did was load master in one tab, and master + patch in another. I think if we can get one other person to verify, then we can assume it's a problem on my end and not with the patch. I didn't see anything in the code that would cause this, which made it even more peculiar.
Comment 7 Owen Leonard 2012-10-12 15:25:30 UTC
(In reply to comment #6)
> I think if we can get one other person to verify, then we can
> assume it's a problem on my end and not with the patch.

I don't see the problem when I apply the patch.
Comment 8 Kyle M Hall (khall) 2012-10-19 13:11:36 UTC Comment hidden (obsolete)
Comment 9 Kyle M Hall (khall) 2012-10-19 13:12:21 UTC
Since the font anomaly appears to be specific to me, I will sign-off.
Comment 10 Jared Camins-Esakov 2012-11-30 18:39:25 UTC
Is this patch for 3.8 only? If not, please update the version listed.
Comment 11 Julian Maurice 2012-11-30 22:34:58 UTC
This is an enhancement, so this is for master.
Version updated accordingly.
Comment 12 Paul Poulain 2013-01-03 16:35:20 UTC
QA comment : 
  * passes koha-qa.pl, except for a POD error I've fixed in a follow-up (the pod error was here before the patch)
  * affect only catalogue_stats.pl, no side effect risk
  * add a new sub in C4/Biblio.pm, with no unit test. This patch has been submitted a lot earlier than the "provide unit test" rule, so I think it's OK
  * Testing =
     - CGI mode = works before and after the patch (including new features)
     - Plack = works before the patch
     - after the patch, I get a nasty:
exited nonzero: 1 at /home/paul/koha.dev/koha-community/reports/catalogue_stats.pl line 629

failing QA for this reason. Once you've fixed plack compatibility, please switch back to "signed off", i'll QA asap
Comment 13 Paul Poulain 2013-01-03 16:36:43 UTC Comment hidden (obsolete)
Comment 14 Julian Maurice 2013-01-08 13:06:23 UTC Comment hidden (obsolete)
Comment 15 Paul Poulain 2013-03-19 09:10:23 UTC Comment hidden (obsolete)
Comment 16 Paul Poulain 2013-03-19 09:10:32 UTC Comment hidden (obsolete)
Comment 17 Paul Poulain 2013-03-19 09:10:38 UTC Comment hidden (obsolete)
Comment 18 Paul Poulain 2013-03-19 09:11:29 UTC
QA comment: I'm sure Jared will fail QA because of GetMarcSubfieldStructureFromKohaField not having a unit test, so, please add one, and mark "passed QA" once you've added it.
Comment 19 Julian Maurice 2013-03-19 11:03:46 UTC Comment hidden (obsolete)
Comment 20 Julian Maurice 2013-03-19 11:04:56 UTC
Unit tests added

$ prove t/Biblio_GetMarcSubfieldStructureFromKohaField.t 
t/Biblio_GetMarcSubfieldStructureFromKohaField.t .. ok     
All tests successful.
Files=1, Tests=24,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.22 cusr  0.00 csys =  0.24 CPU)
Result: PASS

Switching to Passed QA
Comment 21 Jared Camins-Esakov 2013-03-21 23:52:27 UTC
The unit tests for GetMarcSubfieldStructureFromKohaField should be added to t/db_dependent/Biblio.t rather than added as a separate file (and, since it requires the database, it should go in t/db_dependent/).

However, that's not why I am failing this. After applying this patch, I get a stray "=1" in the "Filtered on" section of the results if I do not filter on anything:
http://screencast.com/t/QQAyeuHRb
Comment 22 Julian Maurice 2013-03-22 11:26:30 UTC Comment hidden (obsolete)
Comment 23 Owen Leonard 2013-08-09 16:44:08 UTC
*** Bug 10608 has been marked as a duplicate of this bug. ***
Comment 24 Owen Leonard 2013-08-09 17:04:53 UTC Comment hidden (obsolete)
Comment 25 Owen Leonard 2013-08-09 17:05:05 UTC Comment hidden (obsolete)
Comment 26 Owen Leonard 2013-08-09 17:05:12 UTC Comment hidden (obsolete)
Comment 27 Owen Leonard 2013-08-09 17:05:19 UTC Comment hidden (obsolete)
Comment 28 Owen Leonard 2013-08-09 17:05:27 UTC Comment hidden (obsolete)
Comment 29 Katrin Fischer 2013-09-10 19:54:40 UTC
Doing a code review of the squashed patches I noticed some things:

1) There are multiple references to items.statisticvalue, but I think we don't have this column in our items table. Is there a dependency to another development?

2) The term 'Total' appears a few times in catalogue_stats.pl but is not translatable (problem was there before). Also those:

+                ( $i == 0 )  ? "Dewey Classification From"
+              : ( $i == 1 )  ? "Dewey Classification To"
+              : ( $i == 2 )  ? "Lccn Classification From"
+              : ( $i == 3 )  ? "Lccn Classification To"
+              : ( $i == 4 )  ? "Item CallNumber From"
+              : ( $i == 5 )  ? "Item CallNumber To"
+              : ( $i == 6 )  ? "Item type"
+              : ( $i == 7 )  ? "Publisher"
+              : ( $i == 8 )  ? "Publication year From"
+              : ( $i == 9 )  ? "Publication year To"
+              : ( $i == 10 ) ? "Library"
+              : ( $i == 11 ) ? "Shelving Location"
+              : ( $i == 12 ) ? "Collection Code"
+              : ( $i == 13 ) ? "Status"

3) Same file:
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
I think we are no longer using this construct.

4) Looking at the code I think the plugin for authorised values could be useful here.

5) Could you please move the tests as suggested by Jared on comment 20?

Failed QA for 1) (needs clarification) and 5).
Comment 30 Julian Maurice 2013-09-23 11:38:47 UTC Comment hidden (obsolete)
Comment 31 Julian Maurice 2013-09-23 11:38:52 UTC Comment hidden (obsolete)
Comment 32 Julian Maurice 2013-09-23 11:39:28 UTC
Fixed 1, 3 and 5.
Comment 33 I'm just a bot 2013-09-23 21:52:52 UTC
Patch applied cleanly, go forth and signoff
Comment 34 I'm just a bot 2013-09-23 21:53:14 UTC
Patch applied cleanly, go forth and signoff
Comment 35 I'm just a bot 2013-09-23 21:53:33 UTC
Patch applied cleanly, go forth and signoff
Comment 36 I'm just a bot 2013-09-23 21:53:50 UTC
Patch applied cleanly, go forth and signoff
Comment 37 I'm just a bot 2013-09-23 21:54:08 UTC
Patch applied cleanly, go forth and signoff
Comment 38 I'm just a bot 2013-09-23 21:54:26 UTC
Patch applied cleanly, go forth and signoff
Comment 39 I'm just a bot 2013-10-24 19:28:00 UTC
Patch applied cleanly, go forth and signoff
Comment 40 Mathieu Saby 2013-11-29 20:25:17 UTC
I tested with itemtypes and branches, with no filters

Here are my results:

Filtered on:

=1
items.itype / items.homebranch 	BU 	bubis 	TOTAL
CONC 	  	  	0
DPC 	  	  	0
DPN 	  	  	0
TOTAL 	0 	0 	0


I don't understand the "=1"
And I have much more than "0" items of each category.

So, failing QA for these 2 points.

Mathieu
Comment 41 Julian Maurice 2013-12-19 14:36:48 UTC Comment hidden (obsolete)
Comment 42 Julian Maurice 2013-12-19 14:38:50 UTC Comment hidden (obsolete)
Comment 43 Julian Maurice 2013-12-19 14:39:08 UTC Comment hidden (obsolete)
Comment 44 Julian Maurice 2013-12-19 14:39:27 UTC Comment hidden (obsolete)
Comment 45 Julian Maurice 2013-12-19 14:39:41 UTC Comment hidden (obsolete)
Comment 46 Julian Maurice 2013-12-19 14:39:57 UTC Comment hidden (obsolete)
Comment 47 Julian Maurice 2013-12-19 14:40:16 UTC Comment hidden (obsolete)
Comment 48 Julian Maurice 2013-12-19 14:40:36 UTC Comment hidden (obsolete)
Comment 49 Julian Maurice 2013-12-19 14:40:52 UTC Comment hidden (obsolete)
Comment 50 Koha Team AMU 2014-01-31 14:04:02 UTC
I tested on a sandbox (langres) by comparing the results with sql reports.

The acquired date filter doesn't work. It seems like the end of the limit is not used.

--> SQL report
SELECT homebranch, itemtype, COUNT(itemnumber)
FROM items JOIN biblioitems USING(biblionumber)
WHERE dateaccessioned BETWEEN "2013-01-01" AND "2013-12-31"
GROUP BY homebranch, itemtype
--> résultat
MAURES LIVR 1
MAURES REV 147

--> using statistics wizards
Row = itemtype
Column = home library
Acquired Date Filter From 01/01/2013 To 31/12/2013
--> résultats
itemtype / items.homebranch BDP MAURES TOTAL
CD 380 380
LAUD 6 6
LIVR 20 3783 3803
REV 862 862
SPECIAL 2 2
VHS 3 3
TOTAL 20 5036 5056

I tried the filter with "From 01/01/2012 To 31/12/2012", "From 01/01/2013 To 31/12/2013", "From 01/01/2014 To 31/01/2014". Each time the total is growing as if only the start of the limit is used.

For that reason, I change status in "Failed QA".
Comment 51 Julian Maurice 2014-02-06 13:48:47 UTC Comment hidden (obsolete)
Comment 52 Julian Maurice 2014-02-06 13:48:57 UTC Comment hidden (obsolete)
Comment 53 Julian Maurice 2014-02-06 13:49:26 UTC
The last patch should fix issue of comment 50
Comment 54 Biblibre Sandboxes 2014-02-06 16:08:50 UTC
Patch tested with a sandbox, by Koha team AMU <koha.aixmarseille@gmail.com>
Comment 55 Biblibre Sandboxes 2014-02-06 16:11:20 UTC Comment hidden (obsolete)
Comment 56 Biblibre Sandboxes 2014-02-06 16:11:25 UTC Comment hidden (obsolete)
Comment 57 Biblibre Sandboxes 2014-02-06 16:11:29 UTC Comment hidden (obsolete)
Comment 58 Biblibre Sandboxes 2014-02-06 16:11:34 UTC Comment hidden (obsolete)
Comment 59 Biblibre Sandboxes 2014-02-06 16:11:38 UTC Comment hidden (obsolete)
Comment 60 Biblibre Sandboxes 2014-02-06 16:11:43 UTC Comment hidden (obsolete)
Comment 61 Biblibre Sandboxes 2014-02-06 16:11:47 UTC Comment hidden (obsolete)
Comment 62 Biblibre Sandboxes 2014-02-06 16:11:51 UTC Comment hidden (obsolete)
Comment 63 Biblibre Sandboxes 2014-02-06 16:11:56 UTC Comment hidden (obsolete)
Comment 64 Biblibre Sandboxes 2014-02-06 16:12:00 UTC Comment hidden (obsolete)
Comment 65 Koha Team AMU 2014-02-06 16:15:37 UTC
(In reply to Julian Maurice from comment #53)
> The last patch should fix issue of comment 50

The acquired date filter is ok with this patch. I find the same results using SQL request and statistics wizards.
Comment 66 Katrin Fischer 2014-03-22 09:20:46 UTC
I think by accident some patches got on this bug report, that don't belong here - tidying up a bit.
Comment 67 Katrin Fischer 2014-03-22 09:31:06 UTC
... now it looks a lot less scary already. The QA script complains about a few small things:

 FAIL	reports/issues_stats.pl
   FAIL	  pod
		*** ERROR: =over on line 45 without closing =back at line EOF in file reports/issues_stats.pl
   FAIL	  forbidden patterns
		forbidden pattern: tab char (line 628)
   OK	  valid
   OK	  critic

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt
   FAIL	  forbidden patterns
		forbidden pattern: tab char (line 75)
   OK	  tt_valid
   OK	  valid_template

Please provide a follow up for the POD and include the tab fixes.

Also - are there patches missing? I can't find the new tests in t/db_dependent/Biblio.t the comments talk about. and some of the other changes mentioned.

Julian, could you please check the patches are all there and complete for testing? Please also point me the correct test plan I should be using, thx.
Comment 68 Julian Maurice 2014-03-28 10:34:40 UTC
(In reply to Katrin Fischer from comment #66)
> I think by accident some patches got on this bug report, that don't belong
> here - tidying up a bit.

In fact, all patches from sandboxes@biblibre.com were sent by error on this bug (they are about issues_stats.pl, but this bug is about catalogue_stats.pl)
I will resubmit patches
Comment 69 Julian Maurice 2014-03-28 10:42:23 UTC Comment hidden (obsolete)
Comment 70 Julian Maurice 2014-03-28 10:42:29 UTC Comment hidden (obsolete)
Comment 71 Julian Maurice 2014-03-28 10:42:36 UTC Comment hidden (obsolete)
Comment 72 Julian Maurice 2014-03-28 10:42:42 UTC Comment hidden (obsolete)
Comment 73 Julian Maurice 2014-03-28 10:42:47 UTC Comment hidden (obsolete)
Comment 74 Julian Maurice 2014-03-28 10:45:13 UTC
I squashed some patches (the first is a squash of all signed-off patches) but everything is here :)
Comment 75 Koha Team AMU 2014-05-22 08:38:14 UTC
The sandbox you've requested is not ready.
Some problems occurred applying patches from bug 7683:
<h1>Something went wrong !</h1>Applying: Bug 7683: Cataloguing statistics
wizard improvements
Auto packing the repository for optimum performance. You may also
run git gc manually. See git help gc for more information.
Applying: Bug 7683 [Follow-up] Move unit tests in t/db_dependent/Biblio.t
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Removing t/Biblio_GetMarcSubfieldStructureFromKohaField.t
Auto-merging t/db_dependent/Biblio.t
CONFLICT (content): Merge conflict in t/db_dependent/Biblio.t
Failed to merge in the changes.
Patch failed at 0001 Bug 7683 [Follow-up] Move unit tests in
t/db_dependent/Biblio.t
When you have resolved this problem run git bz apply --continue.
If you would prefer to skip this patch, instead run git bz apply --skip.
To restore the original branch and stop patching run git bz apply --abort.
Bug 7683 - statistic wizard: cataloging

26678 - Bug 7683: Cataloguing statistics wizard improvements
26679 - Bug 7683 [Follow-up] Move unit tests in t/db_dependent/Biblio.t
26680 - Bug 7683: Remove use of items.statisticvalue and DHTMLcalendar()
26681 - Bug 7683: Remove dead code about dewey and lccn filters
26682 - Bug 7683: Fix a shift in date filter indexes

Apply? [(y)es, (n)o, (i)nteractive] Patch left in
tmpBug-7683-Follow-up-Move-unit-tests-in-tdbdependent-kzhmvJ.patch .
Comment 76 Julian Maurice 2014-05-23 12:26:19 UTC Comment hidden (obsolete)
Comment 77 Julian Maurice 2014-05-23 12:26:31 UTC Comment hidden (obsolete)
Comment 78 Julian Maurice 2014-05-23 12:26:42 UTC Comment hidden (obsolete)
Comment 79 Julian Maurice 2014-05-23 12:26:55 UTC Comment hidden (obsolete)
Comment 80 Julian Maurice 2014-05-23 12:27:05 UTC Comment hidden (obsolete)
Comment 81 Julian Maurice 2015-03-04 14:05:47 UTC Comment hidden (obsolete)
Comment 82 Julian Maurice 2015-03-04 14:05:59 UTC Comment hidden (obsolete)
Comment 83 Julian Maurice 2015-03-04 14:06:11 UTC Comment hidden (obsolete)
Comment 84 Julian Maurice 2015-03-04 14:06:23 UTC Comment hidden (obsolete)
Comment 85 Julian Maurice 2015-03-04 14:06:43 UTC Comment hidden (obsolete)
Comment 86 Bernardo Gonzalez Kriegel 2015-05-13 13:50:44 UTC Comment hidden (obsolete)
Comment 87 Bernardo Gonzalez Kriegel 2015-05-13 13:50:55 UTC Comment hidden (obsolete)
Comment 88 Bernardo Gonzalez Kriegel 2015-05-13 13:51:04 UTC Comment hidden (obsolete)
Comment 89 Bernardo Gonzalez Kriegel 2015-05-13 13:51:17 UTC Comment hidden (obsolete)
Comment 90 Bernardo Gonzalez Kriegel 2015-05-13 13:51:27 UTC Comment hidden (obsolete)
Comment 91 Jonathan Druart 2015-06-23 10:48:26 UTC
Note:
1/ Date range should not permit to fill invalid range (from > to)
2/ Other date ranges don't have the datetime plugin (not introduced by this patch).
3/ Labels consistent "From:" vs "From"
4/ Mime-type for CSV is "text/csv", not "application/vnd.sun.xml.calc" (existed before this patch)
5/ Don't use C4::Dates, prefer Koha::DateUtils
6/ Use placeholders when you build the sql query (+        $strcalc .= " AND biblioitems.publishercode LIKE \"" . @$filters[3] . "\"";)

Failing QA for 3, 4, 5 and 6.
Comment 92 Julian Maurice 2015-08-24 10:38:11 UTC Comment hidden (obsolete)
Comment 93 Julian Maurice 2015-08-24 10:39:53 UTC
(In reply to Jonathan Druart from comment #91)
> 2/ Other date ranges don't have the datetime plugin (not introduced by this
> patch).

The only other date range should be filled with year only, so there is no need for datepicker.
Comment 94 Julian Maurice 2015-08-24 11:02:12 UTC Comment hidden (obsolete)
Comment 95 Katrin Fischer 2015-10-18 15:30:46 UTC
1) Hm, something strange, I see
<td>Removed date</td> in the code, but it doesn't show up on the form for me? 
I was looking for it, as I wanted to suggest a change: Date deleted (item).

2) Similarly, I would use "Date acquired (item)" for "Acquired date". Because someone might question if this is about the record or the item and it's what the field in the item is labelled.

3) Can you please update and post the initial commit message? For example it still lists a items.statisticvalue that doesn't exist. So a bit hard to see what actually happens now as this has been going back and forth a bit. Maybe we should also upate the actual commit message?

X) the ... characters in the second line seems to belong to a lccn related feature and has no label at all :( But this is an old problem, so out of scope here.

Can you take a look please?
Comment 96 Julian Maurice 2015-11-09 14:56:00 UTC Comment hidden (obsolete)
Comment 97 Julian Maurice 2015-11-09 14:56:22 UTC Comment hidden (obsolete)
Comment 98 Julian Maurice 2015-11-09 14:56:38 UTC Comment hidden (obsolete)
Comment 99 Julian Maurice 2015-11-09 14:56:56 UTC Comment hidden (obsolete)
Comment 100 Julian Maurice 2015-11-09 14:57:04 UTC Comment hidden (obsolete)
Comment 101 Julian Maurice 2015-11-09 15:03:01 UTC
(In reply to Katrin Fischer from comment #95)
> 1) Hm, something strange, I see
> <td>Removed date</td> in the code, but it doesn't show up on the form for
> me? 
> I was looking for it, as I wanted to suggest a change: Date deleted (item).

It shows up only when you select "Count deleted items" for "Cell value"
"Removed date" changed by the last patch

> 
> 2) Similarly, I would use "Date acquired (item)" for "Acquired date".
> Because someone might question if this is about the record or the item and
> it's what the field in the item is labelled.

"Acquired date" changed by the last patch

> 
> 3) Can you please update and post the initial commit message? For example it
> still lists a items.statisticvalue that doesn't exist. So a bit hard to see
> what actually happens now as this has been going back and forth a bit. Maybe
> we should also upate the actual commit message?

I squashed the 3 first commits and removed reference to items.statisticvalue in the initial commit message. Is that ok ?

> 
> X) the ... characters in the second line seems to belong to a lccn related
> feature and has no label at all :( But this is an old problem, so out of
> scope here.

I don't see what you are talking about, lccn related feature should be gone thanks to patch "Remove dead code about dewey and lccn filters"
Where are the "..." characters ?
Comment 102 Katrin Fischer 2015-11-09 15:09:41 UTC
I meant the second line in the report - a pull down labelled characters in hte second column. I have no idea what it does - it's referred to as cotedigits(?) in the HTML.
Comment 103 Katrin Fischer 2015-11-27 11:28:11 UTC
Working on this again now...
Comment 104 Katrin Fischer 2015-11-30 21:49:10 UTC
Created attachment 45238 [details] [review]
[PASSED QA] Bug 7683: Cataloguing statistics wizard improvements

- Add 3 options for cells value
  - Titles count "COUNT (biblionumber)"
  - Items count "COUNT (itemnumber)" (current behavior)
  - Deleted items count "COUNT (deleteditems.itemnumber)"

- Add to selectable rows, colums and filters:
  - items.notforloan
  - items.materials

  For each of these fields, retrieve the label in the default cataloging
  framework.
  If no MARC field is mapped to the field in question, it does not show
  this line in the wizard.
  If the MARC field is associated with a list of authorized values, it
  displays a dropdown list for the filter, otherwise it displays a text
  field.

- Add to selectable rows, columns and filters:
  - items.dateaccessioned (creation date)
  - deleteditems.timestamp (deletion date) (Only if the third option (eg
    count deleted items) is selected)

- Add unit tests for GetMarcSubfieldStructureFromKohaField

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 105 Katrin Fischer 2015-11-30 21:49:18 UTC
Created attachment 45239 [details] [review]
[PASSED QA] Bug 7683: Remove dead code about dewey and lccn filters

$hasdewey and $haslccn were hardcoded to 0

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 106 Katrin Fischer 2015-11-30 21:49:40 UTC
Created attachment 45240 [details] [review]
[PASSED QA] Bug 7683: Fix a shift in date filter indexes

Date filter indexes are 13, 14, 15, 16,
not 14, 15, 16, 17

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Works, no koha-qa errors (some message for the deleted file)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 107 Katrin Fischer 2015-11-30 21:49:45 UTC
Created attachment 45241 [details] [review]
[PASSED QA] Bug 7683: Catalog statistics wizard: QA fixes

1/ Do not allow invalid date ranges (from > to) (datepicker only)
2/ Relabel "From:" to "From" for consistency
3/ Fix MIME type for CSV
4/ Use Koha::DateUtils instead of C4::Dates
5/ Use placeholders in SQL query

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 108 Katrin Fischer 2015-11-30 21:49:53 UTC
Created attachment 45242 [details] [review]
[PASSED QA] Bug 7683: Relabel "acquired date" and "removed date"

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 109 Brendan Gallagher 2016-01-27 06:38:24 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!