koha.git
8 years agoBug 10855: Additional marc fields are not inserted
Jonathan Druart [Mon, 20 Jan 2014 09:27:48 +0000 (10:27 +0100)]
Bug 10855: Additional marc fields are not inserted

In subscription-add.pl, the code for inserting additional_fields is not
the same for updating and inserting.
This patch refactores this code in code to do the same tests.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10855: search with exact match if linked to an AV
Jonathan Druart [Mon, 23 Dec 2013 09:43:52 +0000 (10:43 +0100)]
Bug 10855: search with exact match if linked to an AV

If a field is linked to an AV, the search should be an exact match.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10855: Fix QA issues
Jonathan Druart [Tue, 17 Dec 2013 12:53:21 +0000 (13:53 +0100)]
Bug 10855: Fix QA issues

This patch fixes the following QA issues:

FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt
  FAIL   forbidden patterns
       forbidden pattern: KohaAuthorisedValues plugin is deprecated (see bug 10626) (line 2)

FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt
  FAIL   forbidden patterns
       forbidden pattern: KohaAuthorisedValues plugin is deprecated (see bug 10626) (line 2)

FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/serials/add_fields.tt
  FAIL   forbidden patterns
       forbidden pattern: To include datatables files, please use the include file (see bug 10868) (line 12)

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10855: Squash several fixes
Jonathan Druart [Wed, 4 Dec 2013 15:26:59 +0000 (16:26 +0100)]
Bug 10855: Squash several fixes

Bug 10855: FIX: Add additional fields for closed subscriptions

Bug 10855: Fix instance vs static method

This patch fixes the error message.
The 3 modified routines *are* static methods.

Bug 10855: FIX conflicts with bug 7688

Bug 10855: Fix typo addition_fields -> additional_fields

Bug 10855: A partial search should return the subscriptions

If a search on an additional fields is done using a partial string
("foo" and the defined value is "foobar"), the subscription should
appear in the result list.

Test plan:
Try to search a part of the string for an additional field.

Bug 10855: Filtering on additional fields don't work if value is equal to 0

If you tried to filter on an additional field linked to an authorised
value, that did not work if the value was 0.

Bug 10855: Remove the advanced serial search box on the serial home page

Bug 10855: FIX an add field should not be created if the marc field does not exist.

This patch fixes the following:
Create an add fields linked to a nonexistent marc field (does not exist
in serials).
Edit a subscription and save.
Without this patch, an error occured:
Software error:
DBD::mysql::db do failed: Column 'value' cannot be null at
/var/root-koha/bug-10855/Koha/AdditionalField.pm line 107.

Bug 10855: Fix Type table vs tablename

Koha::AdditionalField->all method take "tablename" not "table" in
parameter".

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10855: Search subscriptions by additional fields on the claim page
Jonathan Druart [Thu, 29 Aug 2013 12:04:32 +0000 (14:04 +0200)]
Bug 10855: Search subscriptions by additional fields on the claim page

Test plan:
- create some serials in late.
- go on serials/claims.pl.
- choose a vendor.
- verify that additional fields are displayed in new columns.
- try filters on columns.
- verify there is no regression on this page.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10855: Search subscriptions by additional fields
Jonathan Druart [Thu, 29 Aug 2013 11:58:34 +0000 (13:58 +0200)]
Bug 10855: Search subscriptions by additional fields

Now you will abble to search subscriptions by additional fields.
The additional field values will be displayed in the table results.

Test plan:
- go on the subscriptions advanced search page
  (serials/serials-search.pl).
- verify all searchable additional fields are displayed on the form.
- combine 1 or more values and verify results are consistent.
- verify the values are displayed in new columns of the table.
- for field linked to an authorised value category, the description is
  displayed (not the code).

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10855: New fields on adding/updating a subscription
Jonathan Druart [Thu, 29 Aug 2013 11:37:40 +0000 (13:37 +0200)]
Bug 10855: New fields on adding/updating a subscription

This patch adds the ability to add values for additional fields when
adding/updating a subscription.

Test plan (test the following on adding a new subscription and on
editing an existent one):
- add/edit a subscription.
- verify all additional fields appears into the "Additional fields"
  block.
- fill a value for af1 and af3.
- fill others values if you are adding a new subscription.
- save.
- verify values appears on the detail of the subscription page.
- verify the af2 field is automatically filled with the specified
  marc field of the notice.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10855: interface configuration for adding new fields to subscriptions
Jonathan Druart [Thu, 29 Aug 2013 11:32:30 +0000 (13:32 +0200)]
Bug 10855: interface configuration for adding new fields to subscriptions

This patch adds an interface configuration for adding fields to
subscriptions.

Test plan:
- go to serials/serials-home.pl
- click on the "Add subscription fields" link on the left of the screen
- try to add/update/delete new fields
You are not abble to add a field with an authorised value category and a
marcfield. Columns are sortable
- for the rest, you should have, at least:
  * a new field named af1, sortable, linked to a category
  * a new field named af2, sortable, linked to a marcfield
  * a new field named af3, not sortable

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10855: Add unit tests for the new package Koha::AdditionalField
Jonathan Druart [Thu, 29 Aug 2013 10:43:27 +0000 (12:43 +0200)]
Bug 10855: Add unit tests for the new package Koha::AdditionalField

Test plan:
- prove t/db_dependent/AdditionalField.t

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10855: Add the new package Koha::AdditionalField
Jonathan Druart [Thu, 29 Aug 2013 10:42:41 +0000 (12:42 +0200)]
Bug 10855: Add the new package Koha::AdditionalField

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14829: Fix shortcuts in the cataloging and patron modules
Jonathan Druart [Wed, 16 Sep 2015 08:01:26 +0000 (09:01 +0100)]
Bug 14829: Fix shortcuts in the cataloging and patron modules

In these 2 modules, the shortcuts alt+q, alt+r and alt+u don't work as
in other modules.
The tab are not "built" in the correct order and the id returned to
select the correct tab is wrong.

Test plan:
Go on the circ home page (circ/circulation-home.pl), the patron home
page (members/members-home.pl) and the cataloging home page
(cataloguing/addbooks.pl).
On these 3 pages, without this patch, the shortcuts select different
tabs.
With this patch, the issue is fixed for all of them.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14671: Allow correct translation of CAS authentication
Fridolin Somers [Tue, 11 Aug 2015 08:19:05 +0000 (10:19 +0200)]
Bug 14671: Allow correct translation of CAS authentication

In authentication pages with CAS, the use of acronym or abbr tags does not allow a correct translation of the text.
See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5983#c7

It does not help a lot end users to know that CAS is Central Authentication Service, I think. Now one can custom the login page with NoLoginInstructions syspref to describe how to use the authentication.

This patch removes the use of acronym and abbr is authentication pages.

Test plan (example with fr-FR locale) :
- Without patch
- Update translation files : cd misc/translator ; perl translate update fr-FR
- You see in fr-FR-opac-bootstrap.po : msgid "If you have a "
- Is is translated in : msgstr "Si vous avez un compte "
- Apply patch
- Update translation files : cd misc/translator ; perl translate update fr-FR
- You see in fr-FR-opac-bootstrap.po : msgid "If you have a CAS account, %s please "
- You can now translate it : msgstr "Si vous avez un compte CAS, %s veuillez "
- Same test for intranet authentication page
- Install the translation : cd misc/translator ; perl translate install fr-FR
- Look at the result

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tranlated OK, tested in spanish es-ES

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try"
Lari Taskula [Fri, 25 Sep 2015 14:06:40 +0000 (14:06 +0000)]
Bug 14880: Keyboard shortcuts don't work after setting CircAutocompl to "Don't try"

