]> git.koha-community.org Git - koha.git/log
koha.git
9 years agoBug 13982: Checkouts table not sorting on correct column
Kyle M Hall [Mon, 13 Apr 2015 10:56:24 +0000 (05:56 -0500)]
Bug 13982: Checkouts table not sorting on correct column

The "Date Due" column for checkouts is using the column index 1 to sort by.
This column is the one that is used for grouping items into today's checkouts
and previous checkouts. This is definitely not the column that should be used.
Instead, we should be using column index 2, which contains the raw unformatted
due date.

Revised Test Plan:
1) Find a patron with no checkouts
2) Check out something as due the beginning on the month.
3) Check out something as due the end of the month.
4) Check out something due tomorrow (hopefully not end of month)
   -- so you should have 2015-04-01, 2015-04-30, and 2015-04-14
      (for example)
5) Attempt to sort by due date
   -- Note the sorting is incorrect
6) Apply this patch
7) Clear your browser cache
8) Reload the page
9) Attempt to sort by due date again
   -- Note the sorting works correctly this time
10) Verify there are no regressions with bug 13908
    -- this will require finding a patron with many checkouts,
       playing with the Circulation system preferences
       previousIssuesDefaultSortOrder and todaysIssuesDefaultSortOrder,
       and understanding what the four different cases mean with
       respect to actually manually sorting the 'Due Date' column.

NOTE: I did not do step 10,
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 35acace47f6f2e10451563d6a8cc1a70810f63dc)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14056: Small punctuation error in description for deleting a holiday
Aleisha [Mon, 27 Apr 2015 23:54:37 +0000 (23:54 +0000)]
Bug 14056: Small punctuation error in description for deleting a holiday

This patch just inserts a semi-colon into the description so that it makes more grammatical sense.

Test plan:
1) Go to Tools --> Calendar
2) Create or find a holiday, click on it so the editing options come up
3) Click on the question mark link to show the description for the option "Delete the exceptions on a range"
4) Confirm that this now has a semi-colon and reads "... Be careful about your scope range; if it is oversized you could slow down Koha."

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 24e0c1b756945517e4ec02af81bc761128b1a907)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 12192: Template toolkit code in HTML attributes is picked up into po-files
Bernardo Gonzalez Kriegel [Tue, 28 Apr 2015 21:24:27 +0000 (18:24 -0300)]
Bug 12192: Template toolkit code in HTML attributes is picked up into po-files

This patch gives a partial solution for this problem.
It ignores strings like "[% something %]", but not
"[% IF ( value )  %][% value %][% END %]"

We get 100+ strings less to translate

To test:
1) Update translation files for your preferred language
2) Apply the patch
3) Update again
4) Compare, you must find 100+ strings removed from
translation files

eg.
-msgid "[% SEARCH_RESULT.biblionumber |url %]"
-msgid "[% accepteddate | $KohaDates %]"
-msgid "[% amountoutstanding | format('%.2f') %]"
-msgid "[% authtypetext |html %]"
-msgid "[% barcode_llx |html %]"
-msgid "[% barcode_lly |html %]"
-msgid "[% biblio.quantity.length ? biblio.quantity : 1 %]"
-msgid "[% billingdate | $KohaDates %]"
-msgid "[% borname |html %]"
...

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified all strings removed from the po files were
pure TT.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 5caa05104dfc30d70be5ea1b17d406b5392d59bc)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14122: Patron card: Software error when creating using borrower_number as paramet...
Marc Véron [Sat, 2 May 2015 19:47:01 +0000 (21:47 +0200)]
Bug 14122: Patron card: Software error when creating using borrower_number as parameter from URL

To test prepare an URL like the following:

...cgi-bin/koha/patroncards/create-pdf.pl?borrower_number=61&template_id=24&layout_id=21&start_card=1

Change the values for borrower_number, template_id and layout_id to something that exists in your system.

Without patch, the URL leads to a software error:
Can't use an undefined value as a HASH reference at /usr/share/kohaclone/patroncards/create-pdf.pl line 118.

With patch, a PDF with the patron card is created.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: This does NOT deal with the case where borrowernumber,
template_id, or layout_id are invalid. This only deals with
the case where they do exist.

Invalid borrowernumber still gives same error.
Invalid template_id or layout_id gives error on line 111.
Those are beyond the scope of this bug.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a6247f449a476f9768ad4d28c69587ca1922747a)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14127: Typo in message preference form - "mesage"
Marc Véron [Mon, 4 May 2015 09:45:45 +0000 (11:45 +0200)]
Bug 14127: Typo in message preference form - "mesage"

This path fixes the typo.

To reproduce and test:
Go to a patron's detail page
The message appears as hint in column-header 'Digests only (i)'

Sponsored-by: Universidad de El Salvador
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit fba5ce27545fcb5810f32ca42527065958af7f8b)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14033: Capitalization: confirmation message on deleting an authority type
Marc Véron [Wed, 22 Apr 2015 06:56:34 +0000 (08:56 +0200)]
Bug 14033: Capitalization: confirmation message on deleting an authority type

This bug fixes capitalization of "No, Do Not Delete" in following templates:

koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/stopwords.tt

To test: Verify that the strings are properly replaced.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed some tabs.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 88ce53364203fa8a7c3b4b9f1f8fa68fc2904328)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 11574 - Clean up Printing Lists
Mark Tompsett [Sat, 4 Apr 2015 20:43:40 +0000 (16:43 -0400)]
Bug 11574 - Clean up Printing Lists

Removes extraneous stuff from prints - toolbars, breadcrumbs, etc.

To test:

1. make a list
2. print it to a file (from OPAC), observe wasted paper
3. apply patch
4. print list, compare
5. if you like it, sign off. ;)

Patch cleans up OPAC list printing as expected.

Signed-off-by: Marc Véron <veron@veron.ch>
NOTE: Made functional again. Turns out my issues were a result of
      cached CSS pages. Tested in IE and Firefox successfully.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9d50a1189d05618f6ef12d6f8696cab57861aba9)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14006: about.pl checks the wrong zebra index mode
Tomas Cohen Arazi [Mon, 20 Apr 2015 18:39:45 +0000 (15:39 -0300)]
Bug 14006: about.pl checks the wrong zebra index mode

When setting zebra_bib_index_mode to grs1 I get two warnings when not applying the patch:

"The <zebra_bib_index_mode> entry is set to grs1. GRS-1 support is now deprecated and will be removed in future releases. Please use DOM instead by setting <zebra_bib_index_mode> to dom (full reindex required)."

"You have set <use_zebra_facets> but the <zebra_bib_index_mode> is not set to dom. Falling back to legacy facet calculation."

When applying the patch a third warning appears in addition to the two previous ones:

"The <zebra_bib_index_mode> entry is set to dom, but your system still appears to be set up for grs1 indexing."

Seems like the patch does what it should to me regarding the configuration mismatch warning.

Signed-off-by: Eivin Giske Skaaren <eskaaren@yahoo.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 13722ebe737acf6c74195b15b3f51d1ba21a4b79)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10388: Does not display 'null' after editing an item on receiving
Jonathan Druart [Tue, 7 Apr 2015 15:03:46 +0000 (17:03 +0200)]
Bug 10388: Does not display 'null' after editing an item on receiving

After editing an item on receiving, 'null' is displayed if no value is
defined for a field. It should be blank.

Test plan:
0/ Set AcqCreateItem to 'ordering'
1/ Go on the receipt page page
2/ Edit an item
3/ Does not fill all values
4/ Confirm that undefined values are replaced with an empty string

NOTE: I think you meant receive. Editing requires at least clicking
      the dropdown value, even if you don't change it before
      clicking save. null's appeared. Post patch application was
      able to get nulls to disappear. :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 65405c5a96207623b3b30997b7c93f02fbcfe2f7)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 6059: Don't permit to change the quantity when items are created on ordering
Jonathan Druart [Wed, 8 Apr 2015 08:04:40 +0000 (10:04 +0200)]
Bug 6059: Don't permit to change the quantity when items are created on ordering

If items are created on ordering, the quantity for uncertain prices
should not be editable.

