Commit graph

20030 commits

Author SHA1 Message Date
Dobrica Pavlinusic
165e8750b8 Bug 11216: fix bug where editing patron creates indefinite manual restriction
Editing partron data results in unintended adding of indefinite manual
restriction to it. Reason for it is hidden field add_debarment which
is wrongly initialized to 1 instead of 0. Also JavaScript code seems
to want to toggle checkbox, and since this field is hidden correct
approach would be to change its value to 1.

Test scenario:

1. edit patron data
2. verify that debarrment is wrongly added
3. remove debarrment
3. apply this patch
4. edit patron again
5. verify that debarrment wasn't added
6. intentionally add debarrment and verify that it's saved
7. add debarment, enter something in comment but press cancel
   and verify that debarment isn't added

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

This fixes this blocker, however, with or without the patch, the date
is not saved correctly. I will file a new bug for that

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-14 15:39:39 +00:00
Galen Charlton
a1d4af3d73 updated release notes for 3.14.0 beta
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 15:04:49 +00:00
Galen Charlton
0cb4f09eb2 DBRev 3.13.00.042: mark Koha 3.14 beta
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 14:22:26 +00:00
Galen Charlton
9c5e40e492 Bug 10403: (follow-up) fix test to use vendor created earlier during test
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 02:31:22 +00:00
Galen Charlton
af4b6c8420 Bug 8307: (follow-up) fix discrepancy in name of the new syspref
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:46:16 +00:00
Jonathan Druart
de5d977c49 Bug 11132: don't clear the results list upon adding a biblio to a list
A "busc" param is cleared if the template name is not opac-.*detail.tt.
So if a user adds a biblio to a list, he cannot continue to browse
results.

Test plan:
- launch a search at the OPAC (opac-search.pl).
- click on a result and browse results (using previous/next links).
- a title attract your attention and you add it to a list
  ("Save to yours lists" link on the right).
- save the list.
- browse again results.

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan, also checked some other pages and actions
accessible from the detail page.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:39:30 +00:00
Mathieu Saby
eca16da01f Bug 11033: Make Save button and Cancel link always visible on basketgroup page
This patch suppresses the first CSS declaration in basketgroup.tt. It was
unneeded, and was the cause of the Save button and Cancel link not
being visible if the bar for changing language was activated.

To test :
1. activate the "language" syspref, with at least 2 languages
2. open a basketgroup : the 'Save' button and 'Cancel' link are now visible
   at the bottom of basketgroup page
3. Check you can use the basketgroup as before : put a basket in it, cancel, save etc.

Signed-off-by: Koha Team Amu <koha.aixmarseille@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:32:23 +00:00
Sophie Meynieux
394be84dcd Bug 10720: fix issue that prevented use of HTML tags in overdue notices
Substitution term in overdue notices shouldn't be removed if they don't match.
It prevents use of HTML in notices to use with CSS.

