]> git.koha-community.org Git - koha.git/log
koha.git
10 years agoMerge branch 'new/bug10670' into 3.14.x
Galen Charlton [Thu, 14 Nov 2013 23:54:24 +0000 (23:54 +0000)]
Merge branch 'new/bug10670' into 3.14.x

10 years agoBug 10670: ensure koha-start-zebra sets problem permissions for logs
Dobrica Pavlinusic [Thu, 1 Aug 2013 11:26:03 +0000 (13:26 +0200)]
Bug 10670: ensure koha-start-zebra sets problem permissions for logs

If koha-common is started when Zebra log files are owned by root
it will fail to start without any useful message (since Zebra can't
write errors in log files because it lacks permissions to do so).

This patch creates empty log files and ensure they have correct
permissions.

I can't pin-point why log files gets owned root, but I suspect it
has something to do with Zebra crashing and logrotate, but this is
just theory. We have seen this behaviour since koha 3.1 every
few months, and every time it happends we have root owned logs and
crashed Zebra so this patch will at least help sites which have
some kind of automatic koha-common start if it's not running.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoMerge branch 'new/bug11240' into 3.14.x
Galen Charlton [Thu, 14 Nov 2013 23:08:15 +0000 (23:08 +0000)]
Merge branch 'new/bug11240' into 3.14.x

10 years agoBug 11240: ensure that date of restriction is saved when using patron edit screen
Chris Cormack [Tue, 12 Nov 2013 22:05:32 +0000 (11:05 +1300)]
Bug 11240: ensure that date of restriction is saved when using patron edit screen

To test:

1/ Edit a patron
2/ Add a restriction with a date (in any format other than iso)
3/ Note the date is not saved
4/ Apply patch
5/ Add restriction again, note it is saved

The problem is output_pref was being called with the wrong parameters

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Note: The issue in on the memberentry form only (not the restriction
form on the check out page).

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoMerge branch 'new/bug11196' into 3.14.x
Galen Charlton [Thu, 14 Nov 2013 19:07:23 +0000 (19:07 +0000)]
Merge branch 'new/bug11196' into 3.14.x

10 years agoBug 11196: DBrev 3.13.00.043
Galen Charlton [Thu, 14 Nov 2013 19:06:46 +0000 (19:06 +0000)]
Bug 11196: DBrev 3.13.00.043

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11196: Add SearchEngine syspref in the DB if missing
Jonathan Druart [Wed, 13 Nov 2013 11:13:27 +0000 (12:13 +0100)]
Bug 11196: Add SearchEngine syspref in the DB if missing

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 11196: put SearchEngine to sysprefs.sql
Srdjan [Mon, 4 Nov 2013 01:03:09 +0000 (14:03 +1300)]
bug 11196: put SearchEngine to sysprefs.sql

To test:

Check that sysprefs.sql runs correctly.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoMerge branch 'new/bug10684_take2' into 3.14.x
Galen Charlton [Thu, 14 Nov 2013 18:06:51 +0000 (18:06 +0000)]
Merge branch 'new/bug10684_take2' into 3.14.x

10 years agoBug 10684: (follow-up) adjust how undecodable records are logged
Jonathan Druart [Mon, 26 Aug 2013 15:37:14 +0000 (17:37 +0200)]
Bug 10684: (follow-up) adjust how undecodable records are logged

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10684: make sure that Koha search does not dies on undecodable records
Kyle M Hall [Mon, 5 Aug 2013 13:28:19 +0000 (09:28 -0400)]
Bug 10684: make sure that Koha search does not dies on undecodable records

When a record fails to decode during a search, Koha dies with an error.
Koha should ignore bad records and continue on ( and log the error ).

An example of a record that Zebra will happily ingest but which MARC::Record
doesn't like is one that contains a punctuation character in a tag label.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10684: add regression test
Galen Charlton [Thu, 14 Nov 2013 16:50:37 +0000 (16:50 +0000)]
Bug 10684: add regression test

This patch adds a regression test for Koha's ability
to gracefully handle records that Zebra will index but
which MARC::Record won't parse.  In particular, MARC::File::USMARC
croaks on records that contain non-alphanumeric characters in the
tag name.