The issue is that CircAutocompl loads a script element under #header_search
element. When this element is missing, it also messes up the indexing,
because we were calculating the indexing of the found element by subtracting
one from the found element's index (to eliminate the <script> element).

Thats why the shortcut key problem in this bug takes you one too to the left,
because we are still subtracting one from the index even though there is no
<script> element anymore.

This patches selects only the div elements and gets the index from them.
No subtractions needed.

To test keys:
1. Set CircAutocompl system preference to Don't try.
2. Try the shortcut keys. They will work incorrectly like this:
   Alt+U = Search catalogue
   Alt+R = Check out
   Alt+Q = Check in
3. Set CircAutocompl system preference to Try.
4. Try the shortcut keys. They will work correctly like this:
   Alt+U = Check out
   Alt+R = Check in
   ALt+Q = Search catalogue
5. Apply patch
6. Repeat step 1 and 4.
7. Repeat step 3 and 4.
8. Observe that regardless of CircAutocompl, shortcut keys worked correctly.

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@theke.io>
8 years agoBug 10181: Acq - Improve message for deleted records
Jonathan Druart [Wed, 15 Apr 2015 09:30:17 +0000 (11:30 +0200)]
Bug 10181: Acq - Improve message for deleted records

There are some issues here:
1/ Message not translatable (set in the pl file)
2/ ' by 'displayed even if no author defined
3/ Message not the same every where
4/ Nothing displayed on the invoice page

Test plan:
1/ Create a basket
2/ Add 4 orders A, B, C, D
3/ On the basket, you see "$title by $author", or "$title" if no author
defined
4/ Delete order A, B
5/ Close the basket
6/ Receive B, C
7/ Delete record created for A, C
8/ Go on the basket page, you should see the title and "Deleted
bibliographic record, can't find title" for the deleted record
9/ Go on the invoice page, you should see the title and "Deleted
bibliographic record, can't find title" for the deleted record

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10181: Make string translatable
Jonathan Druart [Wed, 15 Apr 2015 08:54:48 +0000 (10:54 +0200)]
Bug 10181: Make string translatable

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14812: Display the help in the correct language
Jonathan Druart [Mon, 14 Sep 2015 08:50:39 +0000 (09:50 +0100)]
Bug 14812: Display the help in the correct language

If opaclanguages != language, the language of the help page is the
default one (en).

Test plan:
1/ Set language to en, fr-FR, ar-Arab and opaclanguages to en, fr-FR
2/ Translate the fr-FR and ar-Arab templates.
3/ Go on the mainpage, switch to ar-Arab, go to the help page.
The help page content should be in Arabian, not English.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Set language = en, sv-SE, nb-NO. opaclanguage = en, nb-NO
Went to the intranet main page, selected Swedish and clicked on help
Without the patch, help was displayed in English
With the patch, help was displayed in Swedish. Yay!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14820: DBRev 3.21.00.031
Tomas Cohen Arazi [Fri, 2 Oct 2015 17:30:14 +0000 (14:30 -0300)]
Bug 14820: DBRev 3.21.00.031

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14141: Fix copy action
Jonathan Druart [Tue, 22 Sep 2015 10:55:55 +0000 (11:55 +0100)]
Bug 14141: Fix copy action

Test plan:
Try to copy a letter to a library which already have this letter (same
letter_code) defined.

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@unc.edu.ar>
8 years agoBug 14141: Do not let edit the branch when updating/copying notice
Jonathan Druart [Tue, 14 Jul 2015 11:00:33 +0000 (12:00 +0100)]
Bug 14141: Do not let edit the branch when updating/copying notice

If a user modify the library when he's updating a notice, the notice
will be duplicated, instead of modified.

To reproduce:
1/ Go on the notice & slips tools (tools/letter.pl)
2/ Create a notice A for library L1
3/ Edit this notice and update the library with L2
4/ On the list view, you will observe that 2 notices A now exist, one
for L1 and one for L2.

The code in tools/letters.pl should be rebuilt completely, it becomes a
house of cards. To prevent this bug, I suggest to not let the user
modify the library value on editing a notice.
It cans be done by copying the notice to another library and remove the
original one.
Counter patch welcomed.

Test plan:
1/ Go on the notice & slips tools (tools/letter.pl).
2/ Create a notice A for library L1.
3/ Edit this notice: you are not able to modify the library anymore.
4/ Copy the notice to library L2. You are not able to modify the library
neither.

Works ok.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
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@unc.edu.ar>
8 years agoBug 14811: Don't update permanent_location with CART or PROC
Jonathan Druart [Mon, 14 Sep 2015 15:01:48 +0000 (16:01 +0100)]
Bug 14811: Don't update permanent_location with CART or PROC

The permanent_location should not be set to CART or PROC when the item
is edited.
Otherwise we lost an important info.

Test plan:
0/ Set the ReturnToShelvingCart pref
1/ Create an item with location "on_my_shelf"
2/ Check the item in and out
3/ Look at the DB values, location should be "CART" and
permanent_location unchanged (on_my_shelf)
4/ Edit the item, add a note for instance
5/ Without this patch, the permanent_location is erased with 'CART' and
you have definitely lost the info.
With this patch, the permanent_location is unchanged.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14820: Add missing prefs SMSSendUsername and SMSSendPassword
Jonathan Druart [Tue, 15 Sep 2015 09:36:44 +0000 (10:36 +0100)]
Bug 14820: Add missing prefs SMSSendUsername and SMSSendPassword

These 2 system preferences are missing from the sysprefs.sql file.

Test plan:
Execute the updatedatabase script and confirm that the 2 prefs are now
in the systempreferences table.
Search for "sms" in the system preferences search box, you should see
the 3 prefs.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14910: Redirect to the circulation module after a renew
Jonathan Druart [Mon, 28 Sep 2015 09:58:16 +0000 (10:58 +0100)]
Bug 14910: Redirect to the circulation module after a renew

iIf a patron is renewed from the circulation module, the librarian
should be redirected to the circulation module.
This works correctly if the renew is done from the patron module
(members).

This is caused by a typo in the template: desintation vs destination.

This patch also removes the cardnumber parameter to the setstatus.pl
script, it is not needed given that borrowernumber is always passed.

This has a good side-effect, it will fix bug 14691. The cardnumber does
not exist anymore, so no need to escape it :)