Test plan:
0/ Set AcqCreateItem to "on ordering"
1/ Create a basket and add an order with 1+ items
2/ Mark it as uncertain prices
3/ Go on the uncertain prices page for this vendor
(acqui/uncertainprice.pl?booksellerid=X)
4/ Confirm you are not allowed to update the quantity
5/ Change the price and save
6/ Confirm the quantity is still correct

Set the pref to another value and confirm the behavior has not changed.

NOTE: Tested with 'on placing order' and 'on receiving order'.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit bbb374e76494ae2bad87fbc703e396cebcf8b9f5)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13984: DBRev 3.19.00.034
Tomas Cohen Arazi [Wed, 29 Apr 2015 18:23:43 +0000 (15:23 -0300)]
Bug 13984: DBRev 3.19.00.034

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a94d5297abeec32c9e3a7080605f2267b2c328dc)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Conflicts:
installer/data/mysql/updatedatabase.pl
kohaversion.pl

Rejigged to apply for 3.18.x

9 years agoBug 13984: CardnumberLength missing in sysprefs.sql
Fridolin Somers [Mon, 13 Apr 2015 11:09:16 +0000 (13:09 +0200)]
Bug 13984: CardnumberLength missing in sysprefs.sql

Test plan :
- create a fresh database with installer
- check the presence of the syspref : select value from systempreferences where variable like 'CardnumberLength'

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 40183ce7af4430c8f0c54b07d33459daa02b17e5)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13109: Serial failure for received and general viewing.
Mason James [Mon, 30 Mar 2015 06:33:45 +0000 (19:33 +1300)]
Bug 13109: Serial failure for received and general viewing.

to test...

1/ attempt to view a subscription-detail that has a NULL value for either it's 'startdate' or 'enddate'

  an example url would be...
  http://koha-admin.foo.org/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=1

  observe error...
  'Date::Calc::PP::Delta_Days(): Usage: Date::Calc::Delta_Days($year1,$month1,$day1,$year2,$month2,$day2) at /your/koha/C4/Serials.pm line 2325'

2/ apply patch
3/ repeat step 1/
   observe that detail page displays OK

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I confirm the issue if startdate is null (can exist with old data,
before the js check on the form).
Amended patch: Remove trailing space char and the link to the bz number
(can be found using git log).

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 381959a935b39b08fc53e81b0fb4f9b383c11adb)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10752: (QA followup) rephrase erorr messages a little
Katrin Fischer [Mon, 20 Apr 2015 20:15:02 +0000 (22:15 +0200)]
Bug 10752: (QA followup) rephrase erorr messages a little

Rephrased error messages a little and changed the link to
look like it does on other pages, for example when looking
at an order created from a suggestion.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
http://bugs.koha-community.org/show_bug.cgi?id=10752
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 709913992e8fdc5465f577962b61e787e74d5b62)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10752: Alert if the suggestion has not been added - OPAC
Jonathan Druart [Mon, 20 Apr 2015 08:08:07 +0000 (10:08 +0200)]
Bug 10752: Alert if the suggestion has not been added - OPAC

Same as previous patches for the OPAC.

Test plan is the same.

Tested with all patches applied. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2504ade8eb08113671d24d2b9f42a1ff074ec5da)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10752: Remove the specific css for links in an error dialog
Jonathan Druart [Mon, 20 Apr 2015 07:44:23 +0000 (09:44 +0200)]
Bug 10752: Remove the specific css for links in an error dialog

Comes from commit c28f7d7de5d1e1a8d5e0038b76fce74397c3c489
Date:   Tue Mar 20 15:20:25 2012 +0100
    Bug 6209 [Revised] Standardize on one plugin for client-side form
    validation

It did not find how it could be useful.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit ebcfc762c690215febb686f0016a2855db7a5fcd)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10752: Alert the librarian if the suggestion has not been added
Jonathan Druart [Thu, 16 Apr 2015 14:57:03 +0000 (16:57 +0200)]
Bug 10752: Alert the librarian if the suggestion has not been added

Test plan:
- Create a new suggestion, chose a short term as your title and copy it.
- Leave all other fields of the suggestion form untouched.
- Save your first suggestion.
- Enter a second suggestion with the same title.

Before this patch, the suggestion was not inserted without alert.
With this patch, an alert is displayed on the interface.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: Love the simplicity and ability to expand. :)

Tested with all pateches applied. Wors as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 81ab20e6bbf988b4f9613f63cd799a28e8296208)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13919: Renewal possible with item level hold on item
Kyle M Hall [Mon, 30 Mar 2015 14:16:31 +0000 (10:16 -0400)]
Bug 13919: Renewal possible with item level hold on item

Test Plan:
1) Apply this patch
2) Enable AllowRenewalIfOtherItemsAvailable
3) Check out an item from a record with multiple holdable items
4) Place an item level hold on the checked out item
5) Verify the item can not be renewed from the opac

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 55439f8994d89c22b62233a5b180d864705a6174)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Conflicts:
C4/Circulation.pm

9 years agoBug 13919: Make the tests pass fixing the number of tests
Jonathan Druart [Mon, 13 Apr 2015 10:34:14 +0000 (12:34 +0200)]
Bug 13919: Make the tests pass fixing the number of tests

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 7e8295841f942d9baff175891c269a93d1392d55)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13919: Unit Test
Kyle M Hall [Mon, 30 Mar 2015 14:16:11 +0000 (10:16 -0400)]
Bug 13919: Unit Test

Tested both unit test patches together.
Without main patch applied: do not pass as expected / with main patch pass OK as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b921cca2423a915c6c1bde163e4c5123ca8eb6fc)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 9878: Add consistentcy on restriction messages
Jonathan Druart [Thu, 9 Apr 2015 14:22:44 +0000 (16:22 +0200)]
Bug 9878: Add consistentcy on restriction messages

Between both pages circ/circulation.pl and members/moremember.pl, the
restriction messages should be the same.

Test plan:
1/ Add a non-unlimited restrictions to a patron
2/ Go on both pages and confirm the restriction message is the same.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6ebdbf04819aaeca82d2a5d5dfbcf120e08ee153)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10423: Show date due with time if it's a hourly loan
Jonathan Druart [Wed, 15 Apr 2015 13:33:54 +0000 (15:33 +0200)]
Bug 10423: Show date due with time if it's a hourly loan

On printing the summary from the patron account, the hours are not
displayed if needed.
The as_date_due flag should be set to display it correctly.
Problem, GetPendingIssues modify the value retrieved from the database.
In order to not add regression and check all calls to GetPendingIssues,
this patch backup the value before the change.

Test plan:
Check some items out, specify a hourly loan for some.
Click on print > print summary and confirm the date due are correctly
formatted.

Followed test plan. Date + time display as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c0b51eafddb2721de247b2f0dd3b9a33048db13d)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10971: Hide EAN search for MARC21 / template corrections
Katrin Fischer [Sat, 21 Feb 2015 18:22:33 +0000 (19:22 +0100)]
Bug 10971: Hide EAN search for MARC21 / template corrections

This patch hides the EAN filter on the page for ordering from
a subscription when the marcflavour is not UNIMARC as it will
only work for this flavour currently.

It also corrects
- branch to library
- supplier to vendor
- the library code in the result list to the branch name

To test:
- Make sure you have a subscription, not the vendor
- Create a new basket for the subscription vendor
- Choose 'from a subscription' to create your order line
- Look at the filters on the left side, switch
  the marcflavour system preference to see change for
  the EAN filter
- Verify changes

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 83a923e11a97f5328ce6b0715c4e86069c7861e0)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 8474: Holds done by librarians cause silent errors in koha-error_log, placereques...
Olli-Antti Kivilahti [Wed, 23 Jul 2014 08:15:57 +0000 (11:15 +0300)]
Bug 8474: Holds done by librarians cause silent errors in koha-error_log, placerequest.pl -> $checkitem

Squashed this rogue variable initialization

Test plan:
1/ Place a hold at a biblio level (on the next available item)
2/ Without this patch you get
placerequest.pl: Use of uninitialized value $checkitem in string ne at /home/koha/src/reserve/placerequest.pl line 75.
placerequest.pl: Use of uninitialized value $checkitem in string ne at /home/koha/src/reserve/placerequest.pl line 101.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed a tab.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 54f7ffb313c44b1036613cf48c08ae9a3b44e132)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 14051: Tiny adjustment of ReturnPathDefault pref description
Marcel de Rooy [Thu, 23 Apr 2015 08:30:14 +0000 (10:30 +0200)]
Bug 14051: Tiny adjustment of ReturnPathDefault pref description

