Commit graph

1686 commits

Author SHA1 Message Date
6413eb9949 BUG 13468: Overdue notice lists all checked out books
This patch should fix the issue when running under 'triggered' mode

To test:

1) Run overdue_notices.pl -t -n [to output notices to command
line]
2) Note that the notices output, list ALL checked out items
3) Apply Patch
4) Run again
5) Note the difference

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: remove space changes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-12-17 19:26:05 -03:00
Robin Sheat
a8c975d951 Bug 13377: mark automatic_renewals.pl as executable
This script is called by a cron job, but was never marked as executable,
so will error every time it's called, which is no good. This also adds
an appropriate #! line to the top of the file.

To test:
* apply the patch
* make a package
* ensure that the installed
  /usr/share/koha/bin/cronjobs/automatic_renewals.pl
  is mode 755 and does something when run.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-12-03 09:35:24 -03:00
Bernardo Gonzalez Kriegel
d9b50a47b4 Translation updates for Koha 3.18.0 release 2014-11-28 13:01:28 -03:00
be183b3c6b Release notes for 3.18.0
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-28 13:01:16 -03:00
Bernardo Gonzalez Kriegel
2cb427008d Fix errors on Korean translation files
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Translation manager pull request so the po get updated correctly
for translation.
2014-11-27 14:20:46 -03:00
Bernardo Gonzalez Kriegel
d1e05b67d1 Bug 13328: Rename Kurdish translation files
Kurdish translation files use a variant of Arabic script,
they need to be displayed as RTL.

Currently that is inferred from language dir name after
translation, and that name use the language tag, so we
need to change it from 'ku' to 'ku-Arab'

To test:
1) Translate to Kurdish
(cd misc translator; ./translate install ku)
2) Enable Kurdish on opac/staff
3) Test staff/opac interface, they are displayed as LTR
which is wrong
4) Disable Kurdish language
5) Do a cleanup (git clean -f -d)

5) Apply the patch

6) Translate again
(cd misc translator; ./translate install ku-Arab)
7) Enable again
8) Test again, this time display is correct (LTR)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Easy to test. Well spotted Bernardo.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.
2014-11-23 10:05:41 -03:00
c44439bc7d Bug 8337: Small typo in usage statement for longoverdue.pl
The charge with the replacement price will only be made if the charge
parameter matches the lost value. The given example is faulty (as well
as some of the code, as it appears ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-21 18:55:52 -03:00
Frédérick
38deeea87b Bug 8337 System preferences for longoverdue cron
Patch to follow that adds 3 new system preferences to control the
parameters for the longoverdue script.
New prefs are DefaultLongOverdueChargeValue, DefaultLongOverdueLostValue
and DefaultLongOverdueDays.
These preferences are used when you call the longoverdue.pl script without
their parameters.

Sponsored-By: CCSR
Signed-off-by: Leila and Fridos help <koha.aixmarseille@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-21 18:55:40 -03:00
47e030ea75 Preliminary (beta) release notes for 3.18
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-17 14:27:21 -03:00
Bernardo Gonzalez Kriegel
d37d8c7f00 Translation updates for Koha 3.18.0-beta release
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-17 11:01:50 -03:00
Katrin Fischer
2669c51be4 Bug 10136: Remove outdated translation tool docs
Patch removes outdated translation tool documentation
from the misc/translator directory.

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Removing these lines sounds like a good idea. I tested by
applying the patch and checking that the files in question
are gone.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-14 11:41:45 -03:00
65ab6c1416 Bug 13257: update_dbix_class_files.pl need a POD
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-14 11:38:48 -03:00
Magnus Enger
1be9f1a0e7 Bug 11401: QA followup
1) Be more careful when checking the NorwegianPatronDBEnable syspref.

Before:
if ( C4::Context->preference('NorwegianPatronDBEnable') == 1 ) {

After:
if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) {

This should avoid complaints if the syspref is not initialized.

2) Fix some empty =head2 POD sections