Test plan:
0/ Do not apply this patch
1/ Create a patron with a cardnumber with a quote (rm'me) and another
one without a quote (rmme)
2/ Go on the checkouts page (circ/circulation.pl)
3/ Renew the 2 patrons
=> With rm'me you are redirected to the circ module - ok
=> With rmme you are redirected to the member module - nok
4/ Go on the patron detail page (members/moremember.pl)
5/ Renew the 2 patrons
=> you are redirected to the member module - ok
6/ Delete the patrons
=> Nothing happend with rm'me, there is a JS error on the page - nok
=> rmme is deleted - ok

7/ Apply the patch and recreate rmme
8/ Repeat 2, 3, 4, 5
=> You are redirected to the correct module
9/ Delete the patrons
=> They are successfully deleted

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan, works as advertised. (I did have some problems
initially, but that was caused by me not using the interface in
English...)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14522: (QA followup) Remove POD and fix tests
Kyle M Hall [Fri, 2 Oct 2015 15:01:19 +0000 (11:01 -0400)]
Bug 14522: (QA followup) Remove POD and fix tests

* Change POD to a brief comment
* Fix UT so it doesn't fail on Sundays

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14522: (QA followup) tidy tests
Tomas Cohen Arazi [Fri, 2 Oct 2015 14:39:33 +0000 (11:39 -0300)]
Bug 14522: (QA followup) tidy tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14522: (QA followup) Remove $single_holidays global
Kyle M Hall [Mon, 28 Sep 2015 14:21:39 +0000 (10:21 -0400)]
Bug 14522: (QA followup) Remove $single_holidays global

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14522: (QA followup) Koha complains about missing C4::Dates on master
Kyle M Hall [Fri, 25 Sep 2015 17:03:02 +0000 (13:03 -0400)]
Bug 14522: (QA followup) Koha complains about missing C4::Dates on master

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14522: (followup) fix =cut typo
Mason James [Fri, 25 Sep 2015 01:34:21 +0000 (13:34 +1200)]
Bug 14522: (followup) fix =cut typo

http://bugs.koha-community.org/show_bug.cgi?id=14522

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14522: Use Koha::Cache for accessing single_holidays()
Mason James [Tue, 14 Jul 2015 10:53:10 +0000 (22:53 +1200)]
Bug 14522: Use Koha::Cache for accessing single_holidays()

this patch adds Koha::Cache functionality to the 'single_holidays' table
it is a performance patch for the problem described in BZ14315, only

 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14315

it replaces slooow DateTime holiday objects with simple Ymd strings (19991230), then stores the strings in an @array using Koha::Cache
it does not attempt to add caching to all holiday tables - just the single_holidays table (at this stage

 on my test (master-cd9a827); nytprof showed a time reduction of the single_holidays() sub - from 61.7s to 587ms

here are some before/after nytprof runs, (really on master-cd9a827, not 3.20)

 http://x1.kohaaloha.com/i/nyt-bz14522-before/home-mason-g-k-3-20-x-Koha-Calendar-pm-1485-line.html#237
 http://x1.kohaaloha.com/i/nyt-bz14522-after/home-mason-g-k-3-20-x-Koha-Calendar-pm-1485-line.html#280

to test...

1/ add a bunch of single_holidays to your test koha, (my table has 400 holiday rows)
2/ add a loong circ rule for an itemtype (my rule has 140 days)
3/ checkout an item to a user (took me 67 secs)

apply patch...
4/ return item
5/ repeats steps 1..3, (took me 6 secs)

6/ add/change/delete some various single_holidays, via Home->Tools->Calendar
    ensure that your various changes have indeed saved correctly

for extra points...

7/ run tests t/Calendar.t and t/db_dependent/Holidays.t, with all tests pass OK

 sudo  koha-shell -c '  export PERL5LIB=/home/mason/g/k/master ; \
 cd /home/mason/g/k/master ;  perl  t/Calendar.t ; perl  t/db_dependent/Holidays.t  '   testkoha

8/ run QA tool, with all tests pass OK

 sudo  koha-shell -c ' \
export KOHA_CONF=/etc/koha/sites/mayo2/koha-conf.xml \
 export PERL5LIB=/home/mason/g/k/master:/home/mason/qa-test-tools/ ; \
 cd /home/mason/g/k/master ;   perl /home/mason/qa-test-tools/koha-qa.pl  -c 1 ' testkoha

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14929: Fix missing display of help page in contract management
Marc Véron [Thu, 1 Oct 2015 08:51:18 +0000 (10:51 +0200)]
Bug 14929: Fix missing display of help page in contract management

This patch renames / moves  the file
koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/acqcontract.tt
to
koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/aqcontract.tt

To test:
- Go to Home > Acquisition > [Vendor] > Contracts
  (/cgi-bin/koha/admin/aqcontract.pl?booksellerid=XXXX)
- Verify that Help displays as appropriate.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. All the tabs similar to "Contracts" have
working help pages.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14832: Fix encoding issues when exporting in RIS
Jonathan Druart [Wed, 16 Sep 2015 08:41:41 +0000 (09:41 +0100)]
Bug 14832: Fix encoding issues when exporting in RIS

Test plan:
1/ Make sure you have non ASCII chars in the title and the authors.
2/ Export the record in RIS
You should not see any encoding problems.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Before patch: RIS file has wrongly encoded chars
After patch: RIS file has no endcoding problems
Tested on a NORMARC setup.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Tested on a MARC21 and a UNIMARC database.
Problem only confirmed for UNIMARC, but no regressions in MARC21.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14842: Wrong call to GetBranchItemRule
Jonathan Druart [Thu, 17 Sep 2015 08:03:59 +0000 (09:03 +0100)]
Bug 14842: Wrong call to GetBranchItemRule

From bug 7981:

GetBranchItemRule expects an itemtype, a scalar.
Here $itemtype is a hashref returned by C4::ItemType->get.
So $itemtype->{itemtype} should be passed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 5371: (follow-up) Force no caching for private pages at the OPAC
Jonathan Druart [Thu, 1 Oct 2015 10:58:41 +0000 (11:58 +0100)]
Bug 5371: (follow-up) Force no caching for private pages at the OPAC

Same as previous patch for opac-messaging.pl and opac-readingrecord.pl

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@unc.edu.ar>
8 years agoBug 5371: Force no caching for private pages at the OPAC
Jonathan Druart [Thu, 17 Sep 2015 11:45:15 +0000 (12:45 +0100)]
Bug 5371: Force no caching for private pages at the OPAC

In order no to slow too much the browsing, it is certainly not a good
idea to add this cache-control value for all pages at the OPAC.

This patch just adds where the author found it could be useful.

Test plan:
1/ Login at the OPAC
2/ Go on the account page (opac/opac-account.pl)
3/ Click log out
4/ Use the back button of your browser
Without this patch you will see the previous page.
With this patch, the previous page will be reloaded and you will be
redirected to the login form.

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@unc.edu.ar>
8 years agoBug 14927: Returns item info when resumptionToken is used
Frédéric Demians [Wed, 30 Sep 2015 10:16:52 +0000 (12:16 +0200)]
Bug 14927: Returns item info when resumptionToken is used

To test:

- activate OAI-PMH with the inclusion of items as explained on bug 12252
- set the OAI-PMH:MaxCount to a low number, 50 for instance
- go to the OAI-PMH page to get the records : [your koha
  catalogue]/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
- check that item data is included
- get the resumptionToken at the end of the xml
- got to the next page of records [your koha
  catalogue]/cgi-bin/koha/oai.pl?verb=ListRecords&resumptionToken=[your
  resumption token]
- check that item data is now missing

Apply the patch, and repeat previous steps: item data is back.

Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 12311: Do not return a lost item if modified in a batch
Jonathan Druart [Tue, 15 Sep 2015 10:44:32 +0000 (11:44 +0100)]
Bug 12311: Do not return a lost item if modified in a batch

If a item is lost and issued, and you modify it in a batch, the item
will be marked as returned. It should only be returned if the item is
marked as lost.

Test plan:
1/ Check an item out and mark it as lost
2/ Edit it in a batch (tools/batchMod.pl) and edit a field (notes for
instance)
3/ The item should still be issued to the patron
4/ Edit it in a batch and edit the lost value, marked it as not lost
5/ The item should still be issued to the patron
6/ Edit it in a batch and edit the lost value, marked it as lost
7/ The item should have been returned.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Just one comment, lost status can be changed only if you change default framework to another framework then edit the item. If you change it in Item menu at left side of screen this will remove the item from patron’s checkouts and patron charged for lost item.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
For testing purposes the lost item field can be set to visible
in the framework used. That will allow changing it without
returning it at the same time.
The other option is using the longoverdues.pl script.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14938: fix dependencies
Robin Sheat [Fri, 2 Oct 2015 00:31:48 +0000 (13:31 +1300)]
Bug 14938: fix dependencies

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14201: DBRev 3.21.00.030
Tomas Cohen Arazi [Mon, 28 Sep 2015 21:06:53 +0000 (18:06 -0300)]
Bug 14201: DBRev 3.21.00.030

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14597: (QA followup) Make Logger package level
Kyle M Hall [Fri, 18 Sep 2015 11:03:13 +0000 (07:03 -0400)]
Bug 14597: (QA followup) Make Logger package level

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14597: Reverting a batch where a record overlaid is now deleted record will fail
Kyle M Hall [Thu, 23 Jul 2015 16:14:25 +0000 (12:14 -0400)]
Bug 14597: Reverting a batch where a record overlaid is now deleted record will fail

If batch of records is used to overlay existing records, and one of
those records is deleted, any attempt to revert this batch will fail.

The unanimous consensus is that deleted records should stay deleted (
 https://lists.katipo.co.nz/public/koha/2015-June/043048.html ).

Test Plan:
1) Import a batch of records
2) Import the same batch again, using ISBN as a matcher for overlay
3) Find a record that overlayed a previous record and delete it
   ( the match type will be "match applied" and there will be a link in
     "match details" )