Test plan :
- define an overdue notice containing some valid substitution terms + some valid html tags (<strong> or <div class="my class" to use with a css
- find a borrower with overdues that trigger this notice
- run overdue_notices.pl -html <directory>

Without patch, your html tags are missing in your html file
With the patch, they are present and can be used with a css to generate a formatted pdf file.

If you add some invalid substitution term, with the patch, they are still in the final letter, but the warn in the log helps you to correct your notice template.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:28:04 +00:00
Galen Charlton
9abfb7a764 Bug 7684: (follow-up) fix UTF-8 encoding problems in CSV export
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:25:08 +00:00
Galen Charlton
effd8f55f6 Bug 7684: (follow-up) use datatables.inc
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:17:35 +00:00
Jonathan Druart
a24debb150 Bug 7684: (follow-up) fix crash when generating the CSV
The cgi argument in missing for routine
C4::Reports::Guided::_get_column_defs. It causes a crash on generating
the CSV file.

Signed-off-by: Koha Team Amu <koha.aixmarseille@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:16:39 +00:00
Jonathan Druart
f86a16182b Bug 7684: QA Followup and bugfixes
This followup fixes some QA issues:
- replace the MySQLism SQL_CALC_FOUND_ROWS
- use Koha::DateUtils instead of C4::Dates
- replace "branch" and "location" with "library"
- fixe wrong capitalisation on "Clear all" and "Select all"

and fixes some behaviors:
- the inventory tools can be used without barcode file (fixed for the
  csv export too).
- mark as not scanned a non scanned item.
- update the datelastseen 1 time per biblio (and fixes the displayed
  count)

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Koha Team Amu <koha.aixmarseille@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:11:45 +00:00
Matthias Meusburger
0313856d9a Bug 7684: multiple fixes for inventory
* when a file was uploaded and the comparison with catalogue range
 requested, the comparison was wrong: the logic was wrong
* items that were not supposed to be scanned (ie: supposed to be on another shelf)
  didn't had the author and title, it was hard to retrieve them on the shelved
* some useful fields were missing, like homebranch, location, status
* the CSV export contained all the item information. It should contain the same
   informations as the screen

Behaviour now:
   * scan a list of barcode & select a range of location
   * if a barcode has been scanned and should not be (misplaced item),
       the information is displayed
   * if you choose "compare barcodes list to result option", the
     resulting list contains all items that have been scanned and those
     that were supposed to be. Any item not in both list appears with a
     specific message on the last column

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Koha Team Amu <koha.aixmarseille@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:10:49 +00:00
Galen Charlton
8ae61b6a2a Bug 9374: (follow-up) add FIXME suggesting that use of a regexp is not the long-term solution
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:08:04 +00:00
Jonathan Druart
c523b56bcf Bug 9374: The color should manage all zero format.
The format of prices in Koha is discuted in some bugs (e.g. 9410).
The good way will be to introduce a syspref in order to deal with the
number of decimal.
The previous patch is too restrictive, we should deal with other zero
format.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:03:18 +00:00
Mathieu Saby
cbe0d7bebd Bug 9374: Only 0.00 prices must have class error in basket.tt
A regexp '^0' in basket.tt is used to give the class "error" to null prices.
It is wrong, because it matches prices like "0.15". It should only match "0.00".

To test :
- apply the patch
- display a basket with an order with a price between 0 and 1 (like "0.50") and an order with a price stricty null ("0.00")
- only the "0.00" price should be displayed in red

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:03:18 +00:00
Mathieu Saby
79bf1d4a20 Bug 9780: (follow-up) suppress line feeds in javascript
This patch suppress \n in javascript, in order to keep Pootle quiet.

String patch, no need to test I think.
But if you want to test, replay the test plan of main patch, and check
the messages in javascript alert are displaying the right way.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-11-01 00:00:28 +00:00
Mathieu Saby
b693ea0cd8 Bug 9780: restrict the ability to delete a bib record associated with an order
Currently, anyone can delete a record used in an order.

With this patch, only librarians with managing order permission
can delete it if it is used in an active or a deleted order.

This patch also add a specific warning informing that deleting a record
used in an active order is dangerous.

To test :
A. test what can do and see a librarian with order managing rights
0) Connect to Koha with a borrower with order managing rights
1) in a basket, create 2 orders A & B from new records
2) delete order B
3) in the catalogue, try to delete
- record used for order A : you should see a specific warning
   informing you the record is used in 1 order, and that deleting it
   is dangerous
- record used for order B : you should see a specific warning informing
  you the record is used in 1 deleted order
- a record not used in any order : you should see no specific warning

B. test what can do and see a librarian without order managing rights
4) Connect to Koha with a borrower without order managing rights
5) in a basket, create 2 orders A & B from new records
6) delete order B
7) in the catalogue, try to delete
- record used for order A : you should see a specific warning informing you that
   you need specific rights to delete the record
- record used for order B : idem
- a record not used in any order : you should see no specific warning

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:58:40 +00:00
Jonathan Druart
c4c5496ec6 Bug 9218: fix intranet cart email for non english templates
This patch adapts the method from OPAC to the staff interface (cf bug 8062).

