Bug 11309: avoid creating duplicate numbering patterns during upgrade to 3.14.x
To test:
1/ Install Koha 3.12
2/ Create some subscriptions. Ensure you have at least two
subscriptions with the same numbering pattern, with one of the
keys everyX/addX/whenmorethanX/settoX set to NULL
3/ Remember this numbering pattern.
4/ Upgrade to 3.14
5/ Run updatedatabase.pl
6/ The numbering pattern is duplicated
Now repeat steps 1 to 4, then apply the patch and run
updatedatabase.pl. Numbering pattern should not be duplicated.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Robin Sheat [Fri, 4 Oct 2013 03:13:20 +0000 (16:13 +1300)]
Bug 10944: fix mixed content warnings for covers on staff client
This switches the URLs used to access Amazon's cover images to the
SSL image server, preventing warnings when using this on a secure
site.
To test:
* Enable Amazon images in the sysprefs, all other cover images off.
* Do a search in the staff client. Using firebug or similar, inspect the
images that indicate both "no image found" and the covers.
* Are they all https, and showing correctly?
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Liz Rea [Wed, 25 Sep 2013 02:50:24 +0000 (14:50 +1200)]
Bug 10944: fix mixed content warnings in opac results and detail with Amazon images on https
It's probably going to become more popular to run Koha in SSL
environments.
Currently on SSL, with Amazon images enabled, a SSL enabled site
will either not show Amazon images (IE, some versions of Firefox?),
or show a warning to users about mixed secure and insecure content
(Firefox, Chrome).
Since we now have the using_https template variable, it makes sense
to use it.
To test:
In each browser you have access to, and preferably with SSL set up
(you can set up a self signed cert for your dev install by following,
more or less, the instructions here:
https://wiki.debian.org/Self-Signed_Certificate)
For the apache config, just copy the one for the OPAC, but set it to
use 443 instead of 80 for the port, and point it to your keys per the
instructions above.
** note that using a self signed cert on your dev install will prompt
you when you connect the first time that OMG I CAN'T VERIFY THIS IS
COOL. You did it yourself, if you can't trust yourself... then who can
you trust?
* Enable Amazon images in the system preferences
* Do a search that you know will have images for, verify that without
SSL
1. the images show
2. the image source is from an Amazon url that uses http://
3. the images are the right size, and look ok
* Do the same using https, verify that with SSL
1. the images show
2. the image source is from an Amazon url that uses https://
3. the images are the right size, and look ok
Clicking on the image should link to the item on Amazon. This patch
also corrects a problem with the Amazon URL used on the images -
it was pointing to a feature that is currently unavailable. That's
fixed here. All you need to check is that it goes to a valid Amazon
endpoint that doesn't show an error.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Liz Rea [Sun, 6 Apr 2014 22:23:05 +0000 (10:23 +1200)]
Bug 11684: avoid mixed content warnings using SSL with Amazon - opac-readingrecord and opac-user
To test:
0) It goes without saying that images being looked at should
continue to be the proper size and look ok.
1) In the staff client, change the OPAC system preference
opacthemes to 'bootstrap'.
2) Enable Amazon images in the system preferences
3) Issue a book you know will have images for a known user
4) Issue a book you know will have images for intentionally
overdue for the same user
5) git reset --hard origin/master
6) In OPAC, log in as the user.
-- On the 'your summary' tab on the left (which is default),
a) In the 'Checked out' tab, there should be at least two
books. The two books issued should have http images.
b) In the 'Overdue' tag, there should be at least one
book. The image for the overdue book issued should
have http images.
7) Click the 'your reading history' tab on the left.
-- The images for the two books issued should have
http images.
8) Apply the patch
9) Repeat steps 6-7, but all the images in question should
have https images now.
10) In the staff client, change the OPAC system preference
opacthemes to 'prog'.
11) Repeat steps 5-9
12) Run the koha QA test tool
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Checked reading history, overdoes, and checkouts in
bootstrap and prog OPAC. Amazon image URL is now https://.
Jonathan Druart [Wed, 11 Sep 2013 08:36:19 +0000 (10:36 +0200)]
Bug 10862: (follow-up) fix a couple of issues
This followup fixes a couple of issues:
- disable the feature by default.
- use the datatables include file.
- fix the syspref description.
- replace "History search" with "Search history".
- replace biblio with catalog
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Mon, 2 Sep 2013 15:02:02 +0000 (17:02 +0200)]
Bug 10862: Add search history to the intranet interface
Like OPAC, the search history is now available for intranet. This
is controlled by the EnableSearchHistory system preference.
Test plan:
1/ Switch on the 'EnableSearchHistory' syspref.
3/ Launch some biblio and authority searches.
4/ Go on your search history page (top right, under "Set library").
5/ Check that all yours searches are displayed.
6/ Click on some links and check that results are consistent.
7/ Delete your biblio history searches.
8/ Delete your authority searches history searches.
9/ Launch some biblio and authority searches
10/ Play with the 4 delete links (current / previous and biblio /
authority).
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Mon, 5 May 2014 02:55:41 +0000 (02:55 +0000)]
Bug 10807: (follow-up) use 24-hour time when storing search times to session
This ensures that if an anonymous session is converted to a logged-in
session, that search history times from the anonymous session get
stored corectly.
Owen Leonard [Wed, 11 Sep 2013 13:55:14 +0000 (09:55 -0400)]
Bug 10807: (follow-up) wording tweak; take OpacAuthorities into account
This follow-up makes two changes:
1) Change "biblio" to "catalog" when referring to non-authority
searches.
2) Make display of the authority search tab dependent on the
OpacAuthorities system preference. If OPAC authority searches are
disabled we shouldn't show a tab which will always be empty.
To test, view the OPAC search history page with the OpacAuthorities
preference both on and off.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Fri, 30 Aug 2013 12:01:15 +0000 (14:01 +0200)]
Bug 10807: Add an authority search history for the OPAC
Like biblio, this feature provides an authority search history.
This history is available for connected and disconnected user.
If the user is not logged in Koha, the history is stored in an
anonymous user sessin.
The search history feature is now factorized in a new module.
This patch adds:
- 1 new db field search_history.type. It permits to distinguish the
search type (biblio or authority).
- 1 new module C4::Search::History. It deals with 2 different storages:
DB or cookie
- 2 new UT files: t/Search/History.t and t/db_dependent/Search/History.t
- 1 new behavior: the 'Search history' link (on the top-right corner of
the screen) is always displayed.
Test plan:
1/ Switch on the 'EnableOpacSearchHistory' syspref.
2/ Go on the opac and log out.
3/ Launch some biblio and authority searches.
4/ Go on your search history page.
5/ Check that all yours searches are displayed.
6/ Click on some links and check that results are consistent.
7/ Delete your biblio history searches.
8/ Delete your authority searches history searches.
9/ Launch some biblio and authority searches
10/ Delete all your history (cross on the top-right corner)
11/ Check that all your history search is empty.
12/ Launch some biblio and authority searches.
13/ Login to your account.
14/ Check that all previous searches are displayed.
15/ Launch some biblio and authority searches.
16/ Check that these previous searches are displayed under "Current
session".
17/ Play with the 4 delete links (current / previous and biblio /
authority).
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All patches together pass QA script and tests.
Also, new tests in t/db_dependent/ pass.
Tested in all 4 OPAC themes, being logged in and anonymous.
Anonymous search history will be appended to personal search
history after logging in.
Also verified that cleanup_database still purges search history,
now also including the authority searchs.
Fridolin Somers [Wed, 29 Jan 2014 16:26:15 +0000 (17:26 +0100)]
Bug 11635: remove duplicate definition of 995$r in UNIMARC record.abs
Test plan :
- Create a fresh install UNIMARC flavor and GRS1 indexing for biblios
- Re-indexe database
- Perform a search with index "itemtype" (and then "itype") on an
existing value of 995$r. For example : itemtype:BOOK
=> Check you get results
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Mon, 5 May 2014 01:57:56 +0000 (01:57 +0000)]
Bug 6739: (follow-up) do NOT activate new feature by default during upgrade
The previous behavior falls in the category of (arguably) buggy behavior
that nonetheless should not be silently changed on the folks who would
have to deal with patron complaints.
Jonathan Druart [Wed, 15 Jan 2014 10:53:56 +0000 (11:53 +0100)]
Bug 6739: (follow-up) template changes for the bootstrap theme
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script, t, xt and t/db_dependent/Members*.
Testing notes:
- Database update
* Changes to kohastructure match changes done by the updatedatabase
statement. Feature is activated by default!
* Ran database update succesfully.
* Note: Expired patrons are now blocked by default in new
AND in updated installations.
- System preference
* Verified system preference shows up correctly.
- Category configuration
* Add new patron category
* Edit existing patron category
* Delete patron category
* Check patron category summary table.
=> Verified all actions work as expected.
=> Verified chosen value for BlockExpiredPatronOpacActions
is always displayed and saved correctly.
* Note: The new value is missing from the summary table.
* Note: The new value is also not shown when deleting a patron
category.
- Check functionality
* Renew and place a hold for an NOT EXPIRED patron with
a) category: use syspref (default)
syspref: block (default)
b) category: use syspref (default)
syspref: don't block
c) category: block
syspref: don't block
d) category: block
syspref: block
e) category: don't block
sypref: block
f) category: don't block
syspref: don't block
Holds and renewals were always possible.
* Also verified that the warning from NotifyBorrowerDeparture
still shows up correctly.
* Verified holds and renewals are still blocked, when the
user has a restriction with a date in the future.
* Renew and place a hold for an EXPIRED patron with
a) category: use syspref (default)
syspref: block (default)
Holds and renewals blocked.
b) category: use syspref (default)
syspref: don't block
Holds an renewals possible.
c) category: block
syspref: don't block
Holds and renewals blocked.
d) category: block
syspref: block
Holds and renewals blocked.
e) category: don't block
sypref: block
Holds and renewals possible.
f) category: don't block
syspref: don't block
Holds and renewals possible.
Katrin Fischer [Sun, 22 Sep 2013 14:20:19 +0000 (16:20 +0200)]
Bug 6739: (follow-up) yet more fixes
- Fixes a typo in one of the OPAC messages: "you account"
- Fixes the updatedatabase script to use 1 instead of yes for the
system preference default matching the sysprefs.sql file.
- Fixes capitalization "Don't Block" in system preference
description.
- Adding . to the end of the warning, when renewals are blocked.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Some corrections :
- opac-reserve.tt : opening <p> instead of closing
- opac-user.tt : warnexpired was in database format, adds the use
of KohaDates template plugin
- opac-user.tt : duplicated TT test : [% IF ( BORROWER_INF.warnexpired ) %]
and [% ELSIF ( BORROWER_INF.warnexpired ) %], maybe a merge error
- opac-user.tt : <string> instead of <strong>, maybe for HTML 6 :-)
- opac-user.pl : adding dateformat var to template is already done by Auth.pm
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Testing notes:
- Database update
* Changes to kohastructure match changes done by the updatedatabase
statement. Feature is activated by default. Fixing 'yes' to be '1'
in a follow up.
* Ran database update succesfully.
* Note: Patrons are now blocked by default in new installations
AND in updated installations.
- System preference
* Verified system preference shows up correctly.
- Category configuration
* Add new patron category
* Edit existing patron category
* Delete patron category
* Check patron category summary table.
=> Verified all actions work as expected.
=> Verified chosen value for BlockExpiredPatronOpacActions'
is always displayed and saved correctly.
* Note: The new value is missing from the summary table.
* Note: The new value is also not shown when deleting a patron category.
- Check functionality
* Renew and place a hold for an NOT EXPIRED patron with
a) category: use syspref (default)
syspref: block (default)
b) category: use syspref (default)
syspref: don't block
c) category: block
syspref: don't block
d) category: block
syspref: block
e) category: don't block
sypref: block
* Verified renewals and placing holds were never blocked.
* Also verified that the warning from NotifyBorrowerDeparture
still shows up correctly.
* Renew and place a hold for an EXPIRED patron with
a) category: use syspref (default)
syspref: block (default)
=> OK, both actions are blocked.
b) category: use syspref (default)
syspref: don't block
=> OK, both actions possible.
c) category: block
syspref: don't block
=> OK, both actions are blocked.
d) category: block
syspref: block
=> OK, both actions are blocked.
e) category: don't block
sypref: block
=> OK, both actions possible.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
2014-04-06 Update: Will repeat and amend above test plan on last patch in this series.
Installer fixes :
- in kohastructure.sql, category.BlockExpiredPatronOpacActions default
value is -1, sets the same in updatedatabase.pl
- in syspref comment, replaces "opac actions such as placing a hold or
reserve" by "opac actions such as placing holds or renrw books"
- A 'YesNo' does not have 'yes' as value in database, it is '1'.
- corrects small typo "categori" and syspref name case
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Wed, 15 Jan 2014 10:08:48 +0000 (11:08 +0100)]
Bug 6739: (follow-up) fix more issues
* Hide renewal column, buttons and links
* Fixes minor bug where upper-right table links would show even if
renewal impossible
* Cleans up some of the template formatting ( whitespace changes only )
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Chris Hall [Sun, 19 Feb 2012 21:07:13 +0000 (10:07 +1300)]
Bug 6739: make it possible to block expired patrons from OPAC actions
Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Pick a patron, note the patron's category
5) Issue an item to this patron
4) Edit that category, set "Block expired patrons" to "Block"
5) Verify the patron cannot renew or place holds in the OPAC
6) Edit the category again, set "Block expired patrons" to
"Don't block"
7) Verify the patron *can* renew and place holds in the OPAC
8) Edit the category again, set "Block expired patrons" to
"Follow system preference BlockExpiredPatronOpacActions"
9) Set the system preference BlockExpiredPatronOpacActions to
"Block"
10) Verify the patron cannot renew or place holds in the OPAC
11) Set the system preference BlockExpiredPatronOpacActions to
"Don't block"
12) Verify the patron *can* renew and place holds in the OPAC
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Melia Meggs <melia@bywatersolutions.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.
Galen Charlton [Mon, 5 May 2014 01:27:33 +0000 (01:27 +0000)]
Bug 7442: (follow-up) restore display of heading type for non-UNIMARC
This patch restores the display of the authority type summary for
MARC21, where at present the heading type (i.e., "Topical Term",
"Personal Names") come over for display in the template.
Bug 7442 (follow-up) ensuring that summary is display when searching on all types of authorities
This patch corrects a small bug :
Authorities search on all types does not show summary because it is computed
with selected type (which is empty) instead of using found authority type.
Test plan :
- Go to intranet autorities search
- Perform a search on all authorities types
- Look at results
=> Without this patch, results rows do not display the autority summary, only
authorized headings
Bug 7442: fix crash when selecting an authority with 200$x or 200$y (UNIMARC)
From a biblio record, if one wants to add a 600$a information, a pop-up
appears. On this new window, on search terms typed and validated, a table
result is displayed, with a column "Get It!" allowing the selection of an
authority. From here, different cases:
1) If we have a simple authority with 200$a and 200$b subfields, a link
"choose" is displayed, working correctly.
2) If the authority has different occurences of 200$a/200$b, numeric links (1 2
and so on) are displayed, one for each occurence. In the example of my
screenshot, the line with a "Paul, Korky -- Pauline, Korkette" summary
possesses two links : "1" will add "Paul, Korky" whereas "2" will add
"Pauline, Korkette" (couldn't come up with a better name ;)).
3) If the authority has 200$x or 200$y subfields defined, several links are
also created, when it should not be the case. In our example, "Niclausse,
Paul -- Expositions" will create a link "1" for "Niclausse, Paul" and a link
"2" for "Expositions". Clicking on the 2nd link leads to the following
error: Software error: Can't call method "subfields" on an undefined value
at
/home/asaurat/workspace/versions/community/authorities/blinddetail-biblio-search.pl
line 86. Only the cases 1 and 2 should be handled. The creation of links
for subfields like 200$x or 200$y should be removed.
This problem is caused by the use of " -- " has separator of authorities with
several headings, but also in some heading between main part and subdivisions.
This patch corrects this by using an array in authorities summary so that
presentation is computed in template. I've choosen to use the pipe separator
between authorities with several headings. This may be changed to be
configurable.
Test plan :
- Edit an authority type summary : for example subject (heading on 250) :
summary "[250a][ -- 250x]"
- Create an authority A1 with one heading and a subdivision : for example a
subject : 250$a "History" 250$x "20th century"
- Create an authority A2 with several headings. for example a subject : 250$a
"History" 250$a "Legends"
- Rebuild Zebra queue
- Go to OPAC and click on "Authority search" and search on "History"
=> You will find A1 and A2 :
History -- 20th century
History | Legends
- Go to intranet autorities search and search on "History"
=> You will find A1 and A2 :
History -- 20th century
History | Legends
- Edit a record using this autorities type as thesaurus : for example on 606$a
- Click on thesaurus link and search on "History"
=> You will find A1 and A2 :
History -- 20th century ; 0 times ; choose ; Edit authority
History | Legends ; 0 times ; 1 2 ; Edit authority
- Click on link "2" to chosse "Legends"
=> You get "Legends" in heading field : for example 606$a
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
I can confirm the problem and the solution. I have tested the patch on a large
DB with authorities having multiples headings. There is no regression on bug
4838.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Without the patch I couldn't choose between multiple headings
in the authority plugin, but with the patch it works as described.
Marcel de Rooy [Mon, 25 Nov 2013 13:24:42 +0000 (14:24 +0100)]
Bug 11278: Followup for customize command line parameter
The initial patch for this bug did not include a specific command line
option for customization. If a module LocalChanges.pm existed, it would
be used without asking.
This patch adds a command line option enabling the customization option
and offering the extra possibility of using another module name. If no file
name is passed, we default to LocalChanges.
Without the -custom option, behavior is as it was.
Also some POD lines are added to document the feature.
Test plan:
[1] Make a LocalChanges.pm in migration_tools. Verify that it is not used,
if you do not enable the -cust parameter.
[2] Run the script again with -cust. Verify that it is called now.
[3] Copy LocalChanges.pm to Whatever.pm. Make some change. Run with
-cust Whatever and verify that the new module is used.
[4] Copy Whatever.pm to another dir, make some change. Run with -cust and the
full name. Verify that the latest change was used.
[5] Run without any option. Check the pod documentation.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Marcel de Rooy [Thu, 21 Nov 2013 10:29:59 +0000 (11:29 +0100)]
Bug 11278: Adjusting bulkmarcimport.pl for customization routine and verbose printing
This patch makes two adjustments:
[1] For the verbose option, verbose level 2 now means print the
formatted version of each record.
[2] If a module LocalChanges.pm is found in misc/migration_tools, the
routine "customize" in this module is called for each marc record.
This allows you to make local changes to these marc records before
importing them.
Test plan:
[1] Test the verbose option: a single -v for medium verbosity and two
-v to dump a human-readable version of the record to standard output.
(Do not yet copy LocalChanges.pm in the folder.)
You may used the attached example file on Bugzilla:
perl misc/migration_tools/bulkmarcimport.pl -file zztest01.xml -v -v -b -m XML -t | more
Note the option t for test; no records will be imported.
[2] Copy LocalChanges.pm in the migration_tools folder. You may use the
example provided on Bugzilla (in a patch). If you use the example module,
check the contents of 001, 005 and 590 fields. (The -v -v option allows
you to easily check that.)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11117: Fix text mixup in facets where RTL text + facet count showed
This patch adds classes for both the facet label and count, and adds
'inline-block' to the 'facet-count' class so text shows properly.
To reproduce:
- Have facets to show some right to left text (example on the bug
report) in English language templates.
- Enable the displayFacetCount.
- Check it displays like the attached screenshot.
To test:
- Apply the patch
- Do a search that previously reproduced the problem on the staff
interface
=> Shows correctly
- Repeat for OPAC (the three themes)
=> Shows correctly
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Still work as described. Checked in Arabic with Arabic records.
No koha-qa errors
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Confirmed bug and that the patch fixes it, tested in staff,
prog, ccsr and bootstrap.
Lyon3 Team [Mon, 13 Jan 2014 11:09:01 +0000 (12:09 +0100)]
Bug 8231: display warning at check in if borrower is restricted
Display, at check in, a reminder of an already existing suspension date
even if the returned document is not late.
Test plan :
1) Apply the patch
2) Go to a borrower checkout page and checkout some documents with
different passed duedate using "Specify due date" function. Checkout out
one with the default duedate.
3) Check in the document with the bigger delay :
You will get the message : 'X is now restricted until ...'
4) Check in one of the document with a smaller delay :
You'll get a different message : 'Reminder : Patron was earlier
restricted until...'.
5) Check in the document which is not late :
You 'll get the same message as the previous one
Galen Charlton [Sun, 4 May 2014 23:24:06 +0000 (23:24 +0000)]
Bug 11466: (follow-up) add additional test
This adds an additional test case to document the behavior
that if AdvancedSearchTypes contains 'itemtypes' or /is/
'itemtypes', that it returns the same results.
Bug 11466: improve selection of item types for purchase order desired format list
This patch ensures that the list of desired formats for a purchase
suggestion includes the list of item types so long as the
AdvancedSearchTypes system preference includes 'itemtypes'.
--------------
-- Synopsis --
--------------
When system preference AdvancedSearchTypes has other values than 'itemtypes',
for ex 'itemtypes|loc', itemtypes selection in opac-suggestions.pl
is not populated with available itemtypes.
This patch fixes the issue by broadening the strict comparison of
($advanced_search_types eg 'itemtypes') #fails 'itemtypes|loc'
to
($advanced_search_types =~ 'itemtypes') #succeeds 'itemtypes|loc'
Unit tests included
---------------
-- Test plan --
---------------
REPLICATING THE ISSUE
1. Set system preference AdvancedSearchTypes to itemtypes|loc
2. Go to opac-suggestions.pl and observe Item type <select> dropdown list
2.1. List should have only the default value
AFTER APPLYING THIS PATCH
1. Set system preference AdvancedSearchTypes to itemtypes|loc
2. Go to opac-suggestions.pl and observe Item type <select> dropdown list
2.1. List should have itemtypes available for selection
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tests worked as expected. Placed a suggestion and saw the whole
list of item types, chose one, saved, checked staff and it loaded
as expected. Changed item type in staff and it applied in both
views.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests including new regression tests.
Restores old functionality.
Jonathan Druart [Mon, 17 Mar 2014 11:36:55 +0000 (12:36 +0100)]
Bug 766: Use a TT include instead of a method in the AV plugin
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
This gives a koha-qa error, but on another user/env not.
Really don't know
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I see the same error, but can't see where this is coming from,
code seems to work ok.
Works as described, no regressions found.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Thu, 6 Mar 2014 16:08:37 +0000 (17:08 +0100)]
Bug 766: Use the new plugin to generate sort dropdown list - memberentry
Now we can use the method plugin from the memberentry form.
Test plan:
1/ Create a patron and verify sort1 and sort2 dropdown list are
correctly generated.
2/ Select values.
3/ Save.
4/ Edit the patron and verify the selected values are displayed.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Sun, 4 May 2014 22:21:17 +0000 (22:21 +0000)]
Bug 9593: (follow-up) don't make currency.isocode required
This patch changes the price parsing so that it can fall
back on the currency name if an ISO code is not supplied; this allows
for handling the very common situation where the currency name
as entered was already the same as the ISO code.
Lyon3 Team [Tue, 15 Apr 2014 10:13:05 +0000 (12:13 +0200)]
Bug 9593: improve parsing of prices from staged files
Initial bug :
When there's a round price with no decimals after it,
or when the symbol is after the digits, the price is not captured
by regular expression in MungeMarcPrice routine and the variable
is not initialized.
Enhancement :
The MungeMarcPrice routine had been widely modified.
It's still possible to priority pick the active currency but
unlike the previous mechanism that worked only for prices preceded
by the currency sign, it's now valid wherever the symbol is situated.
As symbol you may enter a pure currency sign as well as a string
including it like '$US'. Moreover, an 'isocode' column had been
added in currency table (editable in the staffo interface from
Administration/Currencies and exchange rates). So the active
currency can be picked either through its symbol or through its iso
code.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, especially t/db_dependent/MungeMarcPrice.t
Checked currencies can be added, edited and deleted.
Notes: new ISO code field is mandatory.
Sample sql files need to be updated (bug 12146)
Galen Charlton [Sun, 4 May 2014 21:29:41 +0000 (21:29 +0000)]
Bug 7180: (follow-up) restore ability to select bibs in middle of import batch
This patch repairs the JavaScript that selectively removes unselected
bibs from the form submission, fixing a problem where selecting
bibs from the middle or end of the list would cause them to be ordered
without the appropriate quantities, funds, and prices.
Jonathan Druart [Fri, 25 Apr 2014 09:14:00 +0000 (11:14 +0200)]
Bug 10875: (follow-up) preselect the fund located in the record
It is useless to copy the fund list in a new node. It seems easier to
hide/show inactive/active funds.
This patch also adds a "(inactive)" marker in the fund list for
inactive funds. If the fund located in the record is inactive, it is
displayed by default and cannot be hidden.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 11 Sep 2013 08:01:34 +0000 (10:01 +0200)]
Bug 10875: ensure adding order from a staged file does not display inactive funds by default
When adding an order from a staged file, a link
"show all funds" is now added on the top of the
page. All inactive funds are hidden by default.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described.
- Loading the page, a fund needs to be selected. Before
the patch the first fund was preselected.
- Checking the checkbox, inactive funds show up, but
are not visible otherwise.
- If the fund is selected from the MARC file, the
correct fund will be selected, even if it's inactive.
Jonathan Druart [Wed, 23 Apr 2014 07:56:26 +0000 (09:56 +0200)]
Bug 7180: (follow-up) reset statistic values on reloading the page
On the "Default accounting details", if a dropdown list was created for
a statistic value, on reloading the page it still exist. It should not
given the fund value is reset.
The CGIsort variable is useless and can be remove: the dropdown list
is generated using the ajax call.
Jonathan Druart [Fri, 27 Sep 2013 14:42:44 +0000 (16:42 +0200)]
Bug 7180: (followup) fix case where discount was divided by 100 twice.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Mon, 16 Sep 2013 10:45:52 +0000 (12:45 +0200)]
Bug 7180: (follow-up) remove useless rrp variable
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Thu, 12 Sep 2013 12:59:56 +0000 (14:59 +0200)]
Bug 7180: (follow-up) restore the "Add order" link
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Thu, 12 Sep 2013 12:35:41 +0000 (08:35 -0400)]
Bug 7180: (follow-up) correct minor language issues
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Thu, 12 Sep 2013 09:44:25 +0000 (11:44 +0200)]
Bug 7180: QA followup
- fix unit tests (use a transaction).
- add 3 tabs on the page in order to be more understandable.
- fix a warn in logs
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 11 Sep 2013 07:35:16 +0000 (09:35 +0200)]
Bug 7180: (follow-up) update license version
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Tue, 10 Sep 2013 08:31:11 +0000 (10:31 +0200)]
Bug 7180: make neworderempty code use getAuthValueDropbox.
The js function fetchSortDropbox has been deleted in previous patch.
The new function is getAuthValueDropbox.
Test plan:
- link authorized values to some funds
- open an existing order and verify value are correctly filled in the
sort1 and sort2 values
- create a new order and verify behavior is the same as before
Note: This patch generates 2 ajax queries (max) if the budget is linked
to 2 av categories for sort1 and sort2. This could be improved using a
template plugin for values display on load.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Tue, 10 Sep 2013 08:30:25 +0000 (10:30 +0200)]
Bug 7180: (follow-up) change syspref description
- the blank line is now useless
- add an example for the syspref value
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Katrin Fischer [Mon, 9 Sep 2013 20:53:49 +0000 (22:53 +0200)]
Bug 7180: (follow-up) fix minor issues
- Fixed some labels from Budget to Fund
- Added the system preference to sysprefs.sql
- Fixed some untranslatable Javascript strings
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Mon, 15 Jul 2013 08:05:06 +0000 (10:05 +0200)]
Bug 7180: (follow-up) ensure that the default quantity is 1
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Mon, 1 Jul 2013 13:59:14 +0000 (15:59 +0200)]
Bug 7180: QA followup
Ergonomic improvements:
- Remove the green color the selected record.
- Use fieldset.rows (and legend).
- Use the required css class for quantity inputs.
- Replace "budget" with "fund".
- fix the "undefined" string
- Add a "show MARC" link
- replace "no_match" with a text.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Thu, 21 Mar 2013 12:27:39 +0000 (13:27 +0100)]
Bug 7180: Add UT for C4::Budgets::GetBudgetByCode
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 20 Mar 2013 11:32:07 +0000 (12:32 +0100)]
Bug 7180: (follow-up) fix getAuthValueDropbox should display the selected value
If the no AV match the name/category or if no category is defined, the
input field should contain the value.
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Before this patch you were not able to order 1 or all the records from
your staged file. You were allowed to specify some information ("Import
All" and "Accounting details" areas) for the order.
With this patch, the previous behaviour still exists.
But now you can *select* which records you want to ordered.
For these ones you can specify independently quantity,
price, budget, sort1 and sort2.
The cherry on the cake is that you can pre-fill these fields with
values from the MARC record.
Test plan:
1. Fill the new syspref MarcFieldsToOrder with something like:
==BEGIN==
price: 947$c
quantity: 969$h
budget_code: 922$a
rrp: 010$d
discount: 969$d
sort1: 923$a
sort2: 924$a
==END==
The empty line at the end is mandatory!
The budget (corresponding to your budget_code) can be filled with
authorized value categories (statistic 1 and 2).
The sort1 and sort2 values can be filled with the an authorized value
(of the category previously selected)
2. Choose randomly one or more biblio(s) and fill fields with what is
relevant.
3. Export the biblio and import it (with the "Stage MARC records for
import" tool).
4. Go on a basket and add an order from a staged file. Select your
staged file.
5. Well. Now you can see your biblio (or biblios if your had exported
more than one). For each one, fields should be pre-filled with the
biblio values. The budget should be selected on the budget
corresponding to the budget_code (in the field 922$a) and the
"planning values" too (with fields 923$a and 924$a).
You can modify these values (or not) and choose a default value for
budget and planning values (in the "Accounting details" area).
6. Save and check the prices values. Modify the order and check that
budget and sort* are good
Prices are calculated following some parameters:
if there is no price => listprice = 0
else =>
- the gstrate value for your order is the gstrate value of the bookseller
- discount = if filled : the discount value / 100
else: the discount value of the bookseller
- if the bookseller includes tax( List item price includes tax: Yes )
if a discount exists:
ecost = price
rrp = ecost / ( 1 - discount )
else: # a discount does not exist
ecost = price * ( 1 - discount )
rrp = price
else # the bookseller does not include tax
if a discount exists:
ecost = price / ( 1 + gstrate )
rrp = ecost / ( 1 - discount )
else: # a discount does not exist
rrp = price / ( 1 + gstrate )
ecost = rrp * ( 1 - discount )
- in all cases:
listprice = rrp / currency rate
unitprice = ecost
total = ecost * quantity
7. Retry with different parameters
8. Check the 'Import all' action still works
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Mon, 24 Mar 2014 09:11:47 +0000 (10:11 +0100)]
Bug 10613: (follow-up) fix QA issues
This patch fixes the following QA issue:
FAIL acqui/invoice.pl
FAIL valid
Useless use of private variable in void context
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch passes all tests and QA script. Specifically checked
the t/db_depenedent/Acq* tests.
A test plan could be:
0) Add a value in the gist pref (0.1 or 0.25 or something else easy).
1)
a) Create a supplier "10613 0 0" with
List item price includes tax: No
Invoice item price includes tax: No
Tax: 10%
b) Create a supplier "10613 0 1" with
List item price includes tax: No
Invoice item price includes tax: Yes
Tax: 10%
c) Create a supplier "10613 1 0" with
List item price includes tax: Yes
Invoice item price includes tax: No
Tax: 10%
d) Create a supplier "10613 1 1" with
List item price includes tax: Yes
Invoice item price includes tax: Yes
Tax: 10%
2) Create a basket for each supplier
a) 00 List price: 10.00 (11.00 with 10% taxes)
b) 01 List price: 10.00 (11.00 with 10% taxes)
c) 10 List price: 10.00 (9.09 without taxes)
d) 11 List price: 10.00 (9.09 without taxes)
Note: Information on the basket page is shown correctly.
If you look at the list of ordered items for the fund,
the list price is used.
3) Create 1+ order(s) with 1+ item(s) for each basket with
a discount and a gst value.
4) Close the baskets
5) Receive the items
Left actual price as suggested:
a) 00 Actual cost: 10.00
b) 01 Actual cost: 11.00
c) 10 Actual cost: 9.09
d) 11 Actual cost: 10.00
Calculations on the invoice page now all appear to be correct.
Note: When you take a look at the 'ordered' list for the fund,
the actual price is used as entered.
6) Go on acqui/invoice.pl?invoiceid=XX acqui/basket.pl?basketno=YY for
each basket/invoice, click on the "Show all details" checkbox
and verify that the values are all correct.
Calculations are exactly the same for tax registered yes and no.
Jonathan Druart [Fri, 25 Oct 2013 11:51:03 +0000 (13:51 +0200)]
Bug 10613: (follow-up) fix typo supplierid vs booksellerid
GetInvoiceDetails returns a hashref with a key named booksellerid, not
supplierid.
The bookseller was not retrieved from the DB and the listincgst value
was always false.
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Fri, 19 Jul 2013 09:44:51 +0000 (11:44 +0200)]
Bug 10613: calculate the GST rate correctly on the invoice page.
Test plan:
Defined a GST rate on creating an order, receive it and check that all
prices are correctly calculated.
/!\ Behavior change function of supplier parameters (Include/Don't
include tax for list prices and invoice prices)
Notes: patch tested with Bug 11755 applied first; confirmed that:
- price calculations are correct for all combinations of
listincgst/invoiceincgst settings in the vendor record
- unitprice (aka "Actual cost") is taken into account on the
invoice page instead of rrp/ecost, like it should.
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jacek Ablewicz [Sun, 2 Feb 2014 17:04:00 +0000 (18:04 +0100)]
Bug 11665: An ability to place orders directly from hold ratios list
This enhancement introduces a possibility to place orders
from hold ratios list:
- new option "Add order to basket" -> "From titles w/ highest hold ratios";
(user gets redirected from acqusition to "hold ratios" list in circulation)
- "N to order" in "Items needed" column now becomes a link - when clicked,
user gets redirected back to acquisition, directly to order form for
a choosen title (suggested quantity "N to order" is being preserved)
- in the "Items needed" column, there is an additional indication if
there are any pending (not yet received) orders for a given title
This solution is not exactly ideal.. most important drawback: to use
it librarian needs both acquisition & circulation priviledges; if not
having both - new options will not show / wouldn't be active. But it
requires relatively small amount of changes in the code.
To test:
- apply patch,
- test new functions (try to place some orders using an newly added
option, examine resulting order records etc.)
- check modified hold ratios list for possible problems (for user
with only circulation priviledges, additional information regarding
pending orders should be still visible, but not the link
to order form)
- ensure the two following existing options for adding orders to basket
("From an existing record", "From a new (empty) record") a still working
properly.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Minor edit in signoff: Changed "w/" to "with"
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works nicely in my tests, neat new addition.
Jonathan Druart [Mon, 14 Apr 2014 11:11:12 +0000 (13:11 +0200)]
Bug 12019: ensure that it is optional to define an owner if a fund is restricted
Before this patch, the C4::Budgets::CanUserUseBudget assumed that
budget_owner_id was set if a restriction (budget_permission) exists.
see
&& $budget->{budget_owner_id}
&& $budget->{budget_owner_id} != $borrower->{borrowernumber}
Actually a restriction could exists on users and/or library without
being forced to define an owner.
Test plan:
Create a fund A without restriction
Create a fund B restricted to an owner
Create a fund C restricted to a non defined owner
Create a fund D restricted to owner and users (try defining/no
defining an owner and/or users)
Create a fund E restricted to owner, users and library (try
defining/no defined an owner and/or users)
With different logged in users, try to show/edit these differents funds.
The restriction should be correctly applied.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested various permission combinatons, visibility of funds is now ok.
- not superlibrarian, no buget_manage_all,
no owner, no users, no library, no restrictions on the fund
= visible
- changed: library = staff patron library,
restriction = Owner, users and library
= visible
- changed: library = not staff patron library
= invisible
- changed: budget_manage_all
= visible
- changed: owner = staff patron
no budget_manage_all
= visible
- changed: no owner, user = staff patron
= visible
- changed: no user, owner = another user, restriction = owner
= invisible
- changed: budget_manage_all
= visible
- changed: no budget_manage_all but superlibrarian
= visible
...
Passes tests and QA script, also t/Budgets/*
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Fri, 14 Feb 2014 14:53:41 +0000 (09:53 -0500)]
Bug 11763 - Consolidate fund action links into menu
This patch moves the fund Edit/Delete/Add child links on the fund view
into a pop-up menu, allow the table to be more compact and the links to
be more distinct.
To test you must apply the patches on Bug 11578 if necessary.
Apply the patch and view the funds list page (Administration -> Funds).
For each line there should be an "Actions" menu containing the
Edit/Delete/Add cihld links. Each should function correctly. Test with
inactive budgets shown and hidden.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It is unusual to open the action list above the button, but it works.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 30 Apr 2014 10:34:08 +0000 (12:34 +0200)]
Bug 11578: (follow-up) fix budgets grouping
If 2 budgets (budget periods) have the same description, the funds will
be grouped into the same "block".
This patch adds a distinction adding the id of the budget next to the
description.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 30 Apr 2014 10:12:07 +0000 (12:12 +0200)]
Bug 11578: (follow-up) fix funds grouping
The datatables sort options were wrong.
The funds for a budget could be ungrouped.
To reproduce:
- Create 3 budgets A, B, C.
- Create 1 or more funds for A, B, C
- Mark B and C as inactive.
- Create another fund for A
- Go on the fund list view, click on "show inactive funds"
=> The last fund is not grouped without other funds of budget A.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>