4) Attempt to revert the second batch ( that overlayed the first )
5) The progress will stop at some point and never complete
6) Apply this patch
7) Attempt to revert the second batch again
8) This time it should succeed!

Signed-off-by: Do, Tam T <tdo@albright.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14201: Yes, goodbye to the third plugin marc21_leader_video too
Marcel de Rooy [Tue, 14 Jul 2015 16:40:47 +0000 (18:40 +0200)]
Bug 14201: Yes, goodbye to the third plugin marc21_leader_video too

A closer look at this plugin revealed the same things as earlier:
[1] Since the click redirects to leader, the launcher is not used.
    In this case no template file existed.
[2] Leader_video does not use Focus while leader does.

This patch removes 'all' traces of leader_video.
It includes a tiny db revision for those brave people using it. The only
behavior change for them is the focus change.

Test plan:
[1] Run the db revision.
[2] Check if the leader plugin still works as expected.
[3] Git grep on marc21_leader_video. Ignore atomicupdate. No PO files :)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14201: We can do without plugin marc21_leader_computerfile
Marcel de Rooy [Tue, 14 Jul 2015 16:26:40 +0000 (18:26 +0200)]
Bug 14201: We can do without plugin marc21_leader_computerfile

A closer look at this plugin revealed the same things as the previous
patch for leader_book.
[1] Template leader_computerfile is not used.
[2] The unused template is not up-to-date either.
[3] Leader_computerfile does not use Focus while leader does.

This patch removes all traces of leader_computerfile.
It includes a tiny db revision for those brave people using it. The only
behavior change for them is the focus change.

Test plan:
[1] Run the db revision.
[2] Check if the leader plugin still works as expected.
[3] Git grep on marc21_leader_computerfile. Ignore PO files.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14201: Plugin marc21_leader_book is useless
Marcel de Rooy [Tue, 14 Jul 2015 15:26:55 +0000 (17:26 +0200)]
Bug 14201: Plugin marc21_leader_book is useless

A closer look at this plugin revealed the following:
[1] The leader_book builder redirects to leader.pl; the launcher code with
    leader_book.tt is dead.
[2] A diff of the two templates showed that most changes are minimal and
    irrelevant. Some updates to leader have not been incorporated into
    the unused leader_book.
[3] Leader_book does not use Focus while leader does.

This patch removes all traces of leader_book :)
It includes a tiny db revision for those brave people using it. The only
behavior change for them is the focus change.
Another small change: we do not need Search.pm in marc21_leader.

Test plan:
[1] Run the db revision. If you had some field attached to leader_book,
    it should be gone.
[2] Check if the leader plugin still works as expected.
[3] Run the FrameworkPlugin unit test. Ignore warnings from field_007.
[4] Git grep on marc21_leader_book. You will only find references to
    PO files in misc/translator.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14368: (RM followup) DBIx update
Tomas Cohen Arazi [Mon, 28 Sep 2015 15:09:40 +0000 (12:09 -0300)]
Bug 14368: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14368: DBRev 3.21.00.029
Tomas Cohen Arazi [Mon, 28 Sep 2015 15:08:09 +0000 (12:08 -0300)]
Bug 14368: DBRev 3.21.00.029

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14368: [Follow-up] Fix workflow
Matthias Meusburger [Mon, 21 Sep 2015 12:52:03 +0000 (14:52 +0200)]
Bug 14368: [Follow-up] Fix workflow

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14368: Add some missing tests
Jonathan Druart [Thu, 17 Sep 2015 09:27:42 +0000 (10:27 +0100)]
Bug 14368: Add some missing tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14368: [Follow-up] Add filter on borrower when displaying discharges history...
Matthias Meusburger [Wed, 16 Sep 2015 14:13:21 +0000 (16:13 +0200)]
Bug 14368: [Follow-up] Add filter on borrower when displaying discharges history on borrower's page.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14368: [Follow-up] Fix tests
Matthias Meusburger [Wed, 16 Sep 2015 12:54:13 +0000 (14:54 +0200)]
Bug 14368: [Follow-up] Fix tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14368: Add discharges history.
Matthias Meusburger [Tue, 9 Jun 2015 12:35:07 +0000 (14:35 +0200)]
Bug 14368: Add discharges history.

Currently, once a user is discharged, lifting the discharge debarment does
not allow the user to ask for a discharge again.

This patch adds the ability for a user to be discharged several times and to
keep an history of the discharges.

Test plan:

 - As a user, ask for a discharge.
 - As a librarian, allow the discharge.
 - Check that the requested and validated dates appear on the discharge panel of the borrower in the admin interface.
 - Lift the discharge debarment of the user.
 - Check that you can repeat these steps and that the new discharges are added in the discharge panel of the borrower in the admin interface.

Please note that you will need to run misc/devel/update_dbix_class_files.pl after the SQL update.
Adding a primary key to the discharges table was mandatory for DBIX::Class to be able to query with order_by.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14054: 246 XSLT Improvements
Winona Salesky [Tue, 9 Jun 2015 14:18:05 +0000 (10:18 -0400)]
Bug 14054: 246 XSLT Improvements