3) Fix some indentation in patrons.pref, to make xt/yaml_valid.t happy

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I couldn't find any regressions with adding, editing and deleting members.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-14 09:42:45 -03:00
Magnus Enger
290341d8db Bug 11401: Add support for Norwegian national library card
This patch makes it possible to sync patron data between Koha and the
Norwegian national patron database, in both directions.

In order to use this, the following information is necessary:
- a username/password from the Norwegian national database of libraries
  ("Base Bibliotek"), available to all Norwegian libraries
- a special key in order to decrypt and encrypt PIN-codes/passwords,
  which is only available to Norwegian library system vendors
- a norwegian library vendor username/password

See http://www.lanekortet.no/ for more information (in Norwegian).

While this is of course an implementation of a specific synchronization scheme
for borrower data, attempts have been made to prepare the ground for other sync
schemes that might be implemented later. Especially the structure of the new
borrower_sync table might be reviewed with an eye to how it might fit other
schemes.

To test:

Since the password and cryptographic key needed to use this functionality
is only available to Norwegian library system vendors, only regression testing
can be done on the submitted code. Suggested things to check:

- Apply the patch and make sure the database update is done. This should add
  the new "borrower_sync" table and five new systmpreferences under the
  "Patrons" > "Norwegian patron database" category:
  - NorwegianPatronDBEnable
  - NorwegianPatronDBEndpoint
  - NorwegianPatronDBUsername
  - NorwegianPatronDBPassword
  - NorwegianPatronDBSearchNLAfterLocalHit
- Check that patrons can be created, edited and deleted as usual, when
  NorwegianPatronDBEnable is set to "Disable"
- Check that the new tests in t/NorwegianPatronDB.pm run ok, e.g. on a
  gitified setup:
  $ sudo koha-shell -c "PERL5LIB=/path/to/kohaclone prove -v t/NorwegianPatronDB.t" instancename
- Check that all the other tests still run ok
- Check that the POD in the new files itroduced by this patch looks ok:
  - Koha/NorwegianPatronDB.pm
  - members/nl-search.pl
  - misc/cronjobs/nl-sync-from-koha.pl
  - misc/cronjobs/nl-sync-to-koha.pl
  - t/NorwegianPatronDB.t

Sponsored-by: Oslo Public Library

Update 2014-09-18:
- Rebase on master
- Split out changes to Koha::Schema
- Incorporate new way of authenticating with NL

Update 2014-10-21:
- Rebase on master
- Use Module::Load to load Koha::NorwegianPatronDB in non-NL-specific
  scripts and modules
- Fix the version number of Digest::SHA
- Fix a missing semicolon in kohastructure.sql

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-14 09:42:23 -03:00
Jonathan Druart
3443056e15 Bug 8218: qa followup
This patch
- rename _entity_clean as _clean_ampersand
- rename the script to sanitize_records.pl
- add a --fix-ampersand switch (the only one FOR NOW, enabled by
  default) so it is obvious what the script does.
- make POD and usage reflect this changes.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-11 15:39:05 -03:00
a7b41eac76 Bug 8218: Follow-up for some small typos
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-11 15:38:53 -03:00
Jonathan Druart
299a8a6997 Bug 8218 : Add a maintenance script to sanitize biblio records
This patch adds:
- a new maintenance script batch_sanitize_records
- a new subroutine C4::Charset::SanitizeRecord
- new unit tests for the new subroutine

Test plan:
1/ prove t/db_dependent/Charset.t
2/ Create a record containing "&amp;amp;" (could be follow with as many
'amp;' as you want) in one of its fields and the same for the field
linked to biblioitems.url.
The url should not be sanitized, it may contain "&amp;".
3/ Launch the maintenance script with the -h parameter to see how to use
it.
4/ Launch the script using the different parameters:
 --filename=FILENAME
 --biblionumbers='XXX'
 --auto-search

The auto-search permits to sanitize all records containing "&amp;amp;" in
the marcxml field.