Adding that Return-Path is bounce address. Note that if it is empty, the From address is used. This could be the admin address, but Koha uses other from addresses too.

Test plan:
Read the description on the preferences page.
Check some Koha mails with/without this pref. Note that this patch does not
change behavior in any way.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 85d7ccb210d62cd5c3642ee0023e12c95180cb60)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13834: News: Wording not consistent for Publication date / Creation date
Marc Véron [Wed, 22 Apr 2015 20:09:48 +0000 (22:09 +0200)]
Bug 13834: News: Wording not consistent for Publication date / Creation date

This patch replaces column header "Creation date" with "Publication date" in staff client > Home > Tools > News
(same as the field label in editing form for news).

To test apply patch and verify that column header displays as appropriate.

Signed-off-by: vagrant <eskaaren@yahoo.no>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e8eb8ddc1fc3820ab689ba7e7101036b32434d80)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 10174: Add a tooltip to explain what is a digest
Jonathan Druart [Wed, 15 Apr 2015 10:19:42 +0000 (12:19 +0200)]
Bug 10174: Add a tooltip to explain what is a digest

The digest term seems to be ambiguous for some people.

This patch adds a tooltip to explain what it is (feel free to provide
a better wording).

Test plan:
Go at the OPAC and click on the "Your messaging tab", you should see an
icon close to "Digest only" to explain what is a digest.
Same at the intranet on editing/showing patron info

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d2dd4ca624aba7e93baab02c8efdc8a29a15a74e)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13482: Sent biblionumber to the template
Jonathan Druart [Wed, 22 Apr 2015 07:55:55 +0000 (09:55 +0200)]
Bug 13482: Sent biblionumber to the template

The biblionumber is sent to the template as 'itembiblionumber' at 1 place, the template get the 'biblionumber' variable.
I don't understand why but the easy way is to sent the variable twice.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a510a4515c9a62ad6005f2eb997496d403dd4247)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13482: Prevent race condition on printing a ReserveSlip
Jonathan Druart [Thu, 16 Apr 2015 12:10:30 +0000 (14:10 +0200)]
Bug 13482: Prevent race condition on printing a ReserveSlip

The problem has been well described by Kyle and Nicole on bug 7255
description and comment 1.

With this counter patch, I suggest to popup AFTER the return has been
confirmed. This will remove the race condition and avoid to pass
itemnumber to the pl file as in the patch submitted by Olli.

Only the borrowernumber and biblionumber are needed (transfer and op are
never used by circ/hold-transfer-slip.pl).

Test plan:
It is very hard to know all cases (at least 6) where the popup is
displayed. Try at least to get the hold and the transfer confirmation
messages.
You should get the popup if you click on "print slip" button.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2796eb21586ea7f23c2ca5d969d242b78b1cfa09)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 14008: Proposed follow-up: Dialog should appear whenever filters are active
Marc Véron [Sun, 19 Apr 2015 05:37:37 +0000 (07:37 +0200)]
Bug 14008: Proposed follow-up: Dialog should appear whenever filters are active

The first patch displays the value(s) of an active filter if you come back to the page or reload the page via a menu action.
To make the situation more clear the dialog "No saved reports match your criteria." shoudl always appear when a filter is active.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d1cdbf9d56038f0305f9be90205c0315882ec711)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 14008: Display active filters when searching for reports
Jonathan Druart [Fri, 17 Apr 2015 13:24:36 +0000 (15:24 +0200)]
Bug 14008: Display active filters when searching for reports

On the saved report list, the filters on the left are not displayed.
It means that some can be set, but the user has not visible feedbacks.

How filters work here:
If a user set a filter, it is saved in the session. Next time he will
come on this search, the previous values will be kept.

This patch just displayed the filter's values in the input fields.

Test plan:
Search for reports by date, author and keyword.
The filters should be displayed after you have clicked on the submit
button ("Apply filter").

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b05cbc415d2461a3909db593b9b12d5cc506e35d)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 14022: Does not reset the subscription length on editing a subscription
Jonathan Druart [Mon, 20 Apr 2015 14:59:05 +0000 (16:59 +0200)]
Bug 14022: Does not reset the subscription length on editing a subscription

The subscription length is always set to the first/default value
('issues') when editing a subscription.
Even if you selected another value on creating/editing it, the form will
show you the first option.

Test plan:
1/ Add/Edit a subscription, select a subscription length different of
the first value (issues)
2/ Edit the subscription and confirm the value is kept

Bonus: issues, week and months become translatable.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9d7d645baf35ae8b0b37d5d6c8ad653f8aa55841)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 14016: (follow-up) Restore correct date format on issue date (00:00 vs 23:59)
Jonathan Druart [Tue, 21 Apr 2015 08:44:43 +0000 (10:44 +0200)]
Bug 14016: (follow-up) Restore correct date format on issue date (00:00 vs 23:59)

Same for the overdues.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 40543e9c45a9b986c0382cb25e6979a8cc224e56)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 14016: Restore correct date format on issue date (00:00 vs 23:59)
Jonathan Druart [Mon, 20 Apr 2015 08:41:19 +0000 (10:41 +0200)]
Bug 14016: Restore correct date format on issue date (00:00 vs 23:59)

Introduced by bug 13601, and same fix used in bug 10423 and bug 12847:
the date_due retrieved from the DB is modified.

There are some problems:
1/ There is confusion between the iso and sql formats in the codebase.
2/ Since bug 13601, dt_from_string does not manage the iso format (there
are occurrences of 'iso' but it assumes that both formats are
identical).

To solve the issue, 2 solutions:
1/ Same as bug 10423 and bug 12847: try to get rid of the change done on
date_due in C4::Members::GetPendingIssues, it should be kept as the sql
value.
2/ Too many errors found and another fallback should be added to
dt_from_string (if 'iso' is passed, try sql then iso).

Test plan:
Go on the checkout list at the OPAC and confirm that the due dates are
correctly formatted.

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9ad8b86643b4a5698851ce4a67122ca35c2a1b61)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13817 - Edit links on course items may point to the wrong course!
Kyle M Hall [Tue, 10 Mar 2015 17:38:50 +0000 (10:38 -0700)]
Bug 13817 - Edit links on course items may point to the wrong course!

If items are assigned to multiple courses, the "edit" links for a course
item may pass the wrong course id. This is really a cosmetic issue.

It appears that in Template Toolkit, if you reuse an existing variable
name in a foreach loop, it will not create a new temporary variable but
will instead re-use the existing variable leaving assigned at the end to
the last assignment, just as it would in Perl code.

This is not a problem when all items are assigned to one and only one
course, but can cause issues when we loop through the other courses an
item may be on.

This is solved easily by renaming the variable used in the foreach loop
to another unused name.

Test Plan:
1) Apply this patch
2) Try the edit and delete links for an item on reserve for a course
3) No changes in behavior should be noted

Signed-off-by: Tom Misilo <misilot@fit.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b8da5462b0f72f8035589317f51800394ba700ae)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 14046: Make the CheckIfIssuedToPatron using the biblionumber
Jonathan Druart [Wed, 22 Apr 2015 14:05:41 +0000 (16:05 +0200)]
Bug 14046: Make the CheckIfIssuedToPatron using the biblionumber

C4::Circ::CheckIfIssuedToPatron called
  $items = GetItemsByBiblioitemnumber($biblionumber);
But if biblionumber != biblioitemnumber, the items retrieved were not
the good ones!

Test plan:
Make your Auto increment values for biblio and biblioitems differs
Launch the tests:
    prove t/db_dependent/Circulation/CheckIfIssuedToPatron.t

Before this patch, they did not pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 40e4722a957102a52ece9cd4f21ab6fd902f3c18)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 10985: [UNIMARC] Fix authority summary
Jonathan Druart [Wed, 2 Oct 2013 12:16:09 +0000 (14:16 +0200)]
Bug 10985: [UNIMARC] Fix authority summary