Adds other title type based on ind2 value. ind2 overridden by $i value.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14509: (follow-up) Reject invalid passwords
Jonathan Druart [Wed, 2 Sep 2015 08:43:51 +0000 (09:43 +0100)]
Bug 14509: (follow-up) Reject invalid passwords

The members.js was not included in member-password.tt
And it cannot, there are specific code which cannot be used outside of
memberentry.tt

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14509: Reject invalid passwords
Jonathan Druart [Tue, 14 Jul 2015 14:33:34 +0000 (15:33 +0100)]
Bug 14509: Reject invalid passwords

Bug 10177 rejects password with leading or trailing whitespaces, but
only on the member-password page.
It's not consistent to only do this check on 1 place.
This patch adds the check for the 2 other places: memberentry and at the
OPAC.

Test plan:
1/ Edit a patron and set a password with leading and/or trailing
whitespaces. You should not be allowed to do it (no server side check).
2/ Same at the OPAC ("Change you password" tab). Here there is a server
side check.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14904: Resolve warning from tt_valid.t
Marcel de Rooy [Mon, 28 Sep 2015 06:38:26 +0000 (08:38 +0200)]
Bug 14904: Resolve warning from tt_valid.t

Test tt_valid.t warns that opac-retrieve-file.tt has no id and class
attribute on the body tag.
This patch adds them to clear the warning.

Test plan:
Apply patch and run xt/tt_valid.t.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14909: Warnings from search_utf8.t when empty idx= misses in base
Marcel de Rooy [Mon, 28 Sep 2015 10:17:39 +0000 (12:17 +0200)]
Bug 14909: Warnings from search_utf8.t when empty idx= misses in base

The regex in this test looks like:
  opac-search.pl\?idx=&q=%CE%91%CE%B8%CE%AE%CE%BD%CE%B1
The result it got was:
  opac-search.pl?q=%CE%91%CE%B8%CE%AE%CE%BD%CE%B1

The empty idx should not be a reason to fail the test. I changed the
original regex to make the 'idx=&' part optional and added a base_unlike
test to verify that the base does not include a idx=\w+ anywhere.

Also corrected the typo Goog. Good!

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
All 66 tests now pass with me.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14905: Search_utf8.t fails to upload a file
Marcel de Rooy [Mon, 28 Sep 2015 08:54:55 +0000 (10:54 +0200)]
Bug 14905: Search_utf8.t fails to upload a file

Running the test fails on test 7:
not ok 7 - upload succeeded

The changes on bug 14321 included a temp flag for script upload-file.pl.
Since this upload for stage-marc-import should be temporary, adding this
flag to line 131 resolves the problem.

Test plan:
Run the adjusted test.
NOTE: I still had some problems with this test. And will still be looking
to these errors (perhaps open a new report). But this fix should at least
fix the above-mentioned test.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14883: Librarians are not warned if patron is restricted when placing holds
Kyle M Hall [Wed, 23 Sep 2015 14:44:20 +0000 (10:44 -0400)]
Bug 14883: Librarians are not warned if patron is restricted when placing holds

Librarians should be warned that a patron is restricted when placing
holds, as they are warned that a patron's acount has expired.

Test Plan:
1) Apply this patch
2) Add a restriction for a patron
3) Attempt to place a hold for that patron
4) Note the notice at the top notifying you that the patron is restricted

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14882: Librarians are not warned if patron owe more than maxoutstanding when...
Kyle M Hall [Wed, 23 Sep 2015 14:38:32 +0000 (10:38 -0400)]
Bug 14882: Librarians are not warned if patron owe more than maxoutstanding when placing holds

If a patron owes more than the system preference maxoutstanding in fees
and fines, the patron will be unable to place holds via the opac.
However, a librarian placing a hold for a patron is not even warned!

Test Plan:
1) Apply this patch
2) Set maxoutstanding to 1.00
3) Find a patron owing more than 1.00
4) Attempt to place a hold
5) Note the warning that the patron owes money

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14710: Make the export checkout list export only the checked out item infos
Jonathan Druart [Mon, 24 Aug 2015 12:19:28 +0000 (13:19 +0100)]
Bug 14710: Make the export checkout list export only the checked out item infos

This has been introduced by bug 11703.

Bug 13190 should have been fixed it.

If the pref ExportWithCsvProfile is defined with a MARC CSV profile and
it contains item infos to display, only info from the checked out item
should be displayed.

Test plan:
0/ Don't apply this patch
1/ Create a biblio with 1+ items
2/ Check one of the item out to a patron
3/ Define a CSV profile which contains item fields ("245$a|952$p" for instance)
4/ Export the item (from circ/circulation/pl) using the CSV option
Note that the csv contains the barcode from all items
5/ Apply this patch and repeat 4.
6/ Note that the csv contains only the barcode from the checked out
item.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: (QA followup) remove Test::CGI::Multipart dependency
Tomas Cohen Arazi [Fri, 25 Sep 2015 18:33:42 +0000 (15:33 -0300)]
Bug 14321: (QA followup) remove Test::CGI::Multipart dependency

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: (RM followup) DBIx update
Tomas Cohen Arazi [Fri, 25 Sep 2015 18:22:07 +0000 (15:22 -0300)]
Bug 14321: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: DBRev 3.21.00.028
Tomas Cohen Arazi [Fri, 25 Sep 2015 18:17:34 +0000 (15:17 -0300)]
Bug 14321: DBRev 3.21.00.028

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: [QA Follow-up] Additional QA requests
Marcel de Rooy [Fri, 18 Sep 2015 14:01:20 +0000 (16:01 +0200)]
Bug 14321: [QA Follow-up] Additional QA requests

This patch makes following requested changes:

[1] Renamed categorycode to uploadcategorycode (with atomicupdate file)
[2] Confirmation before deleting an uploaded file
[3] Label for Public checkbox can be clicked
[4] Back button on result list (not in plugin mode)
[5] Correct additional variable interpolation from sql queries

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested the db revision, unit test.
Uploaded temporary and permanent file, incl. plugin mode.
Deleted an upload.
Ran stage-marc-import.pl.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: [QA Follow-up] Changes for Upload.pm and upload-file.pl
Marcel de Rooy [Wed, 16 Sep 2015 11:53:38 +0000 (13:53 +0200)]
Bug 14321: [QA Follow-up] Changes for Upload.pm and upload-file.pl

Based on QA comments, this patch does the following:
[1] Destroy an empty DESTROY.
[2] Promote some comment lines to POD.
[3] Use File::Spec->catfile in sub _full_fname.
[4] Remove variable interpolation from a sql query.
[5] Add a comment in upload-file.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Run the unit test again, and uploaded a file.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: QA Fix
Jonathan Druart [Wed, 16 Sep 2015 10:12:04 +0000 (11:12 +0100)]
Bug 14321: QA Fix

Remove QA errors (keys on reference is experimental).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: Final cleanup, removing obsolete files
Marcel de Rooy [Mon, 17 Aug 2015 11:54:44 +0000 (13:54 +0200)]
Bug 14321: Final cleanup, removing obsolete files

The new Upload.pm, unit test and file-upload.js obsolete a number of
files, including an older jQuery plugin.
The test files progressbar.pl and progressbarsubmit.pl are outdated and
do not serve any purpose in this form. (Actually, we could argue if they
should be here or just be part of a debugging phase.)