Use the verbose flag for testing.
Without the --confirm flag, nothing is done.

5/ Use the --confirm flag and verify in the biblioitems.marcxml field
that the record has been sanitized.

6/ Try the --reindex flag to reindex records which have been modified.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-11 15:38:36 -03:00
Sophie Meynieux
40ece625bb Bug 13018 : Static fine should be charged only once
Test plan (see Bug 6858 for using staticfine.pl) :

For a user (of a given category and library) with several overdues, launch the script :

staticfines.pl --category CAT,AMOUNT --library LIB --delay DELAY

Then, check that the user has been charged of AMOUNT if the due date of the most late item plus the delay is *before* today.

One day later, re-execute the script with the same parameters and check that the fine has not been charged twice.

Without patch, the fine is charged twice, with patch the user already charged is skipped (see output in debug mode)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Without the patch, the fine will be applied every time the script is run.
With the patch the fine will only be applied once.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-11 09:44:01 -03:00
71c0b8226e Bug 12760 - add restrictions purge to cleanup_database.pl (followup 2)
Formatting :
perltidy
use q{} for SQL queries
add use Modern::Perl

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-07 11:32:31 -03:00
301b96e66d Bug 12760 - add restrictions purge to cleanup_database.pl (followup 1)
Remove unused $query var
Correct redefined $count var

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-07 11:32:29 -03:00
5f58431380 Bug 12760 - add restrictions purge to cleanup_database.pl
This patch adds to the database cleanup script an option to purge expired patron restrictions (debarments in code).

Test plan :
- Select a borrower
- Create a restriction with expiration date in the futur
- Create a restriction expired since 7 days
- Create a restriction expired since 14 days
- run "misc/cronjobs/cleanup_database.pl -v --restrictions 14"
=> no restriction is removed for this borrower
- run "misc/cronjobs/cleanup_database.pl -v --restrictions 13"
=> restriction expired since 14 days is removed
- run "misc/cronjobs/cleanup_database.pl -v --restrictions 6"
=> restriction expired since 7 days is removed
- run without argument "misc/cronjobs/cleanup_database.pl"
=> You see help text for restrictions option
- run without days "misc/cronjobs/cleanup_database.pl -v --restrictions"
=> You get a purge on 30 days

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-07 11:32:22 -03:00
Admin User Koha
ccf4061324 Bug 12995 - script update_totalissues.pl stops on corrupted record
When running update_totalissues.pl cronjob, it will stop on a corrupted
record.

This patch changes UpdateTotalIssues so that it return 1 if processing
record has succeded. Also, if mapping with biblioitems.totalissues does
not exist, the method has nothing to do so it stops and returns 1.

When processing a corrupted record, script now alerts about the error on
this biblionumber (if script is verbose) and process next record.
A total number of records with error will be printed at the end of the
script.

Test plan :
- Create a dabase with a few biblios and some issues
- Modify first biblio record (use direct sql update) : set empty value
  in biblioitems.marcxml
- Launch script : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000 -v

=> Without patch : the script stops at first record
=> With patch : the script prints error for first record and processes
   all records

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I was able to confirm the problem before the patch and successfully
follow the test plan.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2014-10-31 14:14:24 -03:00
407c2fe7c0 Bug 13028: Followup adding a -partial flag for partial compares
If you compare the database with a partial pref file, you may not be
interested in lots of lines saying that a pref is not in the file. You
were already aware of that ;)
If you add the -partial flag, these lines will be skipped.

Test plan:
Do as described above.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:24:07 -03:00
98a3aa4d8f Bug 13028: Resolve uninitialized value in string eq at cmp_sysprefs.pl line 194
If you use the restore option with a partial pref file not containing a version, you will have this error. Also the count of updated prefs will be one too high.

This is corrected by a better test of the hash value in the CheckVersionPref subroutine.

Test plan:
[1] Create a small pref file and remove the version pref (if present). You
could for instance do a pref backup and remove most lines.
[2] Use the restore option with and without this patch.
    So, something like:
        maintclone/misc/maintenance/cmp_sysprefs.pl -c r -f 9999crucial.pref