To test:

[1] After applying this test, run prove -v t/db_dependent/Search.t
    The test script will die when it gets to the regression test.
[2] After applying the main patches that fix the bug, the test
    script should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoMerge branch 'new/bug11137' into 3.14.x
Galen Charlton [Thu, 14 Nov 2013 15:52:27 +0000 (15:52 +0000)]
Merge branch 'new/bug11137' into 3.14.x

10 years agoBug 11137: fix certain types of searches run using QueryParser
Galen Charlton [Thu, 24 Oct 2013 20:42:38 +0000 (20:42 +0000)]
Bug 11137: fix certain types of searches run using QueryParser

QueryParser was loading redundant search aliases, which in turn resulted
in certain queries involving two or more clauses joined by a Boolean
operator getting parsed in correctly.

To test:

[1] Enable QueryParser.
[2] Arrange your database so that some some bib records contain
    the keyword 'history' while a smaller subset contain
    both 'history' and 'earth'.  (The exact words used don't
    matter.)
[3] Run the following search from the OPAC global search bar:

    kw:history && kw:earth

[4] Observe that the records that are returned include *all* bibs
    in the database with the keyword 'history'.  In other words, the
    restriction  that the records must also contain 'earth' is not
    observed.
[5] Apply the patch and rerun the search.
[6] This time, the results that are returned should include only those
    that contain both 'history' and 'earth'.
[7] Verify that prove -v t/QueryParser.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plans, all tests and QA script.
Also checked the db_dependent/Search.t tests.
Tried some other searches, all seems to be working correctly.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I reproduce the bug and I confirm this patch fixes it.
Without the patch, kw:history && kw:earth, I got:
  Search biblios OK 4 1 1+0 RPN @attrset Bib-1 @attr 4=6 @attr 1=1016 history
With the path, I get:
   Search biblios OK 2 1 1+0 RPN @attrset Bib-1 @and @attr 4=6 @attr 1=1016 history @attr 4=6 @attr 1=1016 earth

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11137: regression tests for QP search field alias bug
Galen Charlton [Thu, 24 Oct 2013 20:25:55 +0000 (20:25 +0000)]
Bug 11137: regression tests for QP search field alias bug

This patch adds regression tests to verify that
Boolean searches using QueryParser function correctly.

This patch also ensures that QP is correctly initalized
when Search.t is run.

To test:

[1] Apply this patch and the following patch.
[2] Verify that prove -v t/QueryParser.t works
[3] Verify that prove -v t/db_dependent/Search.t works
[4] (optional) instead of applying both patches at the same
    time, apply only the regression test patch and run the
    tests listed in steps 2 and 3.  The following tests
    should fail:

t/db_dependent/Search.t (Wstat: 512 Tests: 198 Failed: 2)
  Failed tests:  42, 71
  Non-zero exit status: 2
t/QueryParser.t (Wstat: 256 Tests: 28 Failed: 1)
  Failed test:  12
  Non-zero exit status: 1

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoMerge branch 'new/bug11216' into 3.14.x
Galen Charlton [Thu, 14 Nov 2013 15:44:52 +0000 (15:44 +0000)]
Merge branch 'new/bug11216' into 3.14.x

10 years agoBug 11216: fix bug where editing patron creates indefinite manual restriction
Dobrica Pavlinusic [Fri, 8 Nov 2013 13:50:38 +0000 (14:50 +0100)]
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>
10 years agoMerge branch 'new/bug11205' into 3.14.x
Galen Charlton [Sat, 9 Nov 2013 16:31:02 +0000 (16:31 +0000)]
Merge branch 'new/bug11205' into 3.14.x

10 years agoBug 11205: fix DataTables filter issue when more than one table is on a page
Jonathan Druart [Tue, 5 Nov 2013 17:07:56 +0000 (18:07 +0100)]
Bug 11205: fix DataTables filter issue when more than one table is on a page

This patch fixes a bug where if there are more than one table on the
same page that uses the DataTables column filter, applying a filter on
one table applied it to both.

Test plan:
1/ Go on serials/serials-search.pl?searched=1
2/ Filter on a column (e.g., title) on the open subscriptions
   table.