The problem is the template in authority type summary is not respected
at all. It is only read to see which fields and subfields should appear
in the summary.
This patch fixes that.
It also fixes a bug in auth_finder.pl plugin when summary contains
fields other than 2XX.

Test plan:
0/ You must use a UNIMARC setup for those tests
1/ edit an authority type summary with:
     NP : [200a][, 200b][ 200d][-- 152b --][ ; 200c][ (200f)] [001*] [ppn: 009*]
2/ create a new authority with previous fields (it is possible some
   fields don't exist).
3/ search this authority and verify the summary is someting like:
     NP : Name, D.-- NP -- 23849 ppn: my_ppn
4/ Verify some summary for existing authorities and check they are
   correct.
5/ Edit a biblio record and use the plugin auth_finder.pl (for example
   in a 7XX field)
6/ Do a search and verify the summary is correct
7/ Click on 'choose' or one of the numbered links ('1', '2', ... ; you
should have multiple 2XX fields for the numbered links to show up)
8/ Verify that the biblio field is correctly filled.

/!\ For the ppn, it should be defined in the zebra indexes.

In MARC21 and NORMARC setups, this patch should change nothing, please
verify that too (you can check that the auth_finder.pl plugin is still
working and the auth type summary is correctly displayed in authorities
search and auth_finder.pl plugin).

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
It works as described, both in authority search result page, and in authority
data entry plugin.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 927aedafa155fb53011c09a510166b4233bac499)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoMerge branch '3.18.x-new' into 3.18.x
Chris Cormack [Fri, 1 May 2015 07:59:50 +0000 (19:59 +1200)]
Merge branch '3.18.x-new' into 3.18.x

9 years agoMerge remote-tracking branch 'bernardo/3.18.07-fix-translations' into 3.18.x v3.18.06-3
Chris Cormack [Thu, 30 Apr 2015 22:13:56 +0000 (10:13 +1200)]
Merge remote-tracking branch 'bernardo/3.18.07-fix-translations' into 3.18.x

9 years agoBug 10285: Remove links from the error pages
Jonathan Druart [Tue, 14 Apr 2015 13:43:44 +0000 (15:43 +0200)]
Bug 10285: Remove links from the error pages

The error page (400, 401, 402, 403, 404, 405 and 500) displays parts the old
staff client main page.

The user can easily browses using navigation links.

Test plan:
Go on the 400.pl, 401.pl, 402.pl, 403.pl, 404.pl, 405.pl and 500.pl
pages, and confirm all is fine and you don't get the old style blocks.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
http://bugs.koha-community.org/show_bug.cgi?id=10258
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c8ea5ca91597cf8b43ffbbaf6edb63c1053adead)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 9742: Does not display the popup on creating new record
Jonathan Druart [Mon, 23 Feb 2015 16:09:20 +0000 (17:09 +0100)]
Bug 9742: Does not display the popup on creating new record

The new confirmation on starting a z39.50 serach in cataloguing always
pops up, even when you are working on a new record that has not been
saved yet.

Test plan:
1/ Edit an existing record, click on the Z3950 search button, confirm
the popup appears.
2/ Create a new record, click on the Z3950 search button, confirm
the popup does not appear.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected, Gustavo (librarian) convinced me that "it doesn't
hurt that much" with the test for new record. Happy easter :-D

(cherry picked from commit f0711f0d0d8f0b824ef9895367a6c7e2389d6e7a)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13315: (QA followup) fix t/db_dependent/Circulation_issue.t
Tomas Cohen Arazi [Mon, 13 Apr 2015 18:15:29 +0000 (15:15 -0300)]
Bug 13315: (QA followup) fix t/db_dependent/Circulation_issue.t

C4::Circulation::AddIssue now returns a Koha::Schema::Result::Issue object
so tests need to be fixed.

The old behaviour was to always return the due date. It now returns
undef if no issue performed. So one of the tests become irrelevant.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 73c0c9ef0030002f7b9aa31de8b1c5fa3af80da6)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 13315 [Follow-up] Add feedback for last item checked out to circulation.pl
Owen Leonard [Tue, 9 Dec 2014 15:01:12 +0000 (10:01 -0500)]
Bug 13315 [Follow-up] Add feedback for last item checked out to circulation.pl

This patch changes the position and styling of the information about the
last checkout so that it is grouped with the checkout form itself,
placing the message in a more visible position, especially for patrons
with a lot of information in the right-hand messages column which might
push the checkouts table down offscreen.

To test, apply the patch and clear your browser cache in order to
refresh the main CSS file.

Check out an item and confirm that a message is prominently displayed.

Signed-off-by: Jason Burds <jburds@dubuque.lib.ia.us>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 16d438d18b057c5781371327ef04b18855d2f011)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Conflicts:
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css

9 years agoBug 13315 - Add feedback for last item checked out to circulation.pl
Kyle M Hall [Thu, 20 Nov 2014 17:39:21 +0000 (12:39 -0500)]
Bug 13315 - Add feedback for last item checked out to circulation.pl

It seems that many librarians find it disconcerting to have no feedback
with the new checkouts table. It seems that many of them wait for it to
fully load, check to verify the item was checked out, and only then
check out the next item.

To help alleviate this issue, we can have the checkouts page give
feedback about the item that was just checked out.

Test Plan:
1) Apply this patch
2) Check an item out
3) Note the message "$title ($barcode) due on $date_due"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This works well and fixes a very problematic issue with the new AJAX
circ. I will be submitting a follow-up which I think is an improvement
to the display.

Signed-off-by: Jason Burds <jburds@dubuque.lib.ia.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e96e1126b6a17325002f0d2638dffe4e433bbc5c)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Conflicts:
C4/SIP/ILS/Transaction/Checkout.pm

9 years agoBug 6911: Remember search terms in the log viewer tool
Jonathan Druart [Fri, 27 Mar 2015 09:03:32 +0000 (10:03 +0100)]
Bug 6911: Remember search terms in the log viewer tool

The modules and actions selected by the user are now selected when a
log search is done.
Note that this patch also add the multiple attribute to the actions
select in order to add the ability to select several actions.
The code to do that already existed.

Test plan:
1/ Go on the log viewer tool (tools/viewlog.pl)
2/ Launch a search with modules and actions selected.
3/ Confirm that the values you have selected is still selected after the
search.

Patch works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b8db092a0acf0c34cd78e35332f73636cdff6e22)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Conflicts:
tools/viewlog.pl

9 years agoBug 6007: Fix MARC framework display when only used tags/subfields
Jonathan Druart [Wed, 8 Apr 2015 08:48:26 +0000 (10:48 +0200)]
Bug 6007: Fix MARC framework display when only used tags/subfields

The "Display only used tags/subfields" output breaks DataTables and the
output is unusable.

Test plan:
1/ Go on admin/marctagstructure.pl after you have selected a framework
2/ Check the checkbox
3/ The table should be correctly displayed.
Before this patch, the table have 2 lines per tag, now all data are
contained into the same line.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit f5ef85a345af0c628b0576e855d64bb654abb6ce)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 14068: fix preinst for fresh package installs
Robin Sheat [Tue, 28 Apr 2015 03:19:30 +0000 (15:19 +1200)]
Bug 14068: fix preinst for fresh package installs

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected. Tested both upgrading and on a new install.

(cherry picked from commit c8c9ccb2d791c4162e259ac324f22defa987b9a3)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoBug 14055: remove symlink that breaks upgrades
Robin Sheat [Fri, 24 Apr 2015 02:48:53 +0000 (14:48 +1200)]
Bug 14055: remove symlink that breaks upgrades

Old versions of koha-common would put in a symlink to the system YUI
libraries. This causes upgrade problems, so we look out for that and zap
it if it's there.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b7e2bb67376f2bed8cf68800a7ad209d194dcf7c)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
9 years agoFix pure TT entities translations
Bernardo Gonzalez Kriegel [Wed, 29 Apr 2015 15:09:19 +0000 (12:09 -0300)]
Fix pure TT entities translations

9 years agoFixing a little syntax error that snuck through v3.18.06
Chris Cormack [Wed, 22 Apr 2015 23:20:42 +0000 (11:20 +1200)]
Fixing a little syntax error that snuck through