[3] Check on the error message and the pref count.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:24:00 -03:00
Bernardo Gonzalez Kriegel
0258d3a42d Bug 12535 - PROG/CCSR Deprecation: Make opac translation theme independent
This patch makes opac translation files theme independent
A side effect is that current prog translation file is
renamed.

But the renaming is not added, that gives a patch of ~60M!

Current list of languages are now obtained from pref files.

To test:
1) Apply the patch

2) For your preferred language, rename opac prog file
from 'xx-YY-i-opac-t-prog-v-3006000.po' to 'xx-YY-opac-prog.po'

3) Update that language, there must be no errors
cd misc/translation
./translate update xx-YY [-v]
Check updated po files

4) Install any language, there must be no errors
./translate install xx-YY
Check prog theme for that language

5) Create translation files. Remove a language or create new lang files
./translate create zz-WW
ls -l po/zz-WW*po
check there are 3 files (and *~) for opac

6) Check updated pod for LangInstaler.pm and translate script

When PROG/CCSR themes are removed, I'll add a Bug to remove
corresponding files.

Perhaps RM could add a followup to rename all files,
cd misc/translator/po
for old in $(ls *opac-t*); do
    new=$(echo $old | sed 's/-i-opac-t-prog-v-3006000/-opac-prog/');
    git mv $old $new;
done

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-29 22:00:22 -03:00
0a53d5e6b6 Bug 12651: DOM indexing is the default
On the 23 July development meeting it was decided to formally deprecate
GRS-1 indexing mode for Zebra. This patch makes code fallback to DOM
on the remaining places. No behaviour change should be noticed, as DOM
has been the default for a while.

Regards

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Also checked running Makefile.PL

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-27 12:35:44 -03:00
Chris Cormack
a063067b91 Bug 9530 Making changes to misc/cronjobs/runreport.pl
Note: mail from this doesnt work in current master, so you may not
be able to test this fully

To Test

1/ Edit the new systempreferences (ReplytoDefault and ReturnpathDefault)
2/ Optionally edit the branch the mail will be sent from, adding email addresses
3/ Test sending a mail from scheduled reports, note you will need to have the fix
   for 12031 applied
4/ Check that the mails have the correct From, Replyto and ReturnPath set
   The rules are
   If the values are set in the branch use that, else use the syspref

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-27 10:38:47 -03:00
Jonathan Druart
fbc4e94d7f Bug 11945: The script should die if the pref are not filled
If the 2 prefs are not defined, the script should die.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-24 10:02:01 -03:00
5e7e48b9c5 Bug 11945: SQL syntax error in delete_expired_opac_registrations.pl
This patch corrects a syntax error, adds some comments to the usage
instructions and adds a count of the removed borrowers (with verbose
flag on).

Note that this is a dangerous script. It will delete your patrons
in patron category PatronSelfRegistrationDefaultCategory.
If you do not use this as a temporary category, you should NOT run this
script.

Test plan:
Check PatronSelfRegistrationDefaultCategory.
Check PatronSelfRegistrationExpireTemporaryAccountsDelay.
Based on these two settings, check the number of patrons to be deleted (date
enrolled should be before NOW minus the delay).
Backup your data and run the script.
Check the number of deleted borrowers.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-24 10:02:01 -03:00
cb33584de7 Bug 11926 [Follow-up] HEA - Render community koha statistic usages
This follow-up makes some language and spelling corrections to the
system preference descriptions. I have updated the preferences heading
to read "Share anonymous usage statistics" in order to emphasize the
anonymous aspect.