Test plan:
[1] Git grep on file-progress, file-upload.inc, UploadedFile,
    ajaxfileupload, ajaxFileUpload
    UploadedFile: Only a reference to DBIx file is found
    ajaxfileupload: Only release notes
[2] Upload a file with tools/upload and stage-marc-import.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: Integrate Upload.pm into Koha
Marcel de Rooy [Sat, 8 Aug 2015 15:28:25 +0000 (17:28 +0200)]
Bug 14321: Integrate Upload.pm into Koha

This patch makes the following changes to achieve that:
[1] Use Upload.pm in stage-marc-import.pl, upload-cover-image.pl,
    offline_circ/process_koc.pl and enqueue_koc.pl.
[2] A new file-upload.js replaces file-upload.inc in the associated template.
    We now use ajax to get progress figures instead of launching perl script
    upload-file-progress.
    The js changes now also allow for aborting a file upload.
[3] Adds a tools/upload script and template. It allows to upload multiple
    files at once.
[4] Makes upload-file return error messages in JSON. For a multiple upload,
    we could have some files with errors and others without errors.
    The upload is now marked as Failed only if there was no upload at all.
[5] The upload plugin is converted to use tools/upload with plugin param.
    Deleting an upload is now presented via the search results form.

NOTE: In editing the process_koc.tt I noticed that the form enqueuefile was
hidden and no longer used (with associated code in process_koc.pl). When a
file has been uploaded, I display the form again (with the Apply directly
button). The code still works.

NOTE: We fix an error in upload-file from one of the patches of bug 6874.
The userid of the Koha admin user is passed to haspermission, but we
should pick the userid from the session.

NOTE: Bug 14686 will add a specific permission for tools/upload.pl, and
will add the tools/upload script to the Tools menu.
For now, you need edit_catalogue to start upload.pl and you will
additionally need a permission like upload_local_cover_images
to successfully upload a new file.

Test plan:
[1] Upload a marc file in stage-marc-import. (This is temp storage.)
[2] Check new entry in table uploaded_files. Look for the file in your
    temporary directory (/tmp ?), subfolder koha_upload.
    Bonus: Remove permissions on this subfolder. Retry, check error and
    restore permissions again.
[3] Upload another (larger) file and abort the upload. Check table and
    directory again. You should have a partial file, but no record.
[4] Verify that Stage for import still works as expected.
[5] Test Upload local cover image. (Enable OPACLocalCoverImages.) You can
    test an individual image or a zip file including images and a file
    called datalink.txt (with lines biblionumber,filename).
[6] Test uploading a offline circulation file:
    Enable AllowOfflineCirculation, and create a koc file (plain text):
    Line1: Version=1.0\tA=1\tB=2
    Line2: 2015-08-06 08:00:00 345\treturn\t[barcode]
    Note: Replace tabs and barcode. The number of tabs is essential!
    Checkout the item with your barcode.
    Go to Offline circulation file upload. Upload and click Apply directly.
    Checkout again. Upload again, click Add to offline circulation queue.
[7] Upload three files via tools/upload.pl with a category and marked as
    public. Check the results in the table.
    Verify that you can download the file in OPAC without being logged in.
[8] Pick one new file and one of the files of step 7. Upload them in the
    same category. One upload should succeed. Check for reported error.
[9] Connect upload.pl to field 856$u.
    Goto Cataloguing editor.
    In an empty 856$u, click the tag editor. Upload a file and click Choose.
    Save the record. Open the record in the OPAC and click the link.
    Copy this link to your clipboard for next step.
[A] Go back to editor. Click the tag editor on the same 856 field.
    Choose for Delete.
    Open the link in your clipboard again. Error message?
[B] Check the process of upload, search, download and delete of an upload
    with some diacritical characters in the filename. (Bonus points for
    adding special chars in the category code.)
    Note: You can add categories via authorized values, UPLOAD key.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 14321: [QA Follow-up] Perltidy upload.pl

Run perltidy -pro=xt/perltidyrc on tools/upload.pl.
No other changes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: Introduce Koha::Upload
Marcel de Rooy [Thu, 30 Jul 2015 17:19:44 +0000 (19:19 +0200)]
Bug 14321: Introduce Koha::Upload

This patch introduces Koha::Upload. It will replace the modules
C4::UploadedFile.pm and the new C4::UploadedFiles.pm (from BZ 6874).
It also includes a new unit test.

NOTE: This unit test will replace the test for UploadedFiles.pm. It will no
longer use dependency Test::CGI::Multipart. We are now mocking CGI and its
hook to achieve the same result.

Test plan:
[1] Run t/db_dependent/Upload.t.
    Note that if you see a WARNING, you will still need to add an entry
    upload_path to your koha-conf.xml. Or you need to give write
    permission to your Koha instance user for that folder.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14321: Add two columns to uploaded_files
Marcel de Rooy [Thu, 6 Aug 2015 13:34:57 +0000 (15:34 +0200)]
Bug 14321: Add two columns to uploaded_files

This patch adds uploaded_files.public and permanent.
Public will be used later to mark uploaded files as available via OPAC.
Permanent will be used to make the distinction between temporary and
permanent storage.

The db rev sets both flags for all current records (uploaded via the
plugin from BZ 6874).

Test plan:
[1] If you tested this before, drop the column public first.
[1] Run the dbrev.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14297: (QA followup) Remove unnecessary line
Kyle M Hall [Thu, 3 Sep 2015 15:03:02 +0000 (11:03 -0400)]
Bug 14297: (QA followup)  Remove unnecessary line

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14297: Holds Queue building ignoring holds where pickup & home branch don't match...
Kyle M Hall [Fri, 29 May 2015 10:46:24 +0000 (06:46 -0400)]
Bug 14297: Holds Queue building ignoring holds where pickup & home branch don't match and item is not from least cost branch

If a record has a hold on it where the pickup and home branch do not
match, the holds queue builder will only look at items from the least
cost branch ( as defined by the transport cost matrix or the sys pref
StaticHoldsQueueWeight.

Test Plan:
1) Create a record with two items, one for library A and one for library B
2) Set your circulation rules such that the book from library A is
   holdable by all and the book from library B is holdable only by library
   B patrons
3) Create a hold for a Library C patron for pickup at library C
4) Set the syspref StaticHoldsQueueWeight to by Library B, Library A,
   Library C in that order
5) Rebuild the holds queue
6) Note the hold wasn't picked up even though the item from library A
   could have filled the hold
7) Apply this patch
8) Rebuild the holds queue
9) View the holds queue again
10) Note the hold now displays

Signed-off-by: Nora Blake <nblake@masslibsystem.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14297: Unit Tests
Kyle M Hall [Thu, 27 Aug 2015 13:16:43 +0000 (09:16 -0400)]
Bug 14297: Unit Tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14505: single quotes in journal number cause print routing list window to not...
Joonas Kylmälä [Thu, 20 Aug 2015 09:24:17 +0000 (09:24 +0000)]
Bug 14505: single quotes in journal number cause print routing list window to not appear

Escapes single quotes from serial.serialseq string.

Test plan:

1. Have a serial with a number which has single quote in it.
2. Go to Serials -> Find some serial subscription -> Serial collection.
3. Set up a routing list for this serial.
4. Click on Print list under the column Routing.
5. Notice that the print window doesn't open.
6. Apply patch.
7. Notice that the print window opens.