9 years agoBumping version number for release
Chris Cormack [Wed, 22 Apr 2015 21:26:29 +0000 (09:26 +1200)]
Bumping version number for release

9 years agoRelease notes for 3.18.6
Chris Cormack [Wed, 22 Apr 2015 21:24:50 +0000 (09:24 +1200)]
Release notes for 3.18.6

9 years agoTranslation updates for Koha 3.18.07 release
Bernardo Gonzalez Kriegel [Wed, 22 Apr 2015 20:39:36 +0000 (17:39 -0300)]
Translation updates for Koha 3.18.07 release

9 years agoBug 12847: Items issued today is considered as overdue
Jonathan Druart [Thu, 16 Apr 2015 11:01:03 +0000 (13:01 +0200)]
Bug 12847: Items issued today is considered as overdue

The date comparisons in C4::Members::IssueSlip does not work as
expected.
Is an item is issue yesterday and due today (23:59), it should not be
considered as an overdue yet.

Test plan:
Define a valid issue slip (code ISSUESLIP)
Check 2 items out and update the issuedate value for one of them as
yesterday (using the mariadb/mysql cli or similar)
Print the slip
Before this patch the item marked as issued yesterday is considered as
overdue.

Special cases:
- hourly loans
- Quick slip is impacted too

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Bug 13601 is not in 3.18.x, so I removed the change connected
to that and it still tested ok.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10131: Add a fallback if the pref search is not a valid regex
Jonathan Druart [Tue, 14 Apr 2015 11:45:14 +0000 (13:45 +0200)]
Bug 10131: Add a fallback if the pref search is not a valid regex

It's possible to search prefs using a regex.
But it the regex is not correctly written, the app explodes.
We should provide a fallback.

Test plan:
0/ Does not apply the patch
1/ Search for sysprefs with "notes.*", note the number of results
2/ Search for *notes*, boom
3/ Apply the patch
4/ Repeat 1 and confirm you get the same number of results
5/ Repeat 2 and confirm you don't get the error anymore

NOTE: As noted on comment #4, the kaboom is because of the
      leading * and not the following *, because 's*' is a valid
      regular expression, while '*n' is not.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 65cb0f5be636a15387a3996c32da051d4114719e)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13917: OPAC: Putting holds still possible by URL even if turned off by system...
Marc Véron [Thu, 26 Mar 2015 14:04:07 +0000 (15:04 +0100)]
Bug 13917: OPAC: Putting holds still possible by URL even if turned off by system preference

To test:

1)
Prepare an URL that put's a hold in OPAC (see comment #1), e.g.
[YOUR SERVER]/cgi-bin/koha/opac-reserve.pl?biblionumbers=1

2)
Set system preference 'RequestOnOpac' to 'Don't allow patrons to place holds on items from the OPAC.'

3)
Go diectly to this URL.
Result: The page displays to confirm hold (wrong)

4)
Apply patch

5)
Repeat step 3
Result: Redirect to 404 page (OK)

6)
Set system preference to "Allow"

7)
Repeat step 3
Result: The page displays to confirm hold (OK), like it would be from link in OPAC.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 20dc9ce5a1255fa7722e23b9300de19ec35eda16)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 14014 - Argument "" isn't numeric in numeric gt (>) in circulation.tt
Marc Véron [Sun, 19 Apr 2015 19:04:21 +0000 (21:04 +0200)]
Bug 14014 - Argument "" isn't numeric in numeric gt (>) in circulation.tt

To test:

Do some checkouts
In intranet-error.log you get lines similar to:
circulation.pl: Argument "" isn't numeric in numeric gt (>) at /usr/share/kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt line 217.

Apply patch
The warning  should no longer appear.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
To reproduce the confirmation message must be displayed.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 54469a1b4ca61123a58998f1097792b9a86563dc)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13981 - Transliterate rule for oe and ae
Fridolin Somers [Mon, 13 Apr 2015 10:17:12 +0000 (12:17 +0200)]
Bug 13981 - Transliterate rule for oe and ae

NOTE : I use HTML codes for special characters to avoir encoding issues in patch file.

In ICU configuration, add a transliterate rule for
&oelig; = oe
&aelig; = ae

Test plan :
- Without patch
- Create a record R1 with title containing for example "c&oelig;ur"
- Create a record R2 with title containing for example "coeur"
- Index those records
- Search for "c&oelig;ur"
=> You only find R1
- Search for "coeur"
=> You only find R2
- Apply patch
- Restart zebra
- Index R1 and R2
- Search for "c&oelig;ur"
=> You find R1 and R2
- Search for "coeur"
=> You find R1 and R2
(Same test plan for ae)

------
Tested with all variants of Ae ae Oe oe. Search worked as expected.
Note: The words with special characters were not highlighted, but I think this can be done in an other bug.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9dbedfd854a255fc5f2e9479db96131ce87f2ee4)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 9978: (followup) Replace license header with the correct license (GPLv3+)
Jonathan Druart [Fri, 17 Apr 2015 15:04:59 +0000 (17:04 +0200)]
Bug 9978: (followup) Replace license header with the correct license (GPLv3+)

There was another form of the v2.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit ba0f84b46c5c565600575ef61d413067c768fa14)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 9978: Replace license header with the correct license (GPLv3+)
Jonathan Druart [Wed, 8 Apr 2015 15:09:04 +0000 (17:09 +0200)]
Bug 9978: Replace license header with the correct license (GPLv3+)

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
http://bugs.koha-community.org/show_bug.cgi?id=9987

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a6c9bd0eb55c32d5632625144775271f20aa15f7)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13975: Remove compilation warning about encoding pragma deprecation
Jonathan Druart [Thu, 9 Apr 2015 14:05:59 +0000 (16:05 +0200)]
Bug 13975: Remove compilation warning about encoding pragma deprecation

Test plan:
0/ Does not apply the patch
1/ Launch the export_borrowers.pl script to export data with unicode characters
 % perl misc/export_borrowers.pl -w "borrowernumber=42" --field borrowernumber --field surname --field firstname
  Use of the encoding pragma is deprecated at misc/export_borrowers.pl
  7874,JOUBU,صةصةصة
2/ Apply this patch
3/ Repeat 1
 % perl misc/export_borrowers.pl -w "borrowernumber=42" --field borrowernumber --field surname --field firstname
  7874,JOUBU,صةصةصة

Note that the deprecated message is gone and the encoding is correct.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  I confirm the warning (on Perl version above 5.14). And that the patch fix
  the warning.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit dbd8602280192e4e4cd9915ad8c345a2d40dfb72)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13979: [3.18.x] updates to allow installation on jessie
Robin Sheat [Tue, 14 Apr 2015 03:28:46 +0000 (15:28 +1200)]
Bug 13979: [3.18.x] updates to allow installation on jessie

This patch makes the build script keep the shipped YUI JavaScript library
instead of explicitly deleting it and using the one the operating system
provides.

Development is done against the YUI library we ship, so this makes sense
even if Debian still shipped it.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13803 Flag to self check book has gone into transit
Colin Campbell [Tue, 28 Jun 2011 14:24:04 +0000 (15:24 +0100)]
Bug 13803 Flag to self check book has gone into transit

Ensure that the transit flag (in field CV) is set
if return message is 'wasTransfered'

CV is being set for other return conditions but not for
wasTransfered [sic] The presence of this flag is required to
route returns to the correct bin if the SC unit is so
enabled

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  I agree with the solution to an issue I've already encountered and
  patched localy that way. It would be nice to have a better doc of
  C4::Circulation::AddReturn in order to see immediately that
  WasTransfered is a valid feedback for a check-in.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 31e3fe22dc6749b814c627b9633222ab72ae6192)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13991: (QA followup) uninitialized value and [0] in /tools/viewlog.pl
Tomas Cohen Arazi [Thu, 16 Apr 2015 16:55:05 +0000 (13:55 -0300)]
Bug 13991: (QA followup) uninitialized value  and [0] in /tools/viewlog.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6c5c2d552b061f4b8fafdf7adc4f2e35c97948e4)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Conflicts:
tools/viewlog.pl

9 years agoBug 13991: Uninitialized value $src in /tools/viewlog.pl
Marc Véron [Tue, 14 Apr 2015 05:25:45 +0000 (07:25 +0200)]
Bug 13991: Uninitialized value $src in /tools/viewlog.pl

