bug 10356: improve display of serial issue dates in staff bib details page

This patch adds the date published to the subscriptions tab in the staff
interface bib display and renames the former "Date" column to
"Date arrived".

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
bug 10548: fix count of missing required dependencies by koha_perl_deps.pl

To test:

[1] ./koha_perl_deps.pl -m -u

If you have nothing missing, uninstall an optional component.

[2] ./koha_perl_deps.pl -m -u

You should get a number missing of at least 1.

[3] ./koha_perl_deps.pl -m -u -r

You should get the same number, even though the output is less.

[4] Apply patch

[5] ./koha_perl_deps.pl -m -u

Same results as in step 2.

[6] ./koha_perl_deps.pl -m -u -r

The number should differ from the results in step 3.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6898: fix DB update that assigns the circulate/overdues_report permission

This patch fixes a bug that prevented the circulate/overdues_report
permission from being assigned to staff users during upgrade.  This
patch will not affect databases that are already running 3.12.x
or later.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This will only fix the permissions for updates done
after the patch has been applied. But I agree with
Fridolyn, that we can not safely update permissions for
existing installations.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10535: by default sort funds by name

In parcels.pl, and other acquisition pages, the funds are not sorted
by name in combo-box.  With a great number of funds, it is difficult
to find one.

This patch adds a default value to $orderby arg of C4::Budgets::GetBudgets.

Test plan :
- Create a new fund with a name beginning with 'z' and set you as owner.
- Create a new fund with a name beginning with 'a' and set you as owner.
- Go to a vendor and click "Receive shipments"
- Look at fund combobox
=> Funds are sorted by name

Signed-off-by: Silvia Simonetti <s.simonetti@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
When testing make sure your funds would sort the other way
around when sorting by code instead of description.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10560: make it possible for default interface language to not be English

If you enable another translation, and disable English, then if you dont
have a cookie set, or your browser is not set to that language, you will
get English. So you can not disable English in either the staff client
or the OPAC.

This patch fixes the language selection to do the right thing.

To test you must have at least one other language installed besides
English. Apply the patch and disable the en translation. Koha should
fall back to one of the enabled translations.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

I added a patch description and test plan, missing from the
original patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I have tested with various combinations of activated languages
and have found no regression. If the cookie is set, the right
language is shown accordingly. Else the first language in the
list seems to be picked. It did never fall back to English
in my tests, when English was explicitly deactivated.

Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10560: add regression test

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10422 - Remove references to unused and non-existent wizard.css

doc-head-close.inc contains a reference to "wizard.css" which doesn't
exist. The option to include it never evaluates as true, and that
section can be removed from the template.

To test, apply the patch and view any page in the staff client.
Everything should be styled as before. A search of the Koha source
should return no references to "wizard.css" or a "wizard" variable.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
No occurrence of "wizard" in pl/pm files.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10490: Overdue fines cap can't store decimal values

When overduefinescap was added to the issuingrules the datatype
given was decimal. This translates in MySQL to decimal(10,0).
This doesn't allow you to store decimal values and therefore
values like 4.5 are saved as 5 in the database.

To test:

On a current installation:
1) Try to enter 4.5 as Overdue fines cap. Verify that the value
   is not correctly saved.
2) Apply patch and run database update.
3) Try adding/changing an issuing rule setting Overdue fines cap
   to 4.5 again.
4) Verify the value is saved correctly.

Create a new Koha installation from scratch:
1) Verify that the issuingrules table has been created correctly
   and that you can add/mofidy issuingrules correctly.

Because this bug can create data loss, the old database update
has also been changed to avoid this problem for people updating
at a later point in time. Checkout an older version of Koha
pre 3.09.00.027.

1) Run the database updates.
2) Verify again, that adding/modifying issuingrules works correctly.

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>
Bug 10490: DBrev 3.13.00.012

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10527: remove disused routine C4::Branch::get_branch_code_from_name

This routine is not in used and does not make sense. It should not be
used later.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, not references to get_branch_code_from_name found.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10529: Remove hardcoded dollar from patron message

The message fields which are returned in the SIP
Screen message field in a Patron Information response
had the dollar symbol hardcoded.

It would be possible to get the symbol from currency
but omitting any symbol would be consistent with the UI
and avoid problems with devices using weird encodings
for local currency symbols (e.g. the many variations
of UK Pound sign)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10475 - Item form in acquisition not hiding subfields properly

Subfields hidden in your ACQ framework leave a gap where they used to
be in the item entry form when adding an item to an order. This patch
makes the same change made by 7116 to services/itemrecorddisplay.tt to
correct the problem.

To test:

- Edit your ACQ framework and set some item subfields to hidden in the
  editor.
- Set your  AcqCreateItem system preference to "when placing an order."
- Add a title to an existing basket from an existing record.

The item entry form should display correctly with your hidden subfields
hidden. No whitespace should be left behind where the subfields were
hidden.

Also changed: Invalid "size" attributes on hidden form fields in
neworderempty.tt, stray </li>.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, passes all tests and QA script.
Thx Owen!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10507: improve warning about duplicate patron attribute value

If a warning about a duplicated patron attribute is returned,
the value was being passed back for display in the warning
message with the same name as the variable in errors

As the message is displayed in the context of errors
the error value 1 was being displayed not the value
duplicated as intended.

Pass the value to the template with a unique name.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

I fixed another tiny typo while signing off: "is already in use" instead
of "is already is use."

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10514: improve visibility of Add item link on new order form

This patch converts the "Add" and "Clear" links
to the standard "submit/cancel" format inside a fieldset. This gives
them a little more visual weight.

Based on the changes made by Liz Rea and Jonathan Druart.

To test:

- create a basket
- add a record to it
- scroll down - the link to add item and cancel should both be more
  prominent now.
- Click "Add item" - it should add an item.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
I still feel weird about the button, but as two people have said they'd rather have the button, I'm alright with it I guess.
Really what I want is people to notice it's there and click it at the appropriate time. I hope this will help that issue.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Leaves the translation problems, but that needs more work and is
out of the scope of this bug.
Tested Add and Update functionality works correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10590 - in opac-topissues limit param is not protected

In opac-topissues page, the limit URL argument is directly added to SQL query.

This patch adds protections : limit must only contain digits and must be lower than 100.

Test plan :
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=10&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=9999&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 100 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=WHERE&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10590 - parameterise the limit option

The limit option was previously substituted directly into the query. The
previous patch on bug 10590 filters it on input, but there's no reason
not to have it made to work properly in the query for added safety.

To test:

[1] Go to the top checkouts report (http://OPAC/cgi-bin/koha/opac-topissues.pl)
[2] Run the report several times, varying the filters on
    number of results and item type.
[3] Verify the the list of top checkouts appears to be correct.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10504: Remove the unused C4::Acq::ModOrderItem routine

This routine has been introduced by commit 2d90fb22d43db986547bbaa945873d6dd78aab71.
The only call has been removed by commit 9eba7dc594fc0d4698da5e791d5f6f8682b2712a.

So now, this routine is useless.

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>
Bug 10447: add 'ru' and 'uk' to Zebra indexing language list

This patch add the option to choose 'ru' and 'uk' during install for Zebra.
Should work for a tarball install, and make 'ru' and 'uk' available for using
with koha-create too.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Reran Makefile.pl and made sure the language options show up now.
Patch extends existing language code lists addings nb, ru and uk
where missing.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9770: test case for sorting of Dewey call numbers that contain prefixes

This adds a test for C4::ClassSortRoutine::Dewey to check that the
call number "JR DVD 800.1" sorts before "JR DVD 900"

To test:

[1] Apply just this patch.
[1] Run prove -v t/ClassSortRoutine_Dewey.t
[2] Test #7 should fail.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plan and QA script.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9770: fix sorting of Dewey call numbers that contain prefixes

C4::ClassSortRoutine::Dewey can pad the wrong part of a call number internally.

The subroutine get_class_sort_key tokenizes a call number string (splitting on
periods and whitespace) and counts the number of tokens that solely contain
digits.  If there is only one such digit group, a comment in the code states
that it will pad said digit group.  However, the bug is that the code assumes
said digit group is the first token, when this may not be the case.

In practice, this can cause poor sorting when used a call number is in the form
of PREFIX _space_ 3DIGITS.

To test:

[1] Create two item records whose class scheme is set to
    'ddc' (Dewey) and whose call numbers contain prefixes, e.g.,
    J DVD 700.1 ABC and J DVD 850 DEF.
[2] Use the inventory tool to produce a list of item items that include
    the two created in step 1.  Obsere that that items are sorted
    in the incorrect order, with "J DVD 850 DEF" coming before
    "J DVD 700.1 ABC".  Alternatively, run the following SQL
    to see the incorrect sort order:

    SELECT cn_sort, itemcallnumber
    FROM items
    WHERE itemcallnumber LIKE 'J DVD%'
    ORDER BY cn_sort;

[4] Apply this patch.
[5] Run misc/maintenance/touch_all_items.pl to force cn_sort to be
    recalculated.
[6] Repeat step 2 and verify that the call numbers are now sorted
    corrected.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>