3/ Switch to the closed subscriptions table.  Observe that
   that the table is *also* filtered by the criteria
   set for the open subscriptions table.
4/ Apply the patch and reload the page.
5/ This time, applying a filter on one time should not affect
   the other table.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoMerge branch 'new/bug11159' into 3.14.x
Galen Charlton [Fri, 8 Nov 2013 16:29:36 +0000 (16:29 +0000)]
Merge branch 'new/bug11159' into 3.14.x

10 years agoBug 11159: fix small typo in catalogue/results.tt
Fridolyn SOMERS [Tue, 29 Oct 2013 13:17:45 +0000 (14:17 +0100)]
Bug 11159: fix small typo in catalogue/results.tt

In catalogue/results.tt, there is a small HTML error line 377 :
[% ELSE %]<option value"au,phr">Author</option>[% END %]
The = is missing

Test plan :
- In intranet, test go to advanced search
- Click on [More options]
- Enter a term, check "Scan indexes" and click on "Search"
- Look at HTML code of select "Indexed in"
=> option "Author" is correct : <option value="au,phr">Author</option>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoMerge branch 'new/bug11218' into 3.14.x
Galen Charlton [Fri, 8 Nov 2013 16:24:56 +0000 (16:24 +0000)]
Merge branch 'new/bug11218' into 3.14.x

10 years agoBug 11218: (follow-up) fix whitespace
Galen Charlton [Fri, 8 Nov 2013 16:21:26 +0000 (16:21 +0000)]
Bug 11218: (follow-up) fix whitespace

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11218: (follow-up) fix some whitespace and a variable declaration
Katrin Fischer [Fri, 8 Nov 2013 07:33:29 +0000 (08:33 +0100)]
Bug 11218: (follow-up) fix some whitespace and a variable declaration

Fixing some things the QA script pointed out this morning:

- whitespace
- variable declaration

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11218: fix Item Due notices not being generated
Katrin Fischer [Thu, 7 Nov 2013 23:31:09 +0000 (00:31 +0100)]
Bug 11218: fix Item Due notices not being generated

To test:
- Check out at least 3 items, due dates should be today, sometime in
  the past and one day after tomorrow.
- Edit the message options - activate DUE and PREDUE notices with
  days in advance = 2
- Run the advance_notices.pl script with -v -c
  Result: Only a PREDUE notice is generated
- Run the advance_notices.pl script with -v -c -m 2
  Result: Only the PREDUE message is generated correctly.
- Run t/db_dependent/Circulation.t
  - without first patch: all tests pass.
  - with first patch: some tests will fail.
- Apply patch.
- Rerun script, now PREDUE and DUE notices should be
  generated.
- Run t/db_dependent/Circulation.t again, all tests should pass.

Add more items with different due dates, rerun and check results.

Run t/Circulation.t to confirm all tests pass.
- Apply the patch

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Passes functional tests and automated tests.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11218: regression tests for Due notice generation
Katrin Fischer [Thu, 7 Nov 2013 23:26:45 +0000 (00:26 +0100)]
Bug 11218: regression tests for Due notice generation

Changes tests for GetUpcomingDueIssues:

days_in_advance should be inclusive:
 2 should find items due in 2 days from now.
 1 should find items due tomorrow.
 0 should only find items due today.

Adds new tests for Bug 11218:

As the advance_notices.pl, the only script using GetUpcomingDueIssues
is not only used for PREDUE notices, but also for
DUE notices, we need to also select items due today.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 11204: make pendingreserves use datatables.inc
Jonathan Druart [Tue, 5 Nov 2013 16:58:17 +0000 (17:58 +0100)]
Bug 11204: make pendingreserves use datatables.inc

A JS error occurs on the pending reserves (holds to pull) page:

ReferenceError: CONFIG_EXCLUDE_ARTICLES_FROM_SORT is not defined
if(CONFIG_EXCLUDE_ARTICLES_FROM_SORT){

Test plan:
Apply the patch and verify the error does not appear anymore.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 11204: make pendingreserves use datatables.inc
Jonathan Druart [Tue, 5 Nov 2013 16:58:17 +0000 (17:58 +0100)]
Bug 11204: make pendingreserves use datatables.inc

A JS error occurs on the pending reserves (holds to pull) page:

ReferenceError: CONFIG_EXCLUDE_ARTICLES_FROM_SORT is not defined
if(CONFIG_EXCLUDE_ARTICLES_FROM_SORT){

Test plan:
Apply the patch and verify the error does not appear anymore.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoupdated release notes for 3.14.0 beta v3.14.00-beta
Galen Charlton [Fri, 1 Nov 2013 15:04:49 +0000 (15:04 +0000)]
updated release notes for 3.14.0 beta

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoDBRev 3.13.00.042: mark Koha 3.14 beta
Galen Charlton [Fri, 1 Nov 2013 14:22:26 +0000 (14:22 +0000)]
DBRev 3.13.00.042: mark Koha 3.14 beta

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 10403: (follow-up) fix test to use vendor created earlier during test
Galen Charlton [Fri, 1 Nov 2013 02:31:22 +0000 (02:31 +0000)]
Bug 10403: (follow-up) fix test to use vendor created earlier during test

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8307: (follow-up) fix discrepancy in name of the new syspref
Galen Charlton [Fri, 1 Nov 2013 00:46:16 +0000 (00:46 +0000)]
Bug 8307: (follow-up) fix discrepancy in name of the new syspref

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 11132: don't clear the results list upon adding a biblio to a list
Jonathan Druart [Thu, 24 Oct 2013 15:06:08 +0000 (17:06 +0200)]
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>
11 years agoBug 11033: Make Save button and Cancel link always visible on basketgroup page
Mathieu Saby [Thu, 10 Oct 2013 11:34:37 +0000 (13:34 +0200)]
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>
11 years agoBug 10720: fix issue that prevented use of HTML tags in overdue notices
Sophie Meynieux [Tue, 13 Aug 2013 16:14:21 +0000 (18:14 +0200)]
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>
11 years agoBug 7684: (follow-up) fix UTF-8 encoding problems in CSV export
Galen Charlton [Fri, 1 Nov 2013 00:25:08 +0000 (00:25 +0000)]
Bug 7684: (follow-up) fix UTF-8 encoding problems in CSV export

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7684: (follow-up) use datatables.inc
Galen Charlton [Fri, 1 Nov 2013 00:17:35 +0000 (00:17 +0000)]
Bug 7684: (follow-up) use datatables.inc

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7684: (follow-up) fix crash when generating the CSV
Jonathan Druart [Fri, 11 Oct 2013 14:29:34 +0000 (16:29 +0200)]
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>
11 years agoBug 7684: QA Followup and bugfixes
Jonathan Druart [Thu, 6 Jun 2013 12:37:19 +0000 (14:37 +0200)]
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>
11 years agoBug 7684: multiple fixes for inventory
Matthias Meusburger [Thu, 23 Aug 2012 14:02:52 +0000 (16:02 +0200)]
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>
11 years agoBug 9374: (follow-up) add FIXME suggesting that use of a regexp is not the long-term...
Galen Charlton [Fri, 1 Nov 2013 00:08:04 +0000 (00:08 +0000)]
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>
11 years agoBug 9374: The color should manage all zero format.
Jonathan Druart [Thu, 19 Sep 2013 15:03:00 +0000 (17:03 +0200)]
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>
11 years agoBug 9374: Only 0.00 prices must have class error in basket.tt
Mathieu Saby [Sun, 15 Sep 2013 11:09:20 +0000 (13:09 +0200)]
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>
11 years agoBug 9780: (follow-up) suppress line feeds in javascript
Mathieu Saby [Mon, 21 Oct 2013 17:24:34 +0000 (19:24 +0200)]
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>
11 years agoBug 9780: restrict the ability to delete a bib record associated with an order
Mathieu Saby [Thu, 19 Sep 2013 12:12:02 +0000 (14:12 +0200)]
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>
11 years agoBug 9218: fix intranet cart email for non english templates
Jonathan Druart [Tue, 8 Oct 2013 08:52:28 +0000 (10:52 +0200)]
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>
11 years agoBug 8307: DBrev 3.13.00.041
Galen Charlton [Thu, 31 Oct 2013 23:40:54 +0000 (23:40 +0000)]
Bug 8307: DBrev 3.13.00.041

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 9044: (follow-up) fix merge conflict typo that broke this script
Galen Charlton [Thu, 31 Oct 2013 23:39:17 +0000 (23:39 +0000)]
Bug 9044: (follow-up) fix merge conflict typo that broke this script

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8307: QA Followup for finishreceive.pl
Marcel de Rooy [Mon, 3 Jun 2013 08:19:39 +0000 (10:19 +0200)]
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>
11 years agoBug 8307: Set a value for subfields when receiving
Jonathan Druart [Fri, 18 May 2012 11:42:36 +0000 (13:42 +0200)]
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>
11 years agoBug 10776: fix awkward wording in subscription notification screen
Liz Rea [Thu, 22 Aug 2013 04:55:48 +0000 (16:55 +1200)]
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>
11 years agoBug 11054: Specify UTF-8 encoding when creating a child record
Colin Campbell [Tue, 15 Oct 2013 14:09:08 +0000 (15:09 +0100)]
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>
11 years agoBug 10671: Update patron help files [ FOLLOW-UP ]
Nicole C. Engard [Sat, 26 Oct 2013 03:47:54 +0000 (23:47 -0400)]
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>
11 years agoBug 10671: Update Acq Help Files
Nicole C. Engard [Sat, 26 Oct 2013 01:35:25 +0000 (21:35 -0400)]
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>
11 years agoBug 10671: Update patron help files
Nicole C. Engard [Sat, 26 Oct 2013 01:27:49 +0000 (21:27 -0400)]
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>
11 years agoBug 10671: Update Admin Help Files
Nicole C. Engard [Sat, 26 Oct 2013 01:04:12 +0000 (21:04 -0400)]
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>
11 years agoBug 10671: Update Tools Help Files
Nicole C. Engard [Sat, 26 Oct 2013 00:42:43 +0000 (20:42 -0400)]
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>
11 years agoBug 10671: Update Serials Help
Nicole C. Engard [Sat, 26 Oct 2013 00:31:54 +0000 (20:31 -0400)]
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>
11 years agoBug 10671: Update Cataloging Help
Nicole C. Engard [Sat, 26 Oct 2013 00:10:21 +0000 (20:10 -0400)]
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>
11 years agoBug 8015: (follow-up) don't require userenv
Galen Charlton [Thu, 31 Oct 2013 22:36:39 +0000 (22:36 +0000)]
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>
11 years agoBug 8015: (follow-up) update stage_file.pl
Galen Charlton [Thu, 31 Oct 2013 22:10:31 +0000 (22:10 +0000)]
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>
11 years agoBug 8015: (follow-up) update DBIx::Class schema classes
Galen Charlton [Thu, 31 Oct 2013 22:04:22 +0000 (22:04 +0000)]
Bug 8015: (follow-up) update DBIx::Class schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8015: DBRev 3.13.00.040
Galen Charlton [Thu, 31 Oct 2013 22:02:25 +0000 (22:02 +0000)]
Bug 8015: DBRev 3.13.00.040

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8015: QA Followup 2
Kyle M Hall [Tue, 22 Oct 2013 18:24:36 +0000 (14:24 -0400)]
Bug 8015: QA Followup 2

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8015: QA Followup
Kyle M Hall [Tue, 22 Oct 2013 16:55:02 +0000 (12:55 -0400)]
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>
11 years agoBug 8015: (follow-up) remove references to C4::Koha::Log
Kyle M Hall [Tue, 22 Oct 2013 16:24:10 +0000 (12:24 -0400)]
Bug 8015: (follow-up) remove references to C4::Koha::Log

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8015: (follow-up) add user permissions to all languages
Kyle M Hall [Tue, 22 Oct 2013 16:19:21 +0000 (12:19 -0400)]
Bug 8015: (follow-up) add user permissions to all languages

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8015: Add unit tests for SimpleMARC and MarcModificationTemplates routines
Jonathan Druart [Fri, 29 Mar 2013 16:29:27 +0000 (17:29 +0100)]
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>
11 years agoBug 8015: (follow-up) fix various issues (squashed patch)
Kyle M Hall [Tue, 19 Mar 2013 10:27:46 +0000 (03:27 -0700)]
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>
11 years agoBug 8015: (follow-up) trap exceptions thrown by SetUTF8Flag()
Jonathan Druart [Tue, 16 Oct 2012 07:45:07 +0000 (09:45 +0200)]
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>
11 years agoBug 8015: (follow-up) move from the Koha to the C4 namespace
Kyle M Hall [Fri, 28 Sep 2012 12:39:58 +0000 (08:39 -0400)]
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>
11 years agoBug 8015: (follow-up) fix copy and move if subfields don't exist.
Jonathan Druart [Mon, 13 Aug 2012 15:04:05 +0000 (17:04 +0200)]
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>
11 years agoBug 8015: Add MARC Modifications Templates
Kyle M Hall [Thu, 26 Apr 2012 20:08:57 +0000 (16:08 -0400)]
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>
11 years agoBug 8435: (follow-up) prevent t/00-load.t failing
Galen Charlton [Thu, 31 Oct 2013 18:51:04 +0000 (18:51 +0000)]
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>
11 years agoBug 10445: (follow-up) fix error
Kyle M Hall [Mon, 21 Oct 2013 00:27:31 +0000 (20:27 -0400)]
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>
11 years agoBug 10445: make SIP Server respect maxoutstanding system preference
Kyle M Hall [Tue, 11 Jun 2013 14:00:58 +0000 (10:00 -0400)]
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>
11 years agoBug 10974: make OAI-PMH resumption tokens handle time correctly
David Cook [Mon, 30 Sep 2013 05:47:03 +0000 (15:47 +1000)]
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>
11 years agoBug 11178: Make the Bootstrap OPAC theme the default for new installs
Galen Charlton [Thu, 31 Oct 2013 17:03:32 +0000 (17:03 +0000)]
Bug 11178: Make the Bootstrap OPAC theme the default for new installs

This patch implements the proposal adopted by the community to
make Boostrap be the default OPAC theme for new Koha installs.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 11142 - Update Bootstrap theme's place hold form to match the new version in...
Owen Leonard [Fri, 25 Oct 2013 19:31:51 +0000 (15:31 -0400)]
Bug 11142 - Update Bootstrap theme's place hold form to match the new version in prog

The update to the prog theme's place hold page (Bug 10836) happened
after the Bootstrap theme's place hold form had already been converted,
so it lags behind. This patch applies the changes made to prog to Bootstrap.

To test, switch to the Bootstrap theme and follow the test plan from Bug
10836:

Place single and multiple holds under various conditions:

- Items which are not available to be place on hold
- With OpacHoldNotes on and off
- With OPACItemHolds on and off
- With OPACAllowHoldDateInFuture on and off
- With IndependentBranches on and off
- With JavaScript disabled

Test setting hold notes, holding specific copies, and setting hold start
dates. When setting a hold start date and hold expiration date, the two
datepickers should work together to prevent invalid date combinations
(dates after today, expiration dates which precede the start date).

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

Tested all situations, all syspref, and without JavaScript.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 10283: Hide "many items" on second tab when using OpacSeparateHoldings
Jonathan Druart [Mon, 20 May 2013 07:53:38 +0000 (09:53 +0200)]
Bug 10283: Hide "many items" on second tab when using OpacSeparateHoldings

If there are over 50 items in the holdings or Other holdings tab, the
warning and link 'This record has many physical items. Click here to
view them all.' is only shown for the first tab.

Test plan:
- Switch on the OpacSeparateHoldings pref.
- Go on a biblio detail page at the OPAC with more than 50 items
- Check that the 'view all' link appears on the second tab.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 10523: Remove two obsolete routines from Installer.pm
Marcel de Rooy [Mon, 1 Jul 2013 13:12:53 +0000 (15:12 +0200)]
Bug 10523: Remove two obsolete routines from Installer.pm

The routines sql_file_list and marcflavour_list in Installer.pm are not used.
There are some references to them in probably obsolete '/lib' test units.
I changed these test units for the record too.

Also: removed the not-existing marcflavour parameter of sample_data_sql_list
in its call in install.pl.

Test plan:
Run a new install.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7295: DBRev 3.13.00.039
Galen Charlton [Thu, 31 Oct 2013 16:33:17 +0000 (16:33 +0000)]
Bug 7295: DBRev 3.13.00.039

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7295: (follow-up) update DBIx::Class schema classes
Galen Charlton [Thu, 31 Oct 2013 16:32:51 +0000 (16:32 +0000)]
Bug 7295: (follow-up) update DBIx::Class schema classes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7295: (follow-up) fix syntax error in kohastructure.sql
Galen Charlton [Thu, 31 Oct 2013 16:30:29 +0000 (16:30 +0000)]
Bug 7295: (follow-up) fix syntax error in kohastructure.sql

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7295 (follow-up) replace simple-quoted string by double-quoted string
Julian Maurice [Thu, 18 Jul 2013 09:04:08 +0000 (11:04 +0200)]
Bug 7295 (follow-up) replace simple-quoted string by double-quoted string

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7295: (follow-up) several fixes
Julian Maurice [Tue, 17 Jul 2012 08:51:36 +0000 (10:51 +0200)]
Bug 7295: (follow-up) several fixes

- List of libraries in basket.pl is now sorted by branch name, not code
- When IndependantBranches is ON, user has only the possibility to set
  basket branch to its own branch, or to no branch at all.
- When basket do not belong to any branch, selected branch by default is
  connection branch (was 'no branch')
- added id attributes to both added li elements
- change description of 'order_manage_all' permission to make it
  clearer.
- remove Test::MockModule dependency

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7295: More granular permissions for baskets
Julian Maurice [Fri, 20 Apr 2012 15:12:29 +0000 (17:12 +0200)]
Bug 7295: More granular permissions for baskets

- Add branch info to baskets
- Add a list of borrowers that are allowed to manage a basket (one list
for each basket).
- Add a new subpermission: acquisition => order_manage_all

If user is superlibrarian, or if that user has permission acquisition = 1
(GranularPermissions = OFF), or subpermission acquisition =>
order_manage_all (GranularPermissions = ON), that user is authorised to manage
all baskets.

Depending on syspref AcqViewBaskets:
  'all': user can manage all baskets
  'branch': user can manage baskets of their branch (the basket branch is
            taken into account, not the branch of the basket's creator).
            If basket branch is not defined, all users can manage this
            basket.
  'user': user can manage baskets she created, and baskets in their
          user list

There are unit tests in t/Acquisition/CanUserManageBasket.t, which
require Test::MockModule

You can edit basket's branch and users list in basket modification page
(acqui/basket.pl)

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 11168: fix regression that broke exporting serial claims to CSV
Jonathan Druart [Wed, 30 Oct 2013 11:33:15 +0000 (12:33 +0100)]
Bug 11168: fix regression that broke exporting serial claims to CSV

Bug 7688 broke the exporting serial claims as CSV (see bug 10854).

For C4::Serials::GetLateOrMissingIssues(), $supplierid is not
meant to be mandatory.  This patch fixes that.

Test plan:
try to export a serial claim.
Without this patch, the csv is always empty.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7298: (follow-up) fix uninitialized variable warning
Galen Charlton [Thu, 31 Oct 2013 15:46:42 +0000 (15:46 +0000)]
Bug 7298: (follow-up) fix uninitialized variable warning

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7298: (follow-up) fix translation for CSV strings
Jonathan Druart [Tue, 24 Sep 2013 08:19:27 +0000 (10:19 +0200)]
Bug 7298: (follow-up) fix translation for CSV strings

Following the same way as bug 10935, the headers are in an include file.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Translatability tested successfully.
Passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7298: (follow-up) various QA fixes
Jonathan Druart [Mon, 23 Sep 2013 08:43:20 +0000 (10:43 +0200)]
Bug 7298: (follow-up) various QA fixes

- use Modern::Perl;
- GPL version
- tabs

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and all tests.

Testing notes:
- CSV header row is now translatable.
  Tested by updating the German po files and checking for the line.
- Tested that claiming for late serial issues still works as
  expected, as one file has been renamed. Filed 10931 for
  untranslatable CSV contents.
- Tested that claiming late orders still works:
  * Table searching and sorting
    Works nicely, but some columns could be split up for better
    searching and sorting:
      * Order date: 20/01/2013 (245 days)
      * Total cost:     10.00x1 = 10.00 Books
        => item type should be separate
      * Basket:  10 MPL
        => Library and basket number could be separate columns
  * Filters
     * Combined various filters, search results look correct.
  * Selecting order for claiming
      * Limiting by vendor makes it possible to check/uncheck all
      * With no vendor limit, entries for other vendors will be
        locked after the first checkbox is checked for one vendor
  * Exporting as CSV
     * Exported single line > CSV appears correct.
     * Exporting multiple lines > CSV appears correct.
     PROBLEM: Translated CSV don't work correctly, as line
     breaks are lost in the translation process.
     Needs to be fixed in a follow-up.
  * Sending serial claim email
     * No regressions found - there are some problems with the
       email contents noted on bug 7298.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7298: (follow-up) make CSV strings translatables.
Jonathan Druart [Tue, 13 Aug 2013 14:21:33 +0000 (16:21 +0200)]
Bug 7298: (follow-up) make CSV strings translatables.

Using a template file, the CSV headers become translatable.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7298: (follow-up) fix checkboxes binding on load
Jonathan Druart [Tue, 13 Aug 2013 13:27:38 +0000 (15:27 +0200)]
Bug 7298: (follow-up) fix checkboxes binding on load

Click on checkboxes should be bound on load.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7298: (follow-up) fix capitalization and moving supplier id
Katrin Fischer [Sat, 20 Jul 2013 17:52:11 +0000 (19:52 +0200)]
Bug 7298: (follow-up) fix capitalization and moving supplier id

Fixes a few capitalization errors on the late orders page like
- Claim orders
- filter
- Search results

Also moves the supplierid from the order date column to the
vendor column.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 7298: add option to export late orders as CSV
Jonathan Druart [Fri, 22 Jun 2012 09:10:57 +0000 (11:10 +0200)]
Bug 7298: add option to export late orders as CSV

This patch allows to export late orders as CSV.

Test plan:
- Go on the late orders page (acqui/lateorders.pl)
- Select one or more order and click on the button "Export as CSV".
- The generated file should contains some information on the orders
  (order date, estimated delivery date, vendor name, information field,
  cost, basket name (and basketid), claims count and the claimed date)
  The last line of the file is the total of orders.
- You are not allow to select order from different vendor.
- The check/uncheck all links appears only if a vendor is selected.
- Check that the check/uncheck works for all pages of the table.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing comments on last patch in this series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8435: (follow-up) make SearchSubscriptions handle lack of userenv
Galen Charlton [Thu, 31 Oct 2013 15:37:00 +0000 (15:37 +0000)]
Bug 8435: (follow-up) make SearchSubscriptions handle lack of userenv

This patch allows t/db_dependent/Bookseller.t to pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8435: DBRev 3.13.00.038
Galen Charlton [Thu, 31 Oct 2013 15:26:51 +0000 (15:26 +0000)]
Bug 8435: DBRev 3.13.00.038

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8435: (follow-up) handle lack of userenv gracefully
Jonathan Druart [Thu, 31 Oct 2013 08:49:12 +0000 (09:49 +0100)]
Bug 8435: (follow-up) handle lack of userenv gracefully

C4::Serials::can_edit_subscription now deals with C4::Context->userenv.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8435: (follow-up) the unit tests should create the biblio
Jonathan Druart [Wed, 21 Aug 2013 12:23:24 +0000 (14:23 +0200)]
Bug 8435: (follow-up) the unit tests should create the biblio

Previous version does not create the biblio.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
11 years agoBug 8435: (follow-up) use a transaction for unit tests
Jonathan Druart [Fri, 28 Jun 2013 07:27:39 +0000 (09:27 +0200)]
Bug 8435: (follow-up) use a transaction for unit tests

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