Sponsored-by: Vaara-kirjastot
Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14217: Add 'condition' attribute for DOM index definition
Tomas Cohen Arazi [Wed, 8 Jul 2015 15:37:31 +0000 (12:37 -0300)]
Bug 14217: Add 'condition' attribute for DOM index definition

This patch introduces an extension to the current syntax for DOM index definition.
Specifically, it extends the 'index_subfields' tag to allow adding a 'condition'
attribute that is used as a condition ofr applying the specified index.

This (exotic) example is self-explanatory:

The previous syntax (which is keeped by this patch) took this snippet from biblio-koha-indexdefs.xml

  <index_subfields tag="100" subfields="acbd">
    <target_index>Encuadernador:w</target_index>
  </index_subfields>

and generated an XSLT snippet in the DOM indexing XSLT that looks like this:

    <xslo:for-each select="marc:subfield">
      <xslo:if test="contains('acbd', @code)">
        <z:index name="Encuadernador:w">
          <xslo:value-of select="."/>
        </z:index>
      </xslo:if>
    </xslo:for-each>

This patch introduces this syntax change (note the 'condition' attribute:

  <index_subfields tag="100" subfields="acbd" condition="@ind2='7'">
    <target_index>Encuadernador:w</target_index>
  </index_subfields>

which yields to this XSLT snippet in the DOM indexing XSLT:

    <xslo:if test="@ind2='7'">
      <xslo:for-each select="marc:subfield">
        <xslo:if test="contains('acbd', @code)">
          <z:index name="Encuadernador:w">
            <xslo:value-of select="."/>
          </z:index>
        </xslo:if>
      </xslo:for-each>
    </xslo:if>

To test:
- Verify that the shipped XSLT files are current regarding the shipped index definitions:
  $ for i in marc21 normarc unimarc; do
        xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl \
              etc/zebradb/marc_defs/$i/biblios/biblio-koha-indexdefs.xml \
              > etc/zebradb/marc_defs/$i/biblios/biblio-zebra-indexdefs.xsl
    done
  $ git status
(repeat for authorities, skip normarc which doesn't have authorities)
- Apply the patch
- Re-run the previous commands
=> SUCCESS: no changes
- Add a condition to an index_subfields tag (for example, condition="@ind2='7'" in the Author's index
- Regenerate the specific XSLT
=> SUCCESS: doing a diff shows the only change is the code has been wrapped inside an xslo:if using the condition for the test
- Apply the generated xsl to a MARCXML record that has a field matching the condition like this:
  $ xsltproc .../biblio-zebra-indexdefs.xsl sample_record.xml
=> SUCCESS: There's an index on the result, containing the configured field/subfields, that matches the criteria.
- Sign off and feel really happy :-D

Note: the attached sample record includes a 100 field, with ind2=7 and $a=Tomasito

Edit: This patch was squashed once I figured it got too complex and Jonathan required a followup
to avoid code duplication.

This avoids code duplication, with the same results.

Sponsored-by: Orex Digital
Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14873: Remove C4::Dates from reserve/request.pl
Marc Véron [Sun, 20 Sep 2015 19:39:44 +0000 (21:39 +0200)]
Bug 14873: Remove C4::Dates from reserve/request.pl

This bug removes deprecated C4::Dates from reserve/request.pl

To test:
- Apply patch
- In staff client, search a biblio and try to put a hold for a borrower (Home > Catalog > [Some Biblio] > Place a hold to [Some biblio])

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14879: Move the date displays to the template
Jonathan Druart [Thu, 24 Sep 2015 10:28:42 +0000 (11:28 +0100)]
Bug 14879: Move the date displays to the template

There is no special need to format the date in the perl script.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14879: Remove C4::Dates from catalogue/detail.pl
Marc Véron [Sun, 20 Sep 2015 21:36:32 +0000 (23:36 +0200)]
Bug 14879: Remove C4::Dates from catalogue/detail.pl

This bug removes deprecated C4::Dates from catalogue/detail.pl

To test:
Apply patch
Go to Home > Catalog > Details for [some biblio with items and holdings]
Make sure that biblio and Holdings and Acquisition details display as appropriate

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 14879 - Remove C4::Dates from catalogue/detail.pl

Remove forbidden patterns (tab) to pass QA tools

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14733: (QA followup) make tests independent of already defined branches
Tomas Cohen Arazi [Fri, 25 Sep 2015 14:47:23 +0000 (11:47 -0300)]
Bug 14733: (QA followup) make tests independent of already defined branches

The current tests were expecting the first defined branch to be CPL. That's
not the case on my box so they failed. This patch adds the creation of two
new random branches/branchcodes, and replaces the legacy use of CPL and MPL
in favour of the new ones.
It relies on TestBuilder for the task.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14733: Replace 'priority' with 'estimated priority'
Jonathan Druart [Mon, 21 Sep 2015 15:46:00 +0000 (16:46 +0100)]
Bug 14733: Replace 'priority' with 'estimated priority'

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14733: Prevent a record from having holds with duplicate priorities
Kyle M Hall [Wed, 26 Aug 2015 15:43:08 +0000 (11:43 -0400)]
Bug 14733: Prevent a record from having holds with duplicate priorities

It is possible to create holds with duplicate priorities.

The reason for this is that typically the priority is calculated before
placing the hold. When the hold is placed the priority is calculated.
This can easily be shown by opening up two browser windows and starting
to place a hold for a record in each one. You'll see that both list the
same priority. If you than place the hold in each window, both holds
will have the same priority!

Test Plan:
1) Run unit tests pre-patch, note they fail
2) Run unit tests post-patch, note they succeed

Signed-off-by: Heather Braum <hbraum@nekls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14733: Unit Tests
Kyle M Hall [Wed, 26 Aug 2015 15:42:14 +0000 (11:42 -0400)]
Bug 14733: Unit Tests

Signed-off-by: Heather Braum <hbraum@nekls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14298: DBRev 3.21.00.027
Tomas Cohen Arazi [Fri, 25 Sep 2015 14:20:13 +0000 (11:20 -0300)]
Bug 14298: DBRev 3.21.00.027

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14298: Add perms for other languages
Jonathan Druart [Mon, 14 Sep 2015 09:50:12 +0000 (10:50 +0100)]
Bug 14298: Add perms for other languages

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14298: Add warning to the about page if the sco user does not have correct permis...
Jonathan Druart [Wed, 2 Sep 2015 15:30:15 +0000 (16:30 +0100)]
Bug 14298: Add warning to the about page if the sco user does not have correct permissions

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Note: Made a little change, changed He should have, to They should have

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14298: Use the new permission in the sco scripts
Jonathan Druart [Wed, 2 Sep 2015 15:10:45 +0000 (16:10 +0100)]
Bug 14298: Use the new permission in the sco scripts

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Note without this patch, you won't be able to access the SCO side.
So don't panic if you cant use SCO with just the first patch

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14298: Add the new 'self_checkout' permissions
Jonathan Druart [Wed, 2 Sep 2015 15:09:35 +0000 (16:09 +0100)]
Bug 14298: Add the new 'self_checkout' permissions

There is a security issue in the self checkout module.
The user used to check items out must have the circulate =>
circulate_remaining_permissions permissions.
So even if a user does not have a login/password or a barcode he cans
access to the circulation module of the intranet.
Imagine if the sco patron used is a superlibrarian...

This patch set will change the behavior and adds a new permission to
access to the sco module (circulate => self_checkout).
This permission should be the only one defined for this patron.

IMPORTANT NOTE: Hopefully, this only works if both interfaces use the
same domains (but different ports).

Test plan:
0/ Does not apply this patch set
1/ Create a patron with the circulate => circulate_remaining_permissions
and some others. Note his userid/pwd (later 'sco/sco').
Turn on WebBasedSelfCheck and AutoSelfCheckAllowed
Fill the AutoSelfCheckID and AutoSelfCheckPass wich 'sco' and 'sco'
2/ Log you out from the OPAC and the intranet
3/ Go on the sco page
4/ Note that your are automatically logged in
5/ Go on the circulation module on the intranet side
6/ Oops
7/ Apply this patch
8/ Execute the updatedatabase
9/ Note that the sco user only has the new permission circulate =>
self_checkout, others have been removed
10/ Try to reproduce the issue, it should not access anything on the
intranet side
11/ Confirm that there is no regression in the sco module

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Works well no regressions, changes the permissions appropriately.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14817: (follow-up) Fix encoding issues in columns.def
Jonathan Druart [Wed, 16 Sep 2015 08:24:07 +0000 (09:24 +0100)]
Bug 14817: (follow-up) Fix encoding issues in columns.def

Follow-up for reports.

Test plan:
1/ Use a translated template (fr-FR or ar-Arab)
2/ Go on the report guided page, step 3
3/ The field names should be correctly encoded.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14817: Fix encoding issues in columns.def
Jonathan Druart [Mon, 14 Sep 2015 14:02:50 +0000 (15:02 +0100)]
Bug 14817: Fix encoding issues in columns.def

Test plan:
1/ Use a translated template (fr-FR or ar-Arab)
2/ Go on the tools/import_patrons.pl page
3/ The field names in the "default values" block should be correctly
encoded.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13813: [QA Follow-up] Fix some tabs for qa tools
Marcel de Rooy [Thu, 3 Sep 2015 10:16:08 +0000 (12:16 +0200)]
Bug 13813: [QA Follow-up] Fix some tabs for qa tools

FAIL   C4/Barcodes/annual.pm
   FAIL   forbidden patterns
                forbidden pattern: tab char (line 86)
                forbidden pattern: tab char (line 51)

FAIL   C4/Barcodes/hbyymmincr.pm
   FAIL   forbidden patterns
                forbidden pattern: tab char (line 108)
                forbidden pattern: tab char (line 78)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 13813: Remove deprecated module C4::Dates from system
Marc Véron [Thu, 3 Sep 2015 09:46:09 +0000 (11:46 +0200)]
Bug 13813: Remove deprecated module C4::Dates from system

Changes for QA comment #165

circ/transferstoreceive.pl
'iso' added

circ/waitingreserves.pl
'iso' added

members/printinvoice.pl
'iso' removed

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 13813: Remove deprecated module C4::Dates from system
Marc Véron [Thu, 12 Mar 2015 14:00:11 +0000 (15:00 +0100)]
Bug 13813: Remove deprecated module C4::Dates from system

Test plan: See Bugzilla.

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@unc.edu.ar>
8 years agoBug 11368: [QA Followup 2]
Kyle M Hall [Wed, 16 Sep 2015 14:33:09 +0000 (10:33 -0400)]
Bug 11368: [QA Followup 2]

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 11368: [QA Followup]
Kyle M Hall [Thu, 14 May 2015 12:21:10 +0000 (08:21 -0400)]
Bug 11368: [QA Followup]

* Fix QA failures
* Fix copyright
* Add file format documentation
* Add -c --confirm option
* Add -t --test option
* Add -h --help option

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 11368: Add script to import Lexile scores
Kyle M Hall [Tue, 10 Dec 2013 15:26:48 +0000 (10:26 -0500)]
Bug 11368: Add script to import Lexile scores

Koha needs a script to automate the importing of Lexile score data for
titles that have available scores but are not currently in the title's
record.

This script will take a CSV file of Lexile scores, and locate any
matching records in the Koha database ( by ISBN ). If the record already
has a score, it will be updated. If not, the Lexile score field will be
created.

Test Plan:
1) Apply this patch
2) Catalog a record for each of the following ISBNs:
   0789170191
   9780673779410