I have also updated the main preference name from "UsageStatsShare" to
"UsageStats" so that it is alphabetized first in the list of
"UsageStats*" preferences. I think this will make it clearer to the Koha
administrator what feature they are configuring.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-22 15:17:23 -03:00
Katrin Fischer
ceaf9243aa Bug 11926: Follow-up - Fix new cronjob's file permissions
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-22 15:17:17 -03:00
Jonathan Druart
7d5105968e Bug 11926: Add new sysprefs and fix encoding issues
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-22 15:17:09 -03:00
Jonathan Druart
3da1960d21 Bug 11926: Add a cronjob
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-22 15:17:07 -03:00
simith
a7321813f4 Bug 8687 - Overdues: Add utf-8 support to HTML and additional fields to CSV output
This patch contains small improvements made in the overdue_notices.pl script.

- UTF-8 support in the HTML output
- Add the phone, cardnumber, branchname and letternumber columns
  to the csv output

Testing:

I) Create an issue overdue (intranet):
0) Enter in a patron account, add some characters like
   ユーザー別サイト in his address
1) Check if in Patron category administration the overdue column
   is YES for his code
2) In Tools -> Notice triggers define first delay = 7, letter
   Overdue notice. Nothing for second ni third
3) Check if Tools -> Notices and slips, code overdue is available
4) checkout a book with a retard more than 7 days.
5) Check if Adminstration -> Defining circulation and fine rules
   for all libraries has fine rules for his patron category,
   item type book.

II) Before applying the patch
0) Run misc/cronjobs/overdue_notices.pl -n -html .
1) Open the file notices_"date".html in a brower
2) Validate the characters are not correct

III) After applying the patch
0) Run misc/cronjobs/overdue_notices.pl -n -html .
1) Open the file notices_"date".html in a brower
2) Validate the characters are correct
3) Run misc/cronjobs/overdue_notices.pl -n -csv temp.csv
4) Validate phone, cardnumber, branchname and letternumber
   columns and values

Sponsored-by: CCSR

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Added the Sponsored-by line.
2014-10-19 11:38:02 -03:00
Rafal Kopaczka
4114495d05 Bug 13035: Overdue notices send notices for due date in future.
Overdue notices, script uses method days_between which returns always
positive value of days, no mater if due_date is higher or lower from
date_to_run. This causes overdue notices to be send for real overdue and
for checkouts with due date in future, which have same days_between as
in notice triggers.

To reproduce:
1. Set up overdue notice triggers for eg. 2 day.
2. Checkout items for 2 borrowers first gets item with due date 2 days
in past and second gets 2 days in future.
3. run ./misc/cronjobs/overdue_notices.pl -n -t
4. watch that notices was generated for both of them.

To test:
1. Repeat steps 1,2
2. Apply patch
3. run ./misc/cronjobs/overdue_notices.pl -n -t
4. should be 1 notice for borrower with overdue item.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, just adds an additional test.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-19 11:37:44 -03:00
Bernardo Gonzalez Kriegel
0bcffb973e Bug 12999: Untranslatable string on enhanced_content.pref
This patch modifies LangInstaller.pm to catch strings
on syspref files that have no associated syspref

To test:
1) Update strings for your preffered language
2) Check that the string "you can only choose one source"
is not present on xx-YY-pref.po file

3) Apply the patch
4) Update strings again
5) Check the strig now appears [ and another one :) ]

Doing a diff before and after will show
 # Enhanced Content > All
 msgid "enhanced_content.pref## <strong>NOTE:</strong> you can only
 choose one source of cover images from below, otherwise Koha will show
 the images from all sources selected."
 msgstr ""

 # Local Use
 msgid "local_use.pref## Nothing defined yet."
 msgstr ""

6) Translate the string
7) Install your language, check Administration > System preferences >
   Enhanced content > All
   (on your languge) and check the string is now translated

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

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-14 11:06:28 -03:00
Jonathan Druart
cf2eb49448 Bug 12538: Remove Solr without breaking anything else
Since nobody is currently working on the zebra layer introduced by bug
8233, Solr won't never work.
Some code has been introduced in 3.10 to prove several search engines
can cohabit into Koha but no help/fund has been found to go ahead.
It is useless to keep this code and to maintain an ambiguous situation.