To reproduce:

Go to Home > Tools > Logs
Check intranet-error.log.
You will find a line similar to:
viewlog.pl: Use of uninitialized value $src in string eq at (...)/tools/viewlog.pl line 70., referer: http://(...)/cgi-bin/koha/tools/tools-home.pl

To test:
Apply patch.
Verify that no more warnings appear in intranet-error.log
Verify that the log viewer behaves as before.

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 7ec3d6dfe98e19f0baa525a5b2b3839b0a35379c)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13947: Correct call to GetBiblio to receive correct return value
Mark Tompsett [Thu, 2 Apr 2015 15:15:14 +0000 (11:15 -0400)]
Bug 13947: Correct call to GetBiblio to receive correct return value

When you attempt to edit the manual history for a subscription,
the title is blank. This is a result of an incorrect use of the
GetBiblio function.

TEST PLAN
---------
1) Log in to staff client
2) Serials
3) Search for an existing serial with manual history checked.
   -- creating one as needed is left as an exercise to the reader.
4) Click on the title of the serial for the details page.
5) Go to the Planning tab and click 'Edit History'
   -- Heading will be 'Subscription history for' without a
      title.
6) Apply patch
7) Refresh page.
   -- Heading will include the title correctly.
8) run koha qa test tools

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 35938a0cb3433fa0278cddbe07a0c8a8352c3585)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 6520: Add unit test for C4::ImportBatch::GetRecordFromImportBiblio
Jonathan Druart [Tue, 7 Apr 2015 10:29:53 +0000 (12:29 +0200)]
Bug 6520: Add unit test for C4::ImportBatch::GetRecordFromImportBiblio

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 56d366f3b1b7346338f9bd3aa676382734e5782b)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 6520: Display items for staged record - diff view
Jonathan Druart [Tue, 7 Apr 2015 09:48:37 +0000 (11:48 +0200)]
Bug 6520: Display items for staged record - diff view

This patchs adds the item information in the diff view.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1d46802d1be22d39df1599eb1392e2e3df5f38f9)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 6520: Display items for staged record
Jonathan Druart [Fri, 27 Mar 2015 12:36:05 +0000 (13:36 +0100)]
Bug 6520: Display items for staged record

When records are imported into Koha, the items is stored into the
import_items table.
This marcxml in this table is never retrieved to display items.

Test plan:
1/ Import a records with items
2/ Before importing the batch into the catalog, you can see the marc
of the records, in the table below.
3/ Verify that the items is correctly displayed.

QA note: This patch does not provide test for new subroutines but the
module (C4::ImportBatch) is not tested at all and it will be time
consuming to provide them.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 4d8dd344aecad265393ac0549e59bf9a439d2c32)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13069 - (follow-up) Enable sort by title to ignore articles
Jonathan Druart [Sat, 11 Oct 2014 14:53:41 +0000 (16:53 +0200)]
Bug 13069 - (follow-up) Enable sort by title to ignore articles

This should affect the relatives' checkouts table too.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
NOTE: This is the one later in the javascript file.
      Checkout tab on the patron details page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 18c6b4e237032126d767ad98a66b6d80db2d8270)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13069 - Enable sort by title to ignore articles on circulation and patron detail...
Martin Renvoize [Thu, 9 Oct 2014 15:22:29 +0000 (15:22 +0000)]
Bug 13069 - Enable sort by title to ignore articles on circulation and patron detail pages

With the conversion of the circulation and patron detail checkout
summary tables to AJAX recently we lost the ability to sort by title
while ignoring articles.

This patch corrects the problem by adding the "anti-the" configuration
to the relevant column in the DataTables initializtion script.

To test, apply the patch and clear your cache if necessary. Check out to
a patron who has multiple checkouts, some of which have titles beginning
with "a," "an," and "the." Sorting those checkouts by title should
ignore articles.

Test the patron detail page for that patron as well.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
NOTE: This is the one early in the javascript file.
      This is the one visible by having multiple checkouts
      where the title excluding the articles is a different
      order than titles including the articles.
      Patrons -> Details (scroll down to check out area, view
      checkouts and toggle the title sort)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9b44647509e4d08029760bae25703b049a4bda30)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13909: (QA followup) fix references to get_chargeable_units
Tomas Cohen Arazi [Sun, 12 Apr 2015 13:54:50 +0000 (10:54 -0300)]
Bug 13909: (QA followup) fix references to get_chargeable_units

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 653686cee9cd3032642933427d86ec9331612607)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13909: Suspension days calculation should respect finesCalendar
Tomas Cohen Arazi [Fri, 27 Mar 2015 17:32:35 +0000 (14:32 -0300)]
Bug 13909: Suspension days calculation should respect finesCalendar

This patch make _debar_user_on_return respect the finesCalendar syspref.

It does so, by replacing the ad-hoc overdue days calculation in favor of
C4::Overdues::_get_chargeable_units (which is renamed C4::Overdues::get_chargeable_units
and exported). There's no behaviour change besides making the calculation simpler
and correct.

To test:
- Set finesCalendar = "directly"
- Have a circulation rule stating:
  interval for calculating fines = 1
  suspension days = 3
- Have the calendar set for sunday and saturday as holidays.
- Checkout an item with a branch/itype/borrower category that matches the defined circ rule with a hand-writen due date to (say) last friday.
- Check the item in
=> FAIL: Notice that the user is debarred using the calendar (skipping saturday and sunday).
- Apply the patch
- Repeat the previous steps
=> SUCCESS: calculation is correct (counting saturday and sunday as overdue days, i.e. 'directly').
- Set finesCalendar = "calendar"
- Repeat the test
=> SUCCESS: calculation is correct (skipping holidays).
- Sign off.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 4094a235def0fb268720f3d3b4ae6d9ea1e9ddfc)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13934: C4::ItemType->get should return undef if no parameter given
Jonathan Druart [Wed, 1 Apr 2015 08:12:05 +0000 (10:12 +0200)]
Bug 13934: C4::ItemType->get should return undef if no parameter given

The issue: If you try to check in an item with a non existent barcode,
the application will exploded with a software error:
"Can't bless non-reference at .../ItemType.pm Line 64".
It's caused by:
commit 7431f8cfe29e330e2232b0df591afc4d923b0a52
    Bug 11944: Fix encoding issue in C4::ItemType

and the following change:
@@ -105,9 +104,6 @@ sub get {
     my $data = $dbh->selectrow_hashref(
         "SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype
     );
-    if ( $data->{description} ) {
-        $data->{description} = Encode::encode('UTF-8', $data->{description});
-    }

because of the following:
  my $s;
  $s->{foo} = "bar" if $s->{foo};
  use Data::Dumper;warn Dumper $s;
=> {} # not undef

So later,
  bless $opts => $class;
will fail because $opts is undef and was not (i.e. {}) before.

More explicit test plan:
1) Log in to staff client
2) Circulation -> Check in
3) Type a non-existent barcode into 'Enter item barcode:' textbox
4) Click 'Submit'
   -- Should receive nasty error.
5) apply patch
6) repeat steps 2-4
   -- Should be told 'No item with barcode: {what you typed}'
7) prove -v t/ItemType.t
   -- All tests should run successfully.
7) run koha qa test tools

Note: Having tried to create and use an itemtype '0', this only
      demonstrates a lack of validation on the itemtype creation
      screen. Unable to use it without tweaking back end.
      That is beyond the scope of this bug.

Note for QA: C4::ItemType->get is only uses in circ/return.pl. So even
if the behavior is changed, it should not introduce any regression
somewhere else.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected. Fixes the problem and no regressions found.
It even has regression tests :-D

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 68e4f96511b070eb9f9ccfd5e31c6f51a70943fd)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks...
Jacek Ablewicz [Mon, 23 Mar 2015 14:21:53 +0000 (15:21 +0100)]
Bug 10906 - Reimported records into Koha are imported only as DEFAULT frameworks, not what they were originally

Existing framework code is currently not retained when local record
gets replaced during batch import, or when the restore/reverse function
is being used.

This patch fixes aforementioned issues by correcting outdated GetBiblio()
calls in C4/ImportBatch.pm

To test:

