Bug 8443

Summary: Suggestions : publication year and copyright date
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: AcquisitionsAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: chris, corinne.hayet, katrin.fischer, m.de.rooy, paul.poulain
Version: 3.12   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6070
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8440
Change sponsored?: --- Patch complexity: Large patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: New suggestion form (intranet)
Suggestions management (intranet)
Proposed patch
Proposed patch (2)
[SIGNED-OFF] Bug 8443: Suggestions publication year and copyright date
Proposed patch (rebased master)
Proposed patch (main)
Proposed patch (follow-up 1)
Proposed patch (follow-up 2)
Bug 8443: Suggestions publication year and copyright date
Bug 8443: Suggestions publication year and copyright date (follow-up 1) Comments corrections
Bug 8443: Suggestions publication year and copyright date (follow-up 2) Cosmetic changes and perltidy formatting
[SIGNED-OFF] Bug 8443: Suggestions publication year and copyright date
Bug 8443: Suggestions publication year and copyright date (follow-up 1) Comments corrections
[SIGNED-OFF] Bug 8443: Suggestions publication year and copyright date (follow-up 2) Cosmetic changes and perltidy formatting

Description Fridolin Somers 2012-07-13 16:34:58 UTC
New suggestion page contains only copyright date field.
Suggestions management page filters contains only publication year.
Suggestions table contains both publicationyear and copyrightdate columns.

Isn't it the same thing ?
The bug is that the filter doesn't work because new suggestions have no publication year, they have a copyrigth date.
Comment 1 Fridolin Somers 2012-07-13 16:41:37 UTC
Created attachment 10827 [details]
New suggestion form (intranet)
Comment 2 Fridolin Somers 2012-07-13 16:42:12 UTC
Created attachment 10828 [details]
Suggestions management (intranet)
Comment 3 Fridolin Somers 2012-07-24 09:27:02 UTC Comment hidden (obsolete)
Comment 4 Corinne HAYET 2012-08-01 16:16:57 UTC
Hi Fridolyn,

You talk about copyright date...but there's no copyright date in your new form ???

You talk about itemtype...but there's non itemtype filter ??

budget and date filters dont'work. 

For date filters, have look to the pop-up for the calendar. There's a problem, date are translated (and searched ?) like MM/JJ/AAAA (for exemple : 01/08/2012 wrong translation in 08/01/2012)
Comment 5 Fridolin Somers 2012-08-02 14:10:09 UTC
Hie Corinne.

> You talk about copyright date...but there's no copyright date in your new form ???
I changed the filter on publication year into copyright date.
Copyright date is suggestion  form in OPAC and intranet.

> You talk about itemtype...but there's non itemtype filter ??
I talk about item type in "organize by" combobox.

> budget and date filters dont'work.
I did not test budget filter. Maybe I'll try, otherwise I can be a new bug.

> For date filters, ...
Can't reproduce this problem. If it's a javascript problem, it can be a new bug.
I corrected something in pl file.

Best regards,
Comment 6 Fridolin Somers 2012-08-22 12:29:05 UTC Comment hidden (obsolete)
Comment 7 Fridolin Somers 2012-08-22 12:31:12 UTC
> budget and date filters dont'work.
Testing date filters is not easy because they don't appear in suggestions table. It will be corrected soon in master, see BZ8440.

Retest please.
Comment 8 Katrin Fischer 2012-08-22 21:29:29 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2012-08-22 21:29:41 UTC
Hi Fridolyn,

I found some smaller issues:
1) When I create a new order, the form says "Publication year". I think it would be good to be consistent and use "Publication year" or "Copyright date" everywhere. 

2) The suggeston form in the OPAC says "Copyright Date", should be "Copyright date" according to our capitalization rules.

3) When I use filters, they get hidden again when the page reloads to show the search results. This makes it hard to see, which filters have been applied. A menu with a filter used should remain open, I think.

4) After changing the status of a suggestion, all other tabs vanish and I can only see the tab I have changed the suggestion to. And additionally, on this tab only the updated suggestion shows, even if there are more. Can we fix that? :(

5) For all to-from-filters the calendar icon gets pushed to the next line for me. That's a small thing, but would be nice if it could get fixed.

6) When you order from a suggestion, in the lists of suggestions the copyright symbol is broken. The title and year display like this:
copy. year:2012

7) When I use the copyright filter the URL and the filter reflect what I did - the year still shows up when I reopen the bilbiographic filter section. When I search for a suggestion date, the date vanishes after applying the filter. And when I add another filter, all filter options are kept, except for the dates.

A follow up looking into some of these problems would be great. I can also file separate bugs for those - please let me know.
Comment 10 Fridolin Somers 2012-08-23 07:52:29 UTC
Thanks for testing Katrin,

I think you should create new bugs to allow small patches, depending on a main bug (like 'suggestions improvements').
Comment 11 Marcel de Rooy 2012-09-24 12:54:09 UTC
CONFLICT (content): Merge conflict in C4/Acquisition.pm