I think the indexes configuration page could be restore later if someone
else introduces a new search engine into Koha.

Test plan:
Look at the code introduced by bug 8233 and verify all is removed.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-11 16:59:04 -03:00
Bernardo Gonzalez Kriegel
9e3dd1f2b7 Fix of translation files as requested by RM
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-11 16:55:40 -03:00
Holger Meißner
d02f87a298 Bug 11577: Add an automatic renewal cronjob
This patch adds a new cron script automatic_renewals.pl and a new
entry in crontab.example.

To test:

1) You need a few issues, some with automatic renewal and some without.
2) Confirm that each time you run misc/cronjobs/automatic_renewals.pl
   those issues are renewed that meet all of the following criteria:
   - automatic renewal has been scheduled either by issuing rule or by
     checkbox on the checkout page
   - the number of allowed renewals isn't exceeded
   - renewal isn't premature (No renewal before)
3) Confirm that all other issues are not affected.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 19:23:23 -03:00
Bernardo Gonzalez Kriegel
7a325b55d1 Bug 12061 - tmpl_process3.pl - Include/exclude file by name
This patch adds options to include/exclude files by matching their names.
Also modifies current code to check only filenames (not dirs)
Checking is case insensitive !!

NOTE: The difference between -f and -m is subtle, but important.
They differs mainly on update,: -f do a merge, -m a replace

To test after patch:

A) Include only 'normarc'
1. create
cd misc/translator
perl tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/bootstrap/en -s normarc.po -r -m normarc
- check provenance of strings
egrep "^#:" normarc.po | cut -d":" -f2 | sort | uniq
- only files with normarc in their names must be present

2. update
perl tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/bootstrap/en -s normarc.po -r -m normarc
- repeat check

3. install
mkdir test
perl tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/bootstrap/en -o ./test -s normarc.po -r -m normarc
- check name of created files

rm -rf test normarc.po

B) Exclude
4. create
perl tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/bootstrap/en -s xnormarc.po -r -n normarc
- check provenance
egrep "^#:" xnormarc.po | cut -d":" -f2 | sort | uniq | grep -i normarc
- there must be no results

5. update
perl tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/bootstrap/en -s xnormarc.po -r -n normarc
- check provenance

6. install
mkdir test
perl tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/bootstrap/en -o ./test -s xnormarc.po -r -n normarc
- check files
find test | grep -i normarc
- there must be no results

You can also try another combination, use for example "-m patron -m user -m bottom" (or use -n)
or mixed "-m marc -n normarc", do create/install and look filenames

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-01 11:00:15 -03:00
Bernardo Gonzalez Kriegel
b96a209ff7 Bug 12061 - tmpl_process3.pl - Multiple source dir
This patch adds the option to use multiple source
dirs for tmpl_process3.pl on create/update actions.

To test after patch:
A) Old
1. install
cd misc/translator
perl tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/bootstrap/en -s bootstrap.po -r

2. update
perl tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/bootstrap -s bootstrap.po -r

3. install
mkdir test
perl tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/bootstrap -s bootstrap.po -r -o ./test -q
- check same number of files
ls -lR ../../koha-tmpl/opac-tmpl/bootstrap | wc -l
ls -lR ./test | wc -l

rm -f bootstrap.po

B) New
4. create from multiple sources
perl tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/prog/en -i ../../koha-tmpl/opac-tmpl/bootstrap/en -i ../../koha-tmpl/opac-tmpl/ccsr/en -s opac.po -r

5. update from multiple source
perl tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/prog/en -i ../../koha-tmpl/opac-tmpl/bootstrap/en -i ../../koha-tmpl/opac-tmpl/ccsr/en -s opac.po -r

6. install (must give an error)
perl tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/prog/en -i ../../koha-tmpl/opac-tmpl/bootstrap -s opac.po -r -o ./test

7. updated help
perl tmpl_process3.pl --help