Test plan:
- add somes notices to the cart
- try to send the cart by email
- the email should be the same as before
- translate templates and retry with another language. Before this patch,
  the email was empty. With this patch, it contains the list of records
  and items.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Passes all tests and QA script.
Fixes quite a bad translation problem, tested with German templates
and umlauts in the message and records.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:53:25 +00:00
Galen Charlton
42579892b7 Bug 8307: DBrev 3.13.00.041
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:40:54 +00:00
Galen Charlton
1846deb055 Bug 9044: (follow-up) fix merge conflict typo that broke this script
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:39:17 +00:00
0d24afb92c Bug 8307: QA Followup for finishreceive.pl
Only split the expression a=b on the first = sign.
Tested with the very unlikely z=x=1 :)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2013-10-31 23:37:04 +00:00
Jonathan Druart
4b36244c73 Bug 8307: Set a value for subfields when receiving
If items are created when ordering, this patch allows to add a value for
some items subfields.

Test plan:
Define status for items.notforloan (mapping 995$o in unimarc), for
example 4:On order, 5:On treatment

Set the Syspref AcqCreateItem on "ordering".

ACQ framework : set default value = 4 for 995$o (in unimarc)

Syspref AcqItemSetSubfieldsWhenReceived : set "o=5|b='foo bar'"

When ordering the item, default status will be 4 ; when receiving the
item, status will be changed from 4 to 5. The subfield b have to contain
'foo bar'

Signed-off-by: Frederic Durand <frederic.durand@unilim.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2013-10-31 23:36:59 +00:00
Liz Rea
6398126f88 Bug 10776: fix awkward wording in subscription notification screen
to test:
- make a subscription available to be notified about
- log into the opac, click the subscriptions tab, then More details
- click "Subscribe to email notification on new issues"
- observe the text without the patch - there seems to be an extra "arrive?"
- apply the patch, refresh - wording should flow a bit better.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes bad wording and works as described.
Passes all tests and QA script, template change only.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:26:32 +00:00
Colin Campbell
8861c8dda5 Bug 11054: Specify UTF-8 encoding when creating a child record
When the only non-ascii characters in a new child record
are latin + diacritic in the range covered by Latin-1 they
are not being added to a new child record correctly encoded.
Explicitly setting the record's encodiing ensures that
they are interpreted correctly.

see "Unicode Bug" in perldoc perlunicode for background on
why these characters are special

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No koha-qa errors.

Same test as before
1) with a record with diacritics in author/title,
2) press new child record, on new record 773adt
with mangled accents
3) Apply patch
4) Repeat 2, now good results

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested with a record containing umlauts in the title,
$t was empty before and umlauts in $a mangled.
After applying the patch fields are correctly filled and
diacritics display correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:23:10 +00:00
Nicole C. Engard
aed8063ce4 Bug 10671: Update patron help files [ FOLLOW-UP ]
This patch adds two new permissions that were just pushed
to the related patron help files. It is a follow up to the
previous patch that updated the patron help file.

To test:

Apply the patron help patch
Apply this patch
Visit the patron permissions page
Confirm that help is there and right

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:33 +00:00
Nicole C. Engard
1d8746c2ab Bug 10671: Update Acq Help Files
This patch updates the Acq help file links
to the manual.

To test:

* visit acq pages
* confirm manual links are right

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:29 +00:00
Nicole C. Engard
294ac9ccc8 Bug 10671: Update patron help files
This patch updates the text and links in the
patron related help files.

To test:

* visit all patron pages
* Click help
* confirm test and links

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:29 +00:00
Nicole C. Engard
17ac5d01a3 Bug 10671: Update Admin Help Files
This patch updates the links to the manual in the
help files. It also updates the text a bit in a few.

To test:

* Visit admin pages
* Check the help files on each
* Make sure links and text appears

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:29 +00:00
Nicole C. Engard
66266e95f2 Bug 10671: Update Tools Help Files
This patch updates the links to the manual in
the tool help files.

To test:

* Visit tool pages and click the help
* confirm links work

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:28 +00:00
Nicole C. Engard
b7e905f9a9 Bug 10671: Update Serials Help
This patch updates the links to the manual in
the serials help files.

To test:

* Visit serials pages and click the help
* confirm links work

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:28 +00:00
Nicole C. Engard
7d28a3f26d Bug 10671: Update Cataloging Help
This patch updates the links to the manual in
the cataloging help files.

To test:

* Visit cataloging pages and click the help
* confirm links work

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 23:21:28 +00:00
Galen Charlton
b062847364 Bug 8015: (follow-up) don't require userenv
Core routines probably should never assume that they're
running with a valid userenv defined.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:51:13 +00:00
Galen Charlton
7a1c343c91 Bug 8015: (follow-up) update stage_file.pl
This patch fixes the call to BatchStageMarcRecords() made
by the comand-line record importer.  At some point in the future
we could go further and teach that tool how to apply modification
templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:51:13 +00:00
Galen Charlton
7ad9e8a426 Bug 8015: (follow-up) update DBIx::Class schema classes
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:51:13 +00:00
Galen Charlton
b686fa0073 Bug 8015: DBRev 3.13.00.040
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:51:13 +00:00
88e6ae7821 Bug 8015: QA Followup 2
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:48 +00:00
3952c20289 Bug 8015: QA Followup
* Add bug number to database update
* Fix capitalization errors
* Fix JavaScript string translation errors

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:39 +00:00
083f90cc44 Bug 8015: (follow-up) remove references to C4::Koha::Log
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:29 +00:00
f75c878e87 Bug 8015: (follow-up) add user permissions to all languages
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:18 +00:00
Jonathan Druart
5d170aa268 Bug 8015: Add unit tests for SimpleMARC and MarcModificationTemplates routines
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 8015: Fix complains from qa tools

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

Bug 8015: Get rid of the eval in ModifyRecordWithTemplate

This patch removes the use of eval in the
C4::MarcModificationTemplates::ModifyRecordWithTemplate routine.

Now this routine call the wanted modification routine with the list of
parameters.
This call is done only if the condition is respected.

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

Bug 8015: Get rid of eval for evaluating =~ m//

Koha::SimpleMarc::field_equals uses eval in order to check if a string
matches a pattern.
Now this eval is removed and the "regex" variable does not contain the
regex separated character (/ or |).

Regression: Before this patch, the user was able to user a modifier. Now
it is not possible.

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

Bug 8015: Get rid of the eval for substitution

Before this patch, the regex substitution was contain into only one
variable (e.g. my $regex = "/foo/bar/i").
Now each member of the regex is stored into a field in the
marc_modification_template_actions sql table.

In order to avoid a complex code, only modifiers i and g are take into
account.

Note: If you already add the mmta table, you have to drop it.
This patch also adds a foreign key from mmta to mmt tables.

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

Bug 8015: FIX ui issue

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

Bug 8015: The template name is a required field

Test plan:
Try to add a template with an empty string as name.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:50:11 +00:00
7362776897 Bug 8015: (follow-up) fix various issues (squashed patch)
Bug 8015: Fix template capitalization amd other template issues

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Fix error where field object is returned instead of field value for fields without subfields

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Fix bad ordering on function parameters

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Escape escape characters for strings

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Fix bad parameter list for direct external call to update_field

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Fix problem with moving existing subfield value to nonexistent field/subfield

Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: FIX QA issues

This patch fixes some stuffs failing qa tests: POD, indentation (tabs),
perlcritic

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:49:45 +00:00
Jonathan Druart
0a176d4648 Bug 8015: (follow-up) trap exceptions thrown by SetUTF8Flag()
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Catch error in the SetUTF8Flag routine

The eval avoids the interface to run endlessly if an error occurred.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:48:59 +00:00
b38f0213fe Bug 8015: (follow-up) move from the Koha to the C4 namespace
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:48:20 +00:00
Jonathan Druart
5775529ae3 Bug 8015: (follow-up) fix copy and move if subfields don't exist.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Leila <koha.aixmarseille@gmail.com>