1/ try to replicate the issue: import some MARC records with
"Tools -> Stage MARC records for import" etc., using test setup,
matching rules and so on such that some existing records will get
replaced with imported ones
2/ observe that records replaced during import now open in the editor
with 'Default' framework, even if they have some other framework
set up previously
3/ apply patch
4/ redo 1/, confirming that this problem is no longer replicable
5/ try use 'restore' function with some freshly imported
records, ensure that original framework code got retained
in the records which had their imports reverted

NOTE: I confirmed this change by
1) git grep "=\s*GetBiblio\s*("
   -- this shows how GetBiblio is called elsewhere.
      It differed! So then...
2) vi C4/Biblio.pm
   /sub GetBiblio
   -- find the right one, notice it only returns a HASH ref,
      not an array.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 7c2fad1bafc38d7ed70e9508293136d89d77879c)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13939: ILS-DI function GetServices doesn't work when the item/biblio is available...
Josef Moravec [Thu, 2 Apr 2015 04:16:44 +0000 (06:16 +0200)]
Bug 13939: ILS-DI function GetServices doesn't work when the item/biblio is available for hold for specific patron

Test plan:
1) Enable ILS DI (system preference 'ILS-DI')
2) Try to access the URL
http://<your_opac_url>/cgi-bin/koha/ilsdi.pl?service=GetServices&patron_id=<borrowernumber>&item_id=<itemnumber>
Choose the patron and item to be available for hold
You'll see an error instead of valid XML response
3) apply the patch
4) try to access the same URL, you should see valid XML response with services "title level hold" and eventually "item level hold" returned

Signed-off-by: Thomas Misilo <misilot@fit.edu>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit bde795f8fa488a2284d1d23667fb489bea6343f9)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 6950: Hide the resort option when searching for a tag
Jonathan Druart [Fri, 27 Mar 2015 09:47:40 +0000 (10:47 +0100)]
Bug 6950: Hide the resort option when searching for a tag

If you click a link from the Tag Cloud, the results page offers the
usual select menu to resort your results. However, doing so resubmits
the search as a standard keyword search.

Test plan:
1/ Click on a tag
2/ Confirm that the resort dropdown list does not appear.

Dropdown list disappears with tags as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit fc100688a4017ce85bb257de04b3e6bf4e929dec)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 2542: Replace default value "0" with ""
Jonathan Druart [Tue, 7 Apr 2015 09:24:58 +0000 (11:24 +0200)]
Bug 2542: Replace default value "0" with ""

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9bb2dc2ed7bcabf487a7e81218b8b47b4958ad02)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 2542: Validate the amount of a manual invoice/create
Jonathan Druart [Wed, 18 Mar 2015 15:49:52 +0000 (16:49 +0100)]
Bug 2542: Validate the amount of a manual invoice/create

If a manual invoice/credit amount is not correctly set, it should not be
accepted.

Test plan:
Try to create a manual invoice and a manual credit with an amount containing
something else than numbers.
It should not be possible.

Followed test plan. Patch behaves OK, including that negative values are not allowed.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 0e279fb2e01dd27fd9d932bc20fc9de563c5be82)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13896: (QA followup) fix koha-{stop|restart}-zebra too
Tomas Cohen Arazi [Wed, 8 Apr 2015 17:56:44 +0000 (14:56 -0300)]
Bug 13896: (QA followup) fix koha-{stop|restart}-zebra too

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 05d57a1880bd164f727a772e113bacb779b9f91d)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13896: Fix pid file creation, use proper directory instead of /tmp/
Attila Kinali [Mon, 23 Mar 2015 21:58:22 +0000 (22:58 +0100)]
Bug 13896: Fix pid file creation, use proper directory instead of /tmp/

daemon uses by default /tmp/ for pid files, if they are unspecified.
Pass the right directory to daemon, so it knows where to put the pid file.

Signed-off-by: Attila Kinali <attila@kinali.ch>
TEST PLAN
---------
1) Roll a distribution and confirm it works.

OR

1) Hack all the /var directories to point to git directories
2) Add a dummy user for the instance name
3) sudo the script with the faked instance name.
   -- the daemon should be running and the pid file should be in
      the expected directory.

The first way is the proper way to test, I did the latter. :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c4a45759232b87712c67dd01631a3f7cb696b967)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 7561: Redirect to the add items form if it's a fast cataloging
Jonathan Druart [Mon, 30 Mar 2015 15:04:27 +0000 (17:04 +0200)]
Bug 7561: Redirect to the add items form if it's a fast cataloging

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c16e19b3fdff71e20db1df036931d96dfabcce4d)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 7561: Fast cataloging - Allow add/edit items and delete record
Jonathan Druart [Mon, 30 Mar 2015 11:17:26 +0000 (13:17 +0200)]
Bug 7561: Fast cataloging - Allow add/edit items and delete record

With the fast cataloging permission, a librarian was not able to
add/edit items and to delete a record with the FA framework.

This patch fixes that.

Test plan:
0/ Set the permission fast_cataloging (and only this one under
editcatalogue) to a librarian
1/ Log in with this account
2/ Go to Circulation > Fast cataloging
3/ Confirm you can create a record
4/ Save and confirm you can create items
5/ Confirm you are able to edit items, remove all of them and delete the
record.
6/ Make sure it only works for records with the FA framework code.

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b3183f16e55f251003583a741b06bdfa635b1f07)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 8246: Allow deleting record if no more items
Jonathan Druart [Tue, 31 Mar 2015 14:32:33 +0000 (16:32 +0200)]
Bug 8246: Allow deleting record if no more items

The "Delete records if no items remain" was only available if the batch
did not contain "too many" items (see MaxItemsForBatch).
This limitation does not make any sense.

Test plan:
1/ Set MaxItemsForBatch=10
2/ Use the batch item deletion to delete 10+ items
3/ Confirm the checkbox "Delete records if no items remain" is displayed
4/ Check it
5/ Launch the job
6/ Run koha qa test tools

Verify that the records without items have been deleted also.

NOTE: My test db only had two biblios with items, so I set
      MaxItemsForBatch=1.
      Before patch, checkbox did not display.
      After patch, checkbox did display.
      This patch merely moves one line out of the IF/ELSE/END
      block, and reindents for more readability. Though, there
      is a missing <p> if you want to get picky.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2a8f84817fb4a487577c7e4238b8aede9d9b99d2)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 10887: Batch item deletion -- doesn't need Use default values section
Abby [Mon, 16 Feb 2015 14:45:16 +0000 (15:45 +0100)]
Bug 10887: Batch item deletion -- doesn't need Use default values section

To test:
1. Go to Home > Tools > Batch item deletion
2. Notice that there is an unnecessary option for "use default values
section" to "Populate fields with default values from default work"
3. Apply the patch.
4. Check that this section has disappeared.

Signed-off-by: Nick <Nick@quechelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 80ffd8354bff15ef006da746ce516f6e9b497dc5)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 7480: Don't display current logged in user as basket manager
Jonathan Druart [Fri, 27 Mar 2015 16:30:01 +0000 (17:30 +0100)]
Bug 7480: Don't display current logged in user as basket manager

The "Managed by" field displayed on creating/editing an order is always
the name of the logged in user.

To reproduce:
1/ Log in with patron A
2/ Create a basket
3/ Create an order
4/ Log in with patron B
5/ Edit the order
6/ The "Managed by" line is "patron B"

Test plan:
Apply the patch and confirm that the "patron A" is always the basket
manager.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 56a147da32492954a2a417a5e4f3766ae734f45a)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13850: Fix typo in C4::Ris
Jonathan Druart [Tue, 17 Mar 2015 10:56:56 +0000 (11:56 +0100)]
Bug 13850: Fix typo in C4::Ris

In C4/Ris.pm:
  @field_list = ('600', '601', '602', '604', '605', '606','607', '608',
  '610', '615', '620', '660'. '661', '670', '675', '676', '680', '686');

Note the
  '660'. '661'
instead of
  '660', '661'

Test plan:
Add a 660 and 661 field to a record and export it in RIS
The 660 and 661 field should be displayed (after "KW").

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a6facaa534d4378de37b8fd6a868e9e3a1ef908f)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13252 Allow for IPv6 formatted addresses in Port definition
Colin Campbell [Thu, 27 Nov 2014 16:07:23 +0000 (16:07 +0000)]
Bug 13252 Allow for IPv6 formatted addresses in Port definition

