Bug 11139

Summary: opac-topissues does not work with CCODE
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: OPACAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: claire.hernandez, gitbot, julian.maurice, katrin.fischer, nengard, tomascohen, veron
Version: master   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12136
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14788    
Bug Blocks:    
Attachments: Bug 11139 - opac-topissues does not work with CCODE
no option to limit on ccode
Bug 11139 - opac-topissues does not work with CCODE
Bug 11139: Add support for multiple values in AdvancedSearchTypes
Bug 11139: Add support for multiple values in AdvancedSearchTypes
[PASSED QA] Bug 11139: Add support for multiple values in AdvancedSearchTypes

Description Fridolin Somers 2013-10-25 09:43:30 UTC
When OPAC most populars uses collection code, it does not work.
There are never results.
Comment 1 Fridolin Somers 2013-10-25 09:55:58 UTC Comment hidden (obsolete)
Comment 2 I'm just a bot 2013-11-07 08:17:19 UTC
testing 1 commit(s) (applied to 5fa6168 'Bug 11204: make pendingreserves use d')

 [1;32mOK[0m	opac/opac-topissues.pl
Comment 3 Owen Leonard 2013-11-14 15:59:13 UTC
I can't reproduce this problem in master. I get results when either item type or collection code.
Comment 4 Fridolin Somers 2013-11-14 16:07:29 UTC
(In reply to Owen Leonard from comment #3)
> I can't reproduce this problem in master. I get results when either item
> type or collection code.
Is your authorised values catégory for collection codes : ccode or CCODE ?
Comment 5 Owen Leonard 2013-11-14 16:43:46 UTC
(In reply to Fridolyn SOMERS from comment #4)
> Is your authorised values catégory for collection codes : ccode or CCODE ?

CCODE.
Comment 6 Nicole C. Engard 2014-01-09 18:33:33 UTC
Created attachment 24103 [details]
no option to limit on ccode

I don't even see an option for collection code in the opac top issue.
Comment 7 Owen Leonard 2014-01-09 18:42:37 UTC
> I don't even see an option for collection code in the opac top issue.

You have to have the AdvancedSearchTypes preference set to 'ccode'
Comment 8 Kyle M Hall 2014-03-07 19:09:03 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2014-03-31 16:20:55 UTC
I think this patch is incomplete - AdvancedSearchTypes is no longer a switch, but can have multiple values:

loc - NOT OK, the itemtype pull down still shows, but it's empty
ccode - OK, collections show
itemtypes - OK, itemtypes show
ccode|itemtpyes - NOT OK, pull down empty
itemtypes|loc - NOT OK, pull down empty
Comment 10 Fridolin Somers 2015-07-31 15:04:02 UTC
One of your client still have this problem with 3.18.08
Comment 11 Julian Maurice 2015-10-01 13:33:38 UTC
Bug 14788 fixes the ccode problem, but not the "multiple values" problem.

So here is a patch that try to fix it (depends on 14788):
Comment 12 Julian Maurice 2015-10-01 13:33:52 UTC Comment hidden (obsolete)
Comment 13 Fridolin Somers 2015-10-02 07:13:13 UTC
Nice job Julian
Comment 14 Marc Véron 2015-10-02 09:51:37 UTC
Hi Julian and Fridolin,

It might be a good idea to have a separate syspref for the behavior of the most popular list instead of the double use of 'AdvancedSearchTypes'

It would make things much more clearer.

What do you think?

Marc
Comment 15 Fridolin Somers 2015-10-14 12:38:28 UTC
(In reply to Marc Véron from comment #14)
> Hi Julian and Fridolin,
> 
> It might be a good idea to have a separate syspref for the behavior of the
> most popular list instead of the double use of 'AdvancedSearchTypes'
> 
> It would make things much more clearer.
> 
> What do you think?
> 
> Marc
I agree
Comment 16 Marc Véron 2015-10-15 06:53:12 UTC Comment hidden (obsolete)
Comment 17 Marc Véron 2015-10-15 06:54:41 UTC
*** Bug 12136 has been marked as a duplicate of this bug. ***
Comment 18 Katrin Fischer 2015-10-22 06:13:02 UTC
Created attachment 43732 [details] [review]
[PASSED QA] Bug 11139: Add support for multiple values in AdvancedSearchTypes

AdvancedSearchTypes syspref can be multivalued, opac-topissues.pl
have to support that.

AdvancedSearchTypes can have one or more of the following values:
'itemtypes', 'ccode', 'loc'.  But this patch adds support only for
itemtypes and ccode.  AdvancedSearchTypes can still contain 'loc' but it
will change nothing to the behaviour of opac-topissues.pl.

This patch also removes duplicate code in template (the "Refine your
search" form was written in two different places)
This introduces a small behaviour change: when there is no results,
instead of having the form in the center of the page, it remains in the
left sidebar and we have a "No results" message in the main area.

Depends on bug 14788

Tested on top of 14788. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Tomás Cohen Arazi 2015-10-22 15:02:35 UTC
Patch pushed to master.

Thanks Maurice!