Seems trivial. But please correct.
Comment 12 Fridolin Somers 2012-09-25 07:47:03 UTC Comment hidden (obsolete)
Comment 13 Paul Poulain 2012-10-10 15:34:21 UTC
QA comment:
 * this patch also includes a lot of indent & perltidy. *please, don't do that*, it's very hard to see what is related to your patch and what is related to perltidy. perltidy++, but in a follow-up patch please !
 * passes koha-qa.pl, except for C4/Suggestions.pm     FAIL
	pod    FAIL
*** WARNING: line containing nothing but whitespace in paragraph  in file C4/Suggestions.pm
*** ERROR: Spurious text after =cut  in file C4/Suggestions.pm

but it was already here before the patch

passes QA
Comment 14 Paul Poulain 2012-10-10 15:38:44 UTC
Testing the feature, I've a problem: I have suggestions with copyrightdate (2011), and some without.
When I filter on 2011, the suggestions without still appear.
When I filter on 232545 (yes, that's not a year ;-) ), all suggestions still appear, including those 2011 as date.

Could someone check the filter & tell me if it work for him/her ?

Failed QA in the meantime
Comment 15 Fridolin Somers 2012-10-15 09:23:18 UTC
(In reply to comment #14)
> Testing the feature, I've a problem: I have suggestions with copyrightdate
> (2011), and some without.
> When I filter on 2011, the suggestions without still appear.
> When I filter on 232545 (yes, that's not a year ;-) ), all suggestions still
> appear, including those 2011 as date.
> 
> Could someone check the filter & tell me if it work for him/her ?
> 
> Failed QA in the meantime

I can't reproduce, with copyright date 0 or NULL.
Could you give a dump of your suggestions table ?
Comment 16 Paul Poulain 2012-10-24 14:14:15 UTC
(In reply to comment #15)
> I can't reproduce, with copyright date 0 or NULL.
> Could you give a dump of your suggestions table ?

strange. I tried again, and it worked well. I set the status to passed QA. As i've declared "string freeze", I won't push this patch for 3.10.0, but it will be for 3.10.1, definetely
Comment 17 Jared Camins-Esakov 2012-11-05 16:16:27 UTC
Please do not perltidy large sections of code when fixing bugs. It makes it difficult to see what changes were made. Could you please divide this into two patches, one with the perltidy and one with the bugfix? They can be in either order (perltidy first or bugfix first).
Comment 18 Fridolin Somers 2012-11-06 13:07:48 UTC Comment hidden (obsolete)
Comment 19 Fridolin Somers 2012-11-06 13:09:30 UTC Comment hidden (obsolete)
Comment 20 Fridolin Somers 2012-11-06 13:15:02 UTC Comment hidden (obsolete)
Comment 21 Fridolin Somers 2012-11-21 08:59:05 UTC
Needs QA again.
Comment 22 Katrin Fischer 2012-11-25 22:04:16 UTC
Fridolyn, thx for splitting up the patches as requested. 

Can we please get a new sign-off on these patches?
Comment 23 Chris Cormack 2012-12-08 07:01:32 UTC
Have signed off, however it would have been better for the follow up 2 to have the perltidy in a separate patch. Mixing any changes with a file sized perltidy just makes testing a lot harder.
Comment 24 Chris Cormack 2012-12-08 07:02:03 UTC Comment hidden (obsolete)
Comment 25 Chris Cormack 2012-12-08 07:02:19 UTC Comment hidden (obsolete)
Comment 26 Chris Cormack 2012-12-08 07:02:43 UTC Comment hidden (obsolete)
Comment 27 Katrin Fischer 2013-01-14 07:37:02 UTC
Working on this.
Comment 28 Katrin Fischer 2013-01-14 20:36:32 UTC
Created attachment 14568 [details] [review]
[SIGNED-OFF] Bug 8443: Suggestions publication year and copyright date

Main patch correcting suggestions search :
- allow filtering on copyrightdate, manageddate and accepteddate
- entered dates remains in filter during search
- empty and null values are in the same tab
- null/empty values are not present in filers comboboxes

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 29 Katrin Fischer 2013-01-14 20:36:42 UTC
Created attachment 14569 [details] [review]
Bug 8443: Suggestions publication year and copyright date (follow-up 1) Comments corrections

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 30 Katrin Fischer 2013-01-14 20:36:55 UTC
Created attachment 14570 [details] [review]
[SIGNED-OFF] Bug 8443: Suggestions publication year and copyright date (follow-up 2) Cosmetic changes and perltidy formatting

Cosmetic patch :

Manual editions :
- use of () for qw
- use of q{} or qq{} in SQL queries
- replacing $${key} by $->{key}
- formatting SQL queries (easier to read)
- in suggestion.tt reducing date input size to allow calendar icon on same line

+ Formatting with perltidy

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests were done with all 3 patches from this bug applied:

1) Add suggestion from OPAC, check copyright date is saved
2) Add suggestion in intranet, check copyright date is saved
3) Edit suggestion, check change is saved correctly
4) Check date filters work as expected, using single dates, date ranges
   and multiple filters at once:
  - Accepted on
  - Managed on
  - Suggested on
5) Check copyright date search works correctly.

Passes all tests and QA script.
Comment 31 Jared Camins-Esakov 2013-01-16 03:11:21 UTC
This patch has been pushed to master.