Any other functionality must not be affected

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-01 11:00:08 -03:00
Bernardo Gonzalez Kriegel
16636c34d2 Bug 12061 - tmpl_process3.pl - Remove obsoleted strings/backups
This patch modifies the update process for PO files,
removing obsoleted strings. Currently they are removed
manually as part of the standar procedure of strings update.
Also backup files (*~) need to be removed manually.

To test:
1. Update translation files for any language, ej. fi-FI
(cd misc/translation; perl translate update fi-FI)

2. Check existence of obsoleted strings
egrep "#~ msg" misc/translator/po/fi-FI-*

3. Check existence of backup files
ls misc/translator/po/fi-FI-*~

4. Reset to HEAD and clean

5. Apply the patch

6. Update again, check there are no more obsoleted
strings nor backup files

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-01 11:00:03 -03:00
Jonathan Druart
2031c3e5ca Bug 12717: Library no longer receiving Overdue email for patrons without email address
Bug 10832 changes the fallback behavior if a patron does not have email
address: a print notice is generated into the message_queue table.
But this can cause issue for some libraries. The script should sent an
email and (generated csv, html, text file) with the list of all unsent
notices.

Test plan:
1/ Add overdue to a patron without email address (or smsalertnumber)
2/ Check email in the overdue rules configuration (or sms)
3/ Launch the overdue_notices.pl cronjob
4/ Verify the message_queue contain a print notice AND an email notice
for the library

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This works as described and restores the old behaviour for now, with
the difference that you have a print notice generated and visible
in the patron account notices tab that will say 'pending'.

We will have to figure out how we can change the workflows nicely
to have only one script deal with print notice in the future.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-08-26 15:08:33 -03:00
a6c278f8e0 Bug 12720: (QA followup) use API instead of plain SQL
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-08-24 13:19:01 -03:00
11446fcb0e Bug 12720 - Turn off Authority logging when running "bulkmarcimport.pl"
This patch turns off the AuthoritiesLogging syspref when running the
bulkmarcimport.pl script.

It also temporarily disables the syspref caching which will have
been making the CataloguingLogging handling ineffectual. (That is,
updating the CataloguingLogging syspref in the script wouldn't
have an effect as the original cached value would be used anyway.)

_TEST PLAN_

0) Turn on "AuthoritiesLogging" syspref
1) Load an authority record using bulkmarcimport.pl
2) Note a new Authorities entry in action_logs

3) Apply the patch

4) Repeat Step 1
5) Note that no new entry is made in action_logs

(Bonus points: Do the same thing with CataloguingLogging and a
bibliographic record.)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with biblio and auth imports.
Work as described, no koha-qa errors.

Note: If you begin to load a big file and get impatient and hit ^C,
seems that current syspref value is lost...

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Patch copies what was already done for the CatalougingLog, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-08-24 12:49:49 -03:00
eb81090c1b Bug 12781: update_dbix_class_files.pl should use the preserve_case option
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changes make sense, tested by confirming that a patron
modification request for B_<columns> no longer results in
an error message.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-08-21 09:35:30 -03:00
Chris Cormack
1cc01f1ff7 Bug 12529: Add a syspref to make overdue notices respect holidays
Test Plan

Set up some overdue triggers, for example 5,10,15
Set up some holidays
Create some items that are past due (one due 5 days, 10 days ago etc)
Run the overdue notices script (misc/cronjobs/overdue_notices.pl)

Notice holidays are ignored

Apply the patch,
Switch the OverdueNoticeCalendar syspref to Use calendar

Run the overdue notices again
Notice holidays are now taken into account

Sponsored-by: BSZ

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-08-15 10:56:14 -03:00
Bernardo Gonzalez Kriegel
fe0709477a Bug 9000: Followup to fix tabs & closing TT directive
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-29 16:25:56 -03:00
1e9263cb5c Bug 9000 [4] - Update to GPL v3
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-29 16:25:47 -03:00
2da15b6435 Bug 9000 [3] - Change conf key from tmpl to template
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-29 16:25:37 -03:00