Bug 10715 - MARC21 007 Plugin Editor doesn't load position 01

This patch changes the MARC21 007 plugin editor so that it uses
1 character instead of 4 characters for position 01.

TEST PLAN:

1) Create new record/edit an existing record
2) Using the tag editor for the 007 field, choose "Videorecording"
3) Click OK
4) Change the second character in the 007 from "c" to "d"
5) Open the tag editor again
6) Note that position 01 will still say "c - Videocartridge" rather
than "d - Videodisc".
7) Exit tag editor

8) Apply patch

9) Reload the page (Shift + Refresh is always useful)
10) Open the tag editor again
11) Note that position 01 will now say "d - Videodisc"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10615 - Move saved reports action items into dropdown menu

This patch moves saved reports "action" links (view, edit, run, etc)
into a dropdown menu triggered by clicking an "Actions" button.

To test you must have saved reports. View the saved reports page and
click the "Actions" button in the last column of the table. This should
trigger a menu. All options in the menu should work correctly.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
works and looks awesome

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Yes, exactly what I had in mind. Great improvement.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10664: fix error in overdue_notices.pl if there is no active currency

If there is no active currency, when running overdue_notices.pl
you get a sofware error "Can't use an undefined value as a HASH
reference" on GetCurrency() function call.

With this patch, if there is no active currency, fines are formated
by default 0.00 and notices are correctly generated.

Test plan :
- have at least one borrower with overdue that should trigger a notice
- verify that there is no active currency (Adminitration > Currency &
  Exchange rates)
- run misc/cronjobs/overdue_notices.pl -v -n (to get the notice directly
  on output)

=> without the patch you get the software error
=> with the patch, notices are correctly generated

If an active currency is defined, the script overdue_notices.pl runs
the same with or without patch

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 10664 [QA Followup] - fix error in overdue_notices.pl if there is no active currency

Fixes the following koha-qa.pl error:
 FAIL   misc/cronjobs/overdue_notices.pl
    OK     pod
    OK     forbidden patterns
    OK     valid
    FAIL   critic
               # Variables::ProhibitConditionalDeclarations:

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10703: Add db documentation for biblioimages table

This patch adds db documentation to the biblioimages table.

To test:

Apply patch
Review kohastructure.sql to be sure that the documentation is there

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10703: Document quotes table

Add db documentation for the quotes table

To test:

apply patch
review kohastructure.sql to be sure documentation is there

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10703: Document borrower_files table

Add db documentation to borrower_files table.

To test:

apply
review kohastructure.sql to be sure documentation is there

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: No errors. Tested loading on new database.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10716: fix JavaScript error on basket groups page

To test:

Go on acqui/basketgroup.tt and verify a js error occurred
(ReferenceError: CONFIG_EXCLUDE_ARTICLES_FROM_SORT is not defined).
Apply the patch and verify the error does not appear anymore.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10481: FIX No enrollment fee when changing patron category.

When a patron changes to a category with enrollment fee, they
are not generated.

Test plan:
- Choose a category without fee (e.g. Kid)
- Add an enrollment fee for another category (e.g. Young adult)
- Choose a kid and change his category to "Young adult".
- Note the warning message "Fees & Charges: Patron has Outstanding fees
  & charges of XX" on the check out page.

This patch also moves all instances of adding the enrollment fee
to a new routine in C4::Members, AddEnrolmentFeeIfNeeded(), so
additional tests include:

- Register a new patron and give it a category that has
  an enrollment fee.  Verify that the fee is charged.
- Renew the patron.  Verify that the additional fee is charged.
- Register a new patron with a child patron category.
- Use the 'update child to adult' menu option to change the
  patron's category to one that is fee-bearing.  Verify that the
  enrollment fee was charged.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10481: Unit tests for C4::Members::AddEnrolmentFeeIfNeeded

prove t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t
t/db_dependent/Members/AddEnrolmentFeeIfNeeded.t .. ok
All tests successful.
Files=1, Tests=3,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.38 cusr
0.01 csys =  0.41 CPU)
Result: PASS

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 10481: (follow-up) fix typo in POD

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 5825 - Add Item Type column to Holds Queue report

The hold queue report shows collection code but not item type. This
patch adds it. Also added is use of the KohaAuthorisedValues template
plugin to display the collection code description instead of code.

To test, apply the patch and view the holds queue. There should be a new
item type column showing an item type description for each row. The
collection column should now show the collection description instead of
code.

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
bug 5825: (follow-up) add regression test

To test:

Verify that prove -v t/db_dependent/HoldsQueue.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
bug 5825: (follow-up) consult item-level_itypes

This patch teaches GetHoldsQueueItems to consult
the item-level_itypes system preference and return
the item-level or bib-level item type accordingly.

To test:

- Arrange so that an item that shows up on the holds queue
  report has one item type while its bib has a different one.
- Run the report with item-level_itypes ON.  Verify that
  the item-level item type is displayed.
- Change item-level_itypes to OFF.  Run the report again and
  verify that the bib-level item type is displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10653: add unit tests for C4::RotatingCollections.pm

The tests are wrap in a database transaction.

Test plan:
prove t/db_dependent/RotatingCollections.t
t/db_dependent/RotatingCollections.t .. ok
All tests successful.
Files=1, Tests=41, 20 wallclock secs ( 0.02 usr  0.01 sys +  0.41 cusr  0.02 csys =  0.46 CPU)
Result: PASS

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10653: (follow-up) minor tweaks to RotatingCollections tests

- remove unnecessary module import
- use parentheses for all C4 function calls

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9238 - make fund pull down say 'select fund', not 'select budget'

When adding a new order to a basket the fund selection field is labeled
"Fund:" but the default option is "Select a budget." This patch changes
this string to "Select a fund" and also corrects the associated
JavaScript error message text displayed when one doesn't choose a fund.

To test, add an order to basket. The "New order" form should show
"Select a fund" as the default option for "Fund" in the "Accounting
details" section. If you submit the form without selecting a fund the
error message should read "You must select a fund."

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
tests pass

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
String updates only, passes koha-qa.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8887: only display desired result when doing exact syspref search

This patch fixes an issue where entering the complete name of a system
preference when doing a syspref search in the staff interface resulted
in the display of *all* preferences belonging to the desired one's
module.

Since providing a more specific search string should result in getting
back more specific results, the previous behavior was not intuitive.

Test scenario:

a) In sysprefs, do a search with partial match (e.g. intranetcolor)
-> Result shows one entry: intranetcolorstylesheet
b) Do an exact search. e.g. intranetcolorstylesheet
-> Result shows all Staff Client preferences

Apply patch, test again. Now b) behaves like a).

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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 10642: fix inappropriate uses of $sth->finish() in C4::RotatingCollections.pm

From the man page

finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.

Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.

To test:

Verify that prove -v t/db_dependent/RotatingCollections.t passes

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, passes UT provided by bug 10653

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10686: Remove fields from searches for highlighting

If you do a fielded search like au:smith, "Smith" will not get
highlighted on the results page because the Javascript is looking for
the exact string "au:smith."

To test:
1) Turn on OpacHighlightedWords.
2) Do a simple keyword search.
3) Confirm that the word is highlighted on the results and details page.
4) Do a fielded search by entering au:smith (or whatever).
5) Confirm that the word is highlighted on the results and details page.
6) Sign off.

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

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