Bug 8015: Followup: On move, we cant delete existing fields

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:47:36 +00:00
622430cfb5 Bug 8015: Add MARC Modifications Templates
The MARC Modification Templates system gives Koha users
the power to make alterations to MARC records automatically
while staging MARC records for import.

This tool is useful for altering MARC records from
various venders work with your MARC framework.

The system essentially allows one to create a basic script
using actions to Copy, Move, Add, Update and Delete fields.

Each action can also have an optional condition to check
the value or existance of another field.

The Copy & Move actions also support Regular Expressions,
which can be used to automatically modify field values during the
copy/move. An example would be to strip out the '$' character
in field 020$c.

Furthermore, the value for an update can include variables
that change each time the template is used. Currently,
the system supports two variables, __BRANCHCODE__ which
is replaced with the branchcode of the library currently
using the template, and __CURRENTDATE__ which is replaced
with the current date in ISO format ( YYYY-MM-DD ).

At its simplist, it can perform functions such as:
Copy field 092$a to 952$c
At its most complex it can run actions like:
Copy field 020$c to 020$c using RegEx s/\$// if 020$c equals RegEx m/^\$/

Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 22:47:08 +00:00
Galen Charlton
7c521a8cf2 Bug 8435: (follow-up) prevent t/00-load.t failing
C4::Serials now needs a valid context in order to
load.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 18:51:04 +00:00
d4ad282e91 Bug 10445: (follow-up) fix error
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Followup to failed QA tests have helped pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 18:05:56 +00:00
070e52f401 Bug 10445: make SIP Server respect maxoutstanding system preference
The system preference 'maxoutstanding' is defined as the maximum amount
of fees owed by the patron before Koha should block placing holds (
terrible naming on this one ).

However, although the Koha OPAC respects this preference, placing holds
via a SIP2 device will not.

Test Plan:
1) Set maxoutstanding to $10
2) Pick a patron owning more than $10 in fees
3) Attempt to place a hold for this patron from a SIP2 device
   This attempt should succeed
4) Apply this patch
5) Restart your SIP2 server
6) Attempt to place a hold for this patron from a SIP2 device again
   This attempt should now fail

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 18:05:25 +00:00
f57a057ef4 Bug 10974: make OAI-PMH resumption tokens handle time correctly
This patch changes the value separator in OAI-PMH resumption tokens
from colons to slashes, so that the token string isn't split incorrectly
when a time is included.

TEST PLAN:

1) Turn on the OAI-PMH server syspref in Koha
2) Send a ListRecords request using 'from' and 'until' arguments that
include times (Best to use very far apart times so that you retrieve
more than 50 records which will likely be the trigger for a resumptionToken).
Here is an example:

http://KOHAINSTANCE/cgi-bin/koha/oai.pl?verb=ListRecords&
metadataPrefix=oai_dc&from=2012-09-05T13:44:33Z&until=2014-09-05T13:44:33Z

N.B. Replace KOHAINSTANCE with the URL of your Koha instance.

3) Scroll down to the bottom of the page until you find the resumptionToken.
It will look similar to this:

<resumptionToken cursor="50">
oai_dc:50:2012-09-05T13:44:33Z:2014-09-05T13:44:33Z:
</resumptionToken>

4) Copy that resumption token and send a request with it like so:

http://KOHAINSTANCE/cgi-bin/koha/oai.pl?verb=ListRecords&
resumptionToken=oai_dc:50:2012-09-05T13:44:33Z:2014-09-05T13:44:33Z:

5) The page should (incorrectly) show no records.

6) APPLY PATCH

7) Repeat steps 2, 3, and 4

8) Note that the resumptionToken now uses slashes (e.g. /) instead of
colons.

Note also that now the second request will show records!!!

N.B. This will only happen if Koha has enough records to serve to you.
If your Koha has less than 50 records, try lowering the number provided
in the "OAI-PMH:MaxCount" system preference.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>

I understand; I can now confirm the behaviour described in the test plan.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plan, all tests and QA script.
Resumption Token works correctly after applying the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 18:01:52 +00:00