3) Download the file LexileTitlesTruncated.txt attached
   to this bug report
4) Run the script from the command line:
   ./misc/migraction_tools/import_lexile.pl -v --file /path/to/LexileTitlesTruncated.txt
5) View those records in Koha
6) Note those records now have valid Lexile scores
7) Edit the Lexile score ( 521$a ) and change the value to something else
8) Repeat step 4
9) Note the original Lexile score has been restored

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14472: (QA followup) fix updatedatabase.pl for multiple ISSN rules
Tomas Cohen Arazi [Fri, 18 Sep 2015 15:34:45 +0000 (12:34 -0300)]
Bug 14472: (QA followup) fix updatedatabase.pl for multiple ISSN rules

If (for some reason) the user has created more than one matching rule
with the 'ISSN' code, the updatedabase.pl script fails, because it was
written with the default data in mind, and didn't consider the scenario
described above.

Thanks Liz for pointing this out!

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14585: Fixing up online help on main page
Aleisha [Wed, 22 Jul 2015 01:37:30 +0000 (01:37 +0000)]
Bug 14585: Fixing up online help on main page

To test:

1) Go to home page of staff client and click the Help
2) Notice: 'you should now 'got to' Koha'
   'settings found in 'a'dministration.' (should be capitalized)
   'Once that user is set you should use that user to log in rather than the root user set up as part of installation.' (could be worded better)
3) Apply patch, close Help, reload page, reopen Help
4) Notice: 'got to' --> 'go to'
   'administration' --> 'Administration'
   'Once that user is set you should use that user to log in rather than the root user set up as part of installation.'

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14510: (QA followup) fix columns settings in other pages
Jesse Weaver [Mon, 14 Sep 2015 21:57:55 +0000 (15:57 -0600)]
Bug 14510: (QA followup) fix columns settings in other pages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14510: Redirect to the items' fields mapped
Jonathan Druart [Fri, 4 Sep 2015 08:15:27 +0000 (09:15 +0100)]
Bug 14510: Redirect to the items' fields mapped

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14510: (QA followup) Fix bug with unmapped columns
Jesse Weaver [Thu, 6 Aug 2015 18:48:07 +0000 (12:48 -0600)]
Bug 14510: (QA followup) Fix bug with unmapped columns

Fall back more smoothly when items subfields are not mapped to a
kohafield. Note, however, that this development does not allow applying
default settings to subfields that aren't mapped. A note has been added
to the columns settings page, as there is no known workaround for this.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14510: (QA followup) Add more columns, resort
Jesse Weaver [Thu, 6 Aug 2015 18:48:07 +0000 (12:48 -0600)]
Bug 14510: (QA followup) Add more columns, resort

Per a conversation with Jonathan Druart, add all columns that could be
reasonably mapped, and order them the same as in kohastructure.sql.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
8 years agoBug 14510: (QA followup) remove extraneous whitespace
Jesse Weaver [Thu, 6 Aug 2015 18:48:07 +0000 (12:48 -0600)]
Bug 14510: (QA followup) remove extraneous whitespace

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>