The SIP config has allowed you to specify an interface ip as
part of the listeners/service/port attributei
 e. g.  as port="127.0.0.1:6001/tcp"
with IPv6 the equivalent would normally be
   as port="[::1]:5001/tcp"
However in this case incoming connections will get rejected because
Configuration constructs a string without the brackets
This patch makes tests both formats on incoming connections so that
they are accepted as they were previously

In future the best course is not to include a port identifier in the
port definition then if the server has ipv6 it will bind to all
interfaces and accept both IPv4 and IPv6 traffic

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13252 - SIP2 server should accept IPv6 connections
Benjamin Rokseth [Thu, 13 Nov 2014 19:34:25 +0000 (20:34 +0100)]
Bug 13252 - SIP2 server should accept IPv6 connections

This small patch adds a check on the SIP2 socket connection if it is
IPv6 and resolves socket address accordingly.

Any newer Debian distro would probably default to IPv6 so it would
eventually affect all SIP servers.

Tests against running SIP server on an IPv6 box:

http://wiki.koha-community.org/wiki/Koha_SIP2_server_setup#Testing_with_Telnet

before patch:
  disconnects immediately. Log output:
  Bad arg length for Socket::unpack_sockaddr_in, length is 28, should be 16

after patch:
  operates normally

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13908 - Checkouts table sorting is not honoring default sort preferences
Kyle M Hall [Wed, 25 Mar 2015 15:33:48 +0000 (11:33 -0400)]
Bug 13908 - Checkouts table sorting is not honoring default sort preferences

The checkouts table no longer honors the system preferences
todaysIssuesDefaultSortOrder and previousIssuesDefaultSortOrder.

This causes much frustration for librarians who prefer a different sort
order. In particular, many librarians prefer to see the oldest previous
issues at the top of the list so those overdue items are visible "above
the fold".

Test Plan:
1) Apply this patch
2) Find a patron with many previous checkouts due on different days
3) Try all 4 combinations of todaysIssuesDefaultSortOrder and previousIssuesDefaultSortOrder
4) Note they all sort correctly

Signed-off-by: Sean McGarvey <seanm@pascolibraries.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c76fbbe191782cee691ef405f638048b6d39a2fb)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13938 - Staging MARC records for import fails
Kyle M Hall [Wed, 1 Apr 2015 15:13:05 +0000 (11:13 -0400)]
Bug 13938 - Staging MARC records for import fails

It appears that bug 8970 has introduced a bug where a MARC file uploaded
for staging fails to import *unless* a matching rule is selected.

Test Plan:
1) Apply this patch
2) Stage and import a MARC record *without* choosing a matching rule
3) Note the staging works as expected

Signed-off-by: Cindy Ames <cmurdock@ccfls.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6fbf0e679f1b7d47112631fcdc5924423c653ae6)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 8050: Die if package building fails
Jonathan Druart [Wed, 1 Apr 2015 09:35:55 +0000 (11:35 +0200)]
Bug 8050: Die if package building fails

The debian/build-git-snapshot script should not return success if an
error occurred.

Note that sys_command_output won't raise an error if something fails.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Made a minor change to print the command, add a newline.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 2e1c031ea0a779a6a4f9b58bf1b15db4b9056fd4)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 4277: Display the correct budget planning after saving
Jonathan Druart [Tue, 24 Mar 2015 15:22:46 +0000 (16:22 +0100)]
Bug 4277: Display the correct budget planning after saving

The budget_period_id is not pass to the script, so after saving the
budget planning, the planning for the first active budget is displayed.

Test plan:
1/ Edit a budget planning
2/ Save
3/ You should see the budget planning you were editing

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit bb4db981586ab0a734285e8b6f229b38670bb152)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 9481 - charge not showing fines On 'Check out' and 'Details'.
Rafal Kopaczka [Mon, 9 Mar 2015 13:30:30 +0000 (14:30 +0100)]
Bug 9481 - charge not showing fines On 'Check out' and 'Details'.

When looking at the patron record or the checkout screen the checkout
summary is now showing 0 for all the Charges even if the item was
overdue and has accrued fines.
Removed unused(?) footer values in checkouts-table-footer.inc

To test:
1/ Check out items with past due date
2/ Run fines.pl script (ensure finesMode is set to Calculate and Charge)
3/ Verify on Fines->Pay Fines screen that fines where calculated
correct.
4/ Go to Patron record, charge column on Details and Check out
screen
should be 0 or rental charge amount only. But total amount row
display right
number, same as in pay fines screen.
4/ Apply patch.
5/ Now charges on display and check out screen shows all outstanding
fees for each item.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 901be3db53276b3e599fc7412de9aaff006c67cb)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13859: Item search improvements - publication date and title formatting
Katrin Fischer [Wed, 18 Mar 2015 00:11:24 +0000 (01:11 +0100)]
Bug 13859: Item search improvements - publication date and title formatting

In the item search accessible from the advanced search the publication
date would not display for MARC21 and the title always contained 'by'
even if there was no author information to display. Also the by is
not needed by MARC21 as the data includes punctuation.

To test:
- Check publication date always displays (MARC21 and UNIMARC)
- Check that for MARC21 the by has been removed from the title information
- Check that for UNIMARC the by only displays when there is also
  an author to display

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Tested for MARC21

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 0b78824cce4f770c7db4f2e73d2cae9d51eb08c5)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13686: Change wording
Jonathan Druart [Thu, 19 Feb 2015 14:35:58 +0000 (15:35 +0100)]
Bug 13686: Change wording

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d7c56de7e06ee9ce39d1754ce5ce566041dde396)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13686 Add a hint about collation to the alphabet syspref
Viktor Sarge [Mon, 16 Feb 2015 20:56:11 +0000 (20:56 +0000)]
Bug 13686 Add a hint about collation to the alphabet syspref

New attempt from a fresh branch.

Test plan:
* Look at the alphabet syspref.
* Install the patch.
* Look again at the alphabet syspref and you should see a short hint about collation.

Thanks for the patience - I already learned a few new things about Git with this patch.

Text appears as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: add a br tag

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 69058f790d5fba410915ef4feb14d837b91b25f3)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13868: Correct formatting of date on routing list slip
Katrin Fischer [Wed, 18 Mar 2015 22:22:54 +0000 (23:22 +0100)]
Bug 13868: Correct formatting of date on routing list slip

The date planned printed on the issue slip is not formatted
according to the dateformat system preference setting.

To test:
- enable RoutingSerials
- create a subscription
- create a routing list from the serial collection page
- use the 'print list' links next to the issues to print a routing list
- verify that the date there is not displayed according to the dateformat
  system preference without the patch, but is correct with the patch applied

Followed test plan, date appears according to the date format syspref.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit e93c3a4b0ace2d2c12dfd690bee95355d8822415)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13841 - Returns via backdating or SIP2 can create new fines with an amount outsta...
Kyle M Hall [Mon, 16 Mar 2015 14:16:40 +0000 (10:16 -0400)]
Bug 13841 - Returns via backdating or SIP2 can create new fines with an amount outstanding of 0

Due to the way AddReturn and UpdateFine work, if you pass in a return
date to AddReturn, and that item has a calculated fine of 0, Koha will
insert the 0 amount fine into accountlines.

This is good behavior when we want to update an existing fine, but bad
behavior if there was no fine to begin with!

Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/Circulation.t
3) Note the test fails
4) Apply this patch
5) prove t/db_dependent/Circulation.t
6) Note the test passes

Signed-off-by: Jen DeMuth <jdemuth@roseville.ca.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Confirmed the problem in the staff interface and that the patch
fixes it. Also tested that fines still get calculated.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit faab00b88a155bdd7d5de35ef9226e134ce4b35b)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
9 years agoBug 13841 - Unit Test
Kyle M Hall [Mon, 16 Mar 2015 14:15:54 +0000 (10:15 -0400)]
Bug 13841 - Unit Test

Signed-off-by: Jen DeMuth <jdemuth@roseville.ca.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 589fd84107ed76ed50397f63d4ca809468f57ffe)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>