Marc Véron [Sat, 5 Sep 2015 14:41:58 +0000 (16:41 +0200)]
Bug 14782: Add possibility to search patrons using the username (userid)
This patch makes it possible to search for users using the username (userid / login name).
To test:
- Apply patch
- Do searches from Home > Patrons
- Search after a full username or parts of a username with Search fields = Standard and Search fields = Userid
- Perform the searches from the top bar (expand with [+]) and from the "Filters" part at the left
- Make sure that other searches behave as before
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@unc.edu.ar>
Bug 14801: Fix Reserves.t -- Follow-up for ChargeReserveFee
The problem making some tests fail, actually was the unneeded addition
of zero accountline records by ChargeReserveFee, called by AddReserve.
The balance is still zero, but a test like !$var responds differently
when var is 0.00 instead of 0 or undef.
This patch adjusts the test in ChargeReserveFee in order to prevent
adding these records with 0.00.
The first patch that adjusts the tests in Reserves.t is not strictly
needed anymore, but can stay.
Test plan:
[1] Run t/db_dependent/Reserves.t
[2] Run t/db_dependent/Reserves/GetReserveFee.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Fix the following errors:
not ok 59 - Bug 14464 - No fines at beginning
ok 60 - Bug 14464 - 1st reserve correctly created
not ok 61 - Bug 14464 - No fines after cancelling reserve with no charge configured
ok 62 - Bug 14464 - 2nd reserve correctly created
not ok 63 - Bug 14464 - No fines after cancelling reserve with no charge desired
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended the x==0 test with !x || x==0 to include 0.00 and prevent warn. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Jonathan Druart [Mon, 14 Sep 2015 12:22:21 +0000 (13:22 +0100)]
Bug 14655: Fix wording
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed a missing space after Error: :) Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Jonathan Druart [Tue, 18 Aug 2015 17:15:02 +0000 (18:15 +0100)]
Bug 14655: Add a warning on the about page if patrons have requested privacy
New warning on the about page if at least a patron has requested a
privacy on checkin but the AnonymousPatron is not set to a valid patron.
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@unc.edu.ar>
Jonathan Druart [Tue, 18 Aug 2015 17:10:37 +0000 (18:10 +0100)]
Bug 14655: Add a warning if the checkin will fail
On the checkin and checkout page, the checkin will fail if the patron
has requested the privacy and the AnonymousPatron is not correctly set.
This patch adds a warning message on both pages.
Test plan:
0/ Be sure you don't have any patron with privacy=2 (Never)
1/ Set OPACPrivacy, not AnonymousPatron
2/ Go on the checkin, you should a warning (same as before this patch).
3/ Set the privacy=2 for a patron
4/ Go on the circulation page, a warning should appear (for this
specific patron)
5/ Check an item out to this patron
6/ Check the item in on the checkin page.
The item is not checked in and you get a specific message for this
patron.
Confirm other/correct situations don't trigger the messages.
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@unc.edu.ar>
Mark Tompsett [Mon, 25 May 2015 04:22:07 +0000 (00:22 -0400)]
Bug 12357: Following whitespace failures on koha qa test tools.
TEST PLAN
---------
1) Apply all patches before this.
2) run koha qa test tools
-- whitespace failures
3) Apply this patch
4) run koha qa test tools
-- no whitespace failures.
NOTE: More tabs were fixed than required, to also clean up a little indenting.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Koha-qa tools now happy
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Mark Tompsett [Mon, 25 May 2015 04:06:24 +0000 (00:06 -0400)]
Bug 12357: Fix comma issues related to additional fields.
TEST PLAN
---------
1) Apply patches, except this one.
2) prove t/db_dependent/Record.t
-- fails like comment #38
3) Apply this patch
4) prove t/db_dependent/Record.t
-- now it passes.
5) koha qa test tools.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Make test work, koha-qa problems fixed in next patch
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Fri, 23 Jan 2015 12:11:36 +0000 (07:11 -0500)]
Bug 12357: Enhancements to RIS and BibTeX exporting
Some libraries would like to be able to add arbitrary fields to both the
RIS and BibTeX citation formats that a record can be saved as from the
staff intranet and public catalog. In addition, they would like to be
able to override the default record type and use Koha's itemtype as the
record type for those formats as well.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Add the following to the new syspref RisExportAdditionalFields:
TY: 942$c
LC: 010$a
NT: [501$a, 505$g]
4) Find or create a record with an 010$a (lccn) field, a 501$a field,
a 942$c field, and multiple 505$g fields.
5) Locate the record in the catalog, choose "Save" and select RIS
6) Inspect the downloaded file, note the replaced TY field, the LC
field, and multiple NT fields
7) Add the following to the new syspref BibtexExportAdditionalFields:
'@': 942$c
lccn: 010$a
notes: [501$a, 505$g]
9) Using the previously selected record, choose "Save" and select BIBTEX
10) Inspect the downloaded file, note the lccn, the multiple note
fields, and the new record type value
Signed-off-by: Frederic Demians <f.demians@tamil.fr> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch reverts old hidden values to marc_subfield_structure.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14683: [QA Follow-up] Similar change for staff
Script memberentry.pl contained a similar line.
Solution is simpler here.
Test plan:
[1] Add, change or clear the sms number at staff side.
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@theke.io>
Marcel de Rooy [Fri, 28 Aug 2015 07:13:09 +0000 (09:13 +0200)]
Bug 14683: [QA Follow-up] Mixup between mobile and smsalertnumber
This is an issue discussed on older reports already in the past.
Column mobile in borrowers is actually 'Other phone', not necessary a
mobile number. The name of the field is confusing. (Renaming it is
outside the scope of this report.)
The field that we are editing here is smsalertnumber. It should not be
compared with mobile at all.
What could be the side-effect of this correction?
===
First, the change is only relevant for libraries with pref SMSSendDriver
enabled.
In the past patrons editing their message preferences saw mobile (read:
other phone) in their smsalertnumber field (if the latter was still empty).
If they saved it, it was copied to smsalertnumber.
This change does not affect these patrons. They just have the same number
in two columns. No big deal.
What if a patron does not yet have a smsalertnumber? In that case no sms
is sent in Letters.pm. So no change in behavior. If he submits
opac-messaging now, he will no longer copy his other phone to smsalert [we
cannot assume that it was mobile anyway!]. If he enters a mobile number,
it will be saved correctly in the right field.
Conclusion: this change will not break things or hurt anyone. It only
prevents unwanted copying other phone to smsalertnumber.
Also modified the compare to prevent uninitialized warnings.
And removed a commented warn.
Test plan:
[1] Add, edit or delete the SMS number on opac-messaging regardless of
the value of Other Phone (in the badly named mobile field).
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@theke.io>
Joonas Kylmälä [Wed, 19 Aug 2015 11:42:50 +0000 (11:42 +0000)]
Bug 14683: Unable to clear SMS number
Enables to clear SMS number.
To test:
1. Go to opac-messaging.pl
2. Insert SMS number and submit
3. Clear SMS number and submit
4. Observe that the sms number did not change
5. Apply patch
6. Clear SMS number and submit
7. Observe that the sms number changes
Sponsored-by: Vaara-kirjastot Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Adding a follow-up.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14621: Messaging preferences table needs to be sorted
I have been working with messaging preferences and I noticed a weird issue in Firefox on Ubuntu.
On messaging preferences page, the table is unsorted and the content in rows are generated randomly
on every page refresh. When you select/deselect checkboxes and refresh the page (without posting the changes),
Firefox will remember your choices. Now the issue is that when the table is unsorted and the rows keep
changing on page refresh, Firefox has trouble remembering your choices. This makes it appear as if the
checkboxes are magically changing values on each page refresh.
Here is a patch that prevents this problem by sorting the messaging settings.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Mon, 31 Aug 2015 13:36:02 +0000 (09:36 -0400)]
Bug 14760: Disabled courses display in the course reserves list for items
If an item is on reserve for two courses but one of those courses is
disabled, both courses are still listed on opac-detail.pl!
Test Plan:
1) Enable course reserves
2) Create two courses
3) Place one item on reserve for both courses
4) Disable one of the two courses
5) View the record details for that record/item
6) You should see both courses listed in the course reserves column
7) Apply this patch
8) Reload the page
9) You should now only see the active course in the course reseves column
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>
Jonathan Druart [Tue, 4 Aug 2015 09:38:29 +0000 (10:38 +0100)]
Bug 14470: Do not allow renew for on-site checkouts
At the opac, the renew checkbox should not be displayed if it's an
on-site checkout (same on the intranet).
On the way, this patch adds a specific message to the intranet if the
librarian try to renew an on-site checkout.
Indeed before this patch a renew was allowed if the barcode was scanned.
Test plan:
1/ Create an on-site checkout for a patron
2/ Confirm that the checkbox 'renew' is not displayed on the checkout
list tables
3/ At the OPAC, the renew should not be allowed (no checkbox)
4/ Try to check the item out to the same patron, confirm that you get a
specifig message to inform you the renew is not allowed for on-site
checkouts.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changed 'issue' to 'item' in the error message. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch makes the 'schema' param mandatory. It is passed in every
call on the current codebase, so it makes no harm now, but makes
the code less error-prone.
Tests for this situation are added to t/Koha_MetadataRecord.t (schema
param is omitted and new() returns undef and a carped warning).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14639: Extend Koha::MetadataRecord to handle serialization format and record id
The description of this changes is on the regression tests commit
message.
To test:
- Apply the test patch
- Run
$ prove t/Koha_MetadataRecord.t
=> FAIL: Tests fail because changes are not implemented
- Apply this patch
- Run
$ prove t/Koha_MetadataRecord.t
=> SUCCESS: tests pass
- Run
$ prove t/Koha_Util_MARC.t
=> SUCCESS: it still passes
- Sign off :-D
NOTE: Tested as above. Read code. Seems to cover all cases.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14639: (regression tests) Extend Koha::MetadataRecord to handle serialization format and record id
In order to use Koha::MetadataRecord as a container for moving records
around it is important to let it carry the serialization format
of the record object it was built with, so it is easier and cheaper to
make decisions about records.
This patch introduces regression tests for the changes to be made.
The 'format' param is introduced, and also sets default values:
schema => 'marc21'
format => 'MARC'
A new (optional) 'id' param is added so the record carries its own id outside
of it.
The default behaviour is preserved, and no changes are needed in places
Koha::MetadataRecord is used.
->new also returns undef if no record is passed, and raises a carped warning.
To test:
- Apply this test patch
- Run the new tests
$ prove t/Koha_MetadataRecord.t
=> FAIL: Tests shoud fail as the changes are not implemented on Koha::MetadataRecord
Edit: made serialization format be upper-case to match what is used on Koha::Filter's
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14702: [QA Follow-up] More readable variable names, less queries
The names are much better now :)
Combined the queries for items and issues.
Only check the number of holds when needed.
Test plan:
Verify the changes here by running the unit test again.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Fri, 21 Aug 2015 11:00:11 +0000 (13:00 +0200)]
Bug 14702: Unit tests for GetReserveFee and ChargeReservesFee
Test plan:
Run the test: t/db_dependent/Reserves/GetReserveFee.t
Signed-off-by: Joonas Kylmala <j.kylmala@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Fri, 21 Aug 2015 09:44:55 +0000 (11:44 +0200)]
Bug 14702: Refactor GetReserveFee
The code of GetReserveFee was not very clear.
What it did was: check if there are some items not issued. If so and there
are no holds, calculate no fee.
While doing so, I moved the code to charge the fee (in AddReserve) to a small
new sub ChargeReserveFee.
There is no change in behavior.
The follow-up patch adds unit tests.
Test plan:
[1] Make sure that a patron category (X) includes a hold fee.
[2] Select a biblio with 2 items.
[3] Issue one item to another patron.
[4] Place a hold on this biblio by patron with category X. No charge?
[5] Cancel the hold from the previous step.
[6] Use another patron to place another hold on this biblio.
[7] Place hold again by patron with category X. Is it charged?
[8] Cancel that hold again. Issue the second item to another patron.
[9] Place hold again by patron with category X. Is it charged again?
Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 15 Jul 2015 10:50:18 +0000 (11:50 +0100)]
Bug 12525: Prevent adding several patron lists with the same name
If you add patron to a patron list, from the patron search result, a
list is created when you click on "Save".
The list is considered as new each time.
To reproduce:
1/ Launch a patron search
2/ Select 1 patron, and create a new list 'aaa'
3/ Select another patron and click Save again
2 lists are created
Test plan:
1/ Launch a patron search
2/ Select 1 patron, and create a new list 'aaa'
The dropdown list should be populated with this new list, and should be
selected
3/ Select another patron and click Save again
Only 1 list should be created
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@theke.io>
Jonathan Druart [Wed, 15 Jul 2015 10:36:26 +0000 (11:36 +0100)]
Bug 12525: FIX patron lists dropdown is empty
On the patrons home page, the dropdown list is not populated.
Test plan:
1/ Go on the patrons home page (members/members-home.pl)
2/ Launch a search
3/ The dropdown list close to "Add selected patrons to" should contain
all your patron lists
NOTE: Initially tested with both which created lists.
git reset --hard origin/master
And then dropdown list was missing them.
Applied just this one, and they were listed.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> 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@theke.io>
Lyon3 Team [Fri, 5 Jun 2015 13:37:57 +0000 (15:37 +0200)]
Bug 14343: Incorrect links to results pages in Receive Shipment List
Numbered links have incorrect url. Links to result pages
don't work in Receive Shipment List (but fortunately, Next
and Previous buttons work) It's because the booksellerid is
not furnished in the url.
Test Plan :
1) Go to Acquisitions module, enter a bookseller name that you
know you can get many page of invoices for and search for it.
2) click on Receive shipment button.
3) On bottom of the first results page, click on page number 2
link. (cf joined screencast)
You'll see that the results include invoices from other
booksellerid. Indeed, I suppose that you get results from all booksellerid.
Intall patch and redo 3 steps.
NOTE: I did not follow this test plan.
I read the acqui/parcels.pl code.
The template parameter numbers is assigned in a function which has
no reference to booksellerid at all!
Additionally, the booksellerid is set directly elsewhere.
It is also strange that the booksellerid references before and after
this loop do not use the numbers.booksellerid, but just booksellerid.
The change from numbers.booksellerid to booksellerid is correct!
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fridolin Somers [Thu, 6 Aug 2015 07:36:42 +0000 (09:36 +0200)]
Bug 14649: Followup - correct budget_period_id in fund name link
Now that fund name is displayed in the table as a link, you see that arg budget_period_id is never defined in this link.
This is because the template var is [% budget_line.budget_period_id %] instead of [% budget_period_id %].
This looks like a mistake when converting from tmpl to tt.
Test plan :
- Without patch
- Look for a planning with funds :
/cgi-bin/koha/admin/aqplan.pl?budget_period_id=2&authcat=MONTHS
- Click on a fund name
=> You see in URL that budget_period_id is empty :
/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_id=6&budget_period_id=
- Apply patch
- Look for a planning with funds :
/cgi-bin/koha/admin/aqplan.pl?budget_period_id=2&authcat=MONTHS
- Click on a fund name
=> you see in URL that budget_period_id is defined like in planning page :
/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_id=6&budget_period_id=2
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@theke.io>
Jonathan Druart [Thu, 6 Aug 2015 06:19:06 +0000 (07:19 +0100)]
Bug 14649: Fix regression - display fund name on budget planning
A patch from bug 11714 removes 'budget_name_indent', which was useless.
The script and the template should use the budget_name value.
Note that this patch impacts the CSV export, which does not work, so it cannot be
tested.
Test plan:
Edit a fund and click on one of the Planning value (by months, etc.)
The "Fund name" column should be correctly populated with the fund
names.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> 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@theke.io>
Right after checking out, a small box appear with "Checkout out: Some Title (32154001669305). Due on 24/09/2015".
The title doesn't appear anymore (since the move to db schemas). This fixes it.
Test:
1) checkout ANY item, for ANY user
2) Look at summary right below the checkout input box. The title doesn't show up.
3) apply patch, reproduce same steps (after checkin if same item). Title appears.
Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Todo: You need to track what are the queries generated here. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Mason James [Sat, 25 Jul 2015 08:51:52 +0000 (20:51 +1200)]
Bug 14602: Fix failing t/Creators.t test
to test..
1/ run t/Creators.t test from git repo, get a FAIL
2/ apply patch
3/ repeat step 1, get a PASS
mason@xen1:~/g/k/3.16.x$ sudo koha-shell -c 'export PERL5LIB=/home/mason/g/k/3.16.x ; cd /home/mason/g/k/3.16.x ; prove -v t/Creators.t' k316x1
t/Creators.t ..
1..16
ok 1 - use C4::Creators;
ok 2 - use C4::Creators::PDF;
ok 3 - testing new() works
ok 4 - testing pdf file created
ok 5 - testing Add() works
ok 6 - testing Bookmark() works
ok 7 - testing Compress() works
ok 8 - testing Font() works
ok 9 - testing FontSize() is set to 12 by default
ok 10 - testing FontSize() can be set to a different value
ok 11 - testing Page() works
ok 12 - testing StrWidth() returns correct point width
ok 13 - testing Text() writes from a given x-value
ok 14 - testing Text() writes to the correct x-value
ok 15 - testing End() works
ok 16 - test file /tmp/4YjPQDExeS created OK
ok
All tests successful.
Files=1, Tests=16, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.48 cusr 0.05 csys = 0.57 CPU)
Result: PASS
Signed-off-by: Liz Rea <liz@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
When having more than 20 (or numSearchResults) reviews waiting to be approved in <site>/cgi-bin/koha/reviews/reviewswaiting.pl?status=1,
the paging at the bottom only offset by 1 entry, instead of moving a full page (20 entries) ahead.
The simple fix uses 'page' instead of 'offset'.
TEST:
1) Modify numSearchResult preference to a low (5?) value.
2) create X comments, where X is greater than the value above.
3) approve them all (although this step is probably unnecessary)
4) Go to tools >> comments (approved comments tab)
5) You see X entries. Click on page 2 at bottom. Link should show "offset=2")
6) You get same results, except the first one which "slided out".
Apply patch, redo step 4-5.
With patch, paging 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>
Amit Gupta [Mon, 29 Jun 2015 16:12:08 +0000 (21:42 +0530)]
Bug 14472: Wrong ISSN search index in record matching rules
To Test
---------
1) Apply the patch
2) Export some MARC bibliographic records from Koha
3) Import those same MARC bibliographic records using the
"ISSN(022$a)" record matching rule.
4) The incoming records should match perfectly
5) Check the mysql tables (marc_matchers, matchpoints,
matcher_matchpoints, matchpoint_components,
matchpoint_component_norms) to make sure the values were
inserted as expected.
For new Koha installation
1) create the koha database
2) Go to the staff client page, and do a "fresh" install making
sure to select lots of optional marc 21 matching rules so
the .../marc21/optional/marc21_default_matching_rules.sql
gets triggered.
3) Check the mysql tables (marc_matchers, matchpoints,
matcher_matchpoints, matchpoint_components,
matchpoint_component_norms) to make sure the values were
inserted as expected.
Bug 14472 - Added Atomic Update to fix wrong issn search index
- Fix comments
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 27 May 2015 12:02:25 +0000 (14:02 +0200)]
Bug 14098: Implement the copy_and_replace action for MTT
This patch implements the copy and replace action for the marc
modification templates.
Instead of copying a field/subfield, it will erase the destination
fields/subfields.
Test plan:
Find it yourself.
Compare the differences between the copy and the copy_and_replace
actions.
The easier way to test is to 1/ create a complete record, 2/create some
modification templates and 3/ use the batch record modification with the
"preview" function.
QA note: I kept the same tests as "copy" and, if no change were
expected, I noted them "(same as copy)", to be sure this new action won't
introduce regression on these tests.
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@theke.io>
Jonathan Druart [Wed, 27 May 2015 11:38:38 +0000 (13:38 +0200)]
Bug 14098: Add copy_and_replace action to MMT
This patch add the new value for the MTT action.
It updates the marc_modification_template_actions.action DB field to
allow 'copy_and_replace_field'.
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@theke.io>
Jonathan Druart [Wed, 27 May 2015 11:34:09 +0000 (13:34 +0200)]
Bug 14098: Remove unedeed subroutines
Just some cleaning before to continue, _copy_field and _copy_subfield did not
do anything useful.
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@theke.io>
Jonathan Druart [Wed, 27 May 2015 10:51:37 +0000 (12:51 +0200)]
Bug 14098: FIX Copy a subfield should not update the original field
There is an inconsistency in the copy action:
Given the following control sample:
245 _aThe art of computer programming
_cDonald E. Knuth.
300 _aA_exists
_bB_exists
If we apply action (a) Copy the whole field 245 to 300, we get:
245 _aThe art of computer programming
_cDonald E. Knuth.
300 _aA_exists
_bB_exists
300 _aThe art of computer programming
_cDonald E. Knuth.
If we apply action (b) Copy the subfield 245$a to 300$a, we get:
245 _aThe art of computer programming
_cDonald E. Knuth.
300 _aThe art of computer programming
_bB_exists
In (a) the field is copied but in (b) the subfield is erased.
We should be consistent and don't erase the destination field.
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@theke.io>
Fridolin Somers [Tue, 25 Aug 2015 09:33:04 +0000 (11:33 +0200)]
Bug 14721: OAI-PMH must return error when no results
When getting records from OAI-PMH, an error must be returned if there is no results.
See : http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions
Test plan :
- Enable OAI webservice
- Perform a query that will return no results. ie : /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml&from=2099-12-30&until=2099-12-31
=> Without patch you get a response with :
<ListRecords/>
=> With patch you get a response with error code :
<error code="noRecordsMatch">No records match the given criteria</error>
- Check a good query returns still results
- Same test with ListIdentifiers verb
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Add subfields l, n and o for better UNIMARC compliance
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Note: I just did a code audit here, as I don't know enough about
UNIMARC to know if the 4XX fields should have these subfields.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14651: Koha::Item->effective_itemtype fallback to bib-level
In some situations (bad migrations, old bugs that introduced bad data,
people having bib-level itypes for ages and switching to item level...)
the user ends with undex itype values for items.
The current code, if the user has item_level-itype set, just returns
undef. It should fallback to bib-level. In order to avoid hiding the problem
a warning is raised.
To test:
- Run the regression tets:
$ prove t/db_dependent/Items.t
=> FAIL: tests fail.
- Apply the patch
- Run the tests again
=> SUCCESS: The tests now pass.
- Sign off :-D
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14651: (regression test) fallback to bib-level if itype is undef
Koha::Item->effective_itemtype should fallback to biblio-level itemtype
even if item-level item types are set, in the case the item has no itemtype
set (bad migration, bad old code).
To test:
- Run
$ prove t/db_dependent/Items.t
=> FAIL: Koha::Item->effective_itemtype doesn't work properly
Edit: Added a test for a warning when falling back as per QA request
and because it made a lot of sense :-D
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 3 Sep 2015 15:03:17 +0000 (16:03 +0100)]
Bug 14717: Prevent 0000-00-00 on updating a patron
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Chris Cormack [Mon, 24 Aug 2015 22:00:20 +0000 (10:00 +1200)]
Bug 14717: Invalid dates in debarred column
To test
1/ Import a patron using the patron import tool, make sure they have
no debarred column in the file
2/ Check the database, notice the debarred column is 0000-00-00
3/ For bonus points, checkout an item to that borrower, then check it in
notice Koha errors
4/ Apply patch
5/ Import a new patron
6/ Notice column is now NULL and that checkins work
Signed-off-by: Eugene Espinoza <eugenegf@yahoo.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 14 Jul 2015 12:12:46 +0000 (13:12 +0100)]
Bug 11273: FIX barcode generation in acquisition if hbyymmincr
When AutoBarcode is activated and you have set AcqCreateItem to 'on
order' there is a Javascript error when you try to generate a barcode
for the item:
TypeError: document.f is undefined
http://localhost:8080/intranet-tmpl/lib/jquery/jquery.js
Line 11
Test plan:
0/ a. Set AutoBarcode to hbyymmincr
b. Set AcqCreateItem to 'on ordering'
c. Set the plugin barcode.pl to the barcode field for the default
and the ACQ frameworks
1/ Go on the add items page (cataloguing/additem.pl) and confirm that
the plugin works as expected.
2/ Go on the New order page (acqui/neworderempty.pl) and confirm that
the plugin works as expected.
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>
Bug 13585: Add a cronjob which send UsageStats monthly.
This patch introduces entries for monthly running the share_usage_with_koha_community.pl
script to the packages and also the crontab.example file for manual
installs use.
Edit: I fixed the Copyright line
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>
Jonathan Druart [Tue, 14 Jul 2015 17:07:37 +0000 (18:07 +0100)]
Bug 14354: Prevent edition of items from other branches if IndependentBranches is on
If IdependentBranches is ON, to edit/delete items from other branches
you need to be superlibrarian.
Currently a "simple" staff user cannot edit them from the edit item page
but from the catalogue detail page.
The edit links should not be displayed on this table.
Test plan:
O/ Set IndependentBranches to "Prevent".
Create a record and add 2 items:
Set homebranch to L1 for item I1.
Set homebranch to L2 for item I2.
1/ With a superlibrarian user, you should be able to edit both items.
2/ With a "simple" user attached to L1, you should only be able to edit
I1. The edit links should not be displayed for I2.
Note that the checkbox is displayed on the catalogue detail page (item
list), but on the batch tools, it won't be possible to select non-modifiable
items.
TODO: Add a server-side check. Indeed it is still possible to edit an
item if the user know the url.
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>
Joonas Kylmälä [Mon, 31 Aug 2015 05:06:16 +0000 (05:06 +0000)]
Bug 14526: (follow-up) add a space before equals sign
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The change in MoveReserve from the previous patch begs for a test.
Here we add some to Reserves.t.
In all six tests we place a hold, move it and check the reserves again.
Depending on the status of ConfirmFutureHolds, and the reservedate the
hold should be moved or not.
Test plan:
Run the unit test.
Bonus: If you run Reserves.t by applying this patch but without the first
patch that changed MoveReserve, tests 60 and 61 should fail:
not ok 60 - MoveReserve filled future hold now
not ok 61 - MoveReserve filled future waiting hold now
This may further illustrate the need of the first patch.
Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14526: MoveReserve should look at future holds too
At checkout a hold for the same borrower is considered to be filled.
It is consistent to do the same for holds of the same borrower within
[ConfirmFutureHolds] days (if non-zero).
This goal is achieved by adjusting the CheckReserves call within
MoveReserve, adding the lookahead parameter.
I used this occasion to revisit other calls of CheckReserves:
- transferbook: no need to add lookahead; a future hold should not block
a transfer;
- CanBookBeIssued: no lookahead; future hold does not block an issue;
- CanBookBeRenewed: idem.
- GetOtherReserves (only used in circ/returns): this call might be a
candidate for lookahead too, but I leave that for another report. It is
in the context of checkin and transfer, not checkout.
Test plan:
[1] Set ConfirmFutureHolds to zero days. (You may also need to enable
AllowHoldDateInFuture.)
[2] Place a hold with borrower A on biblio X for tomorrow. Also place a hold
with borrower B on X for today. (Use biblio level holds.)
[3] Check out item Y of X to borrower A. Ignore the warning for borrower B
and do not cancel the hold of B (so: confirm checkout).
Verify that X has still two holds.
[4] Check in Y (without confirming a hold).
[5] Enable ConfirmFutureHolds, say 2 days.
[6] Check out Y to A again. Ignore the warning for B (no cancel). Verify that
X now only has one hold for borrower B (the hold for A was filled).
Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Mon, 25 May 2015 15:01:46 +0000 (17:01 +0200)]
Bug 13972: Follow-up - Add unit tests for changed parts of SendAlerts
To test:
- prove t/db_dependent/Letters.t
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Mon, 25 May 2015 12:53:29 +0000 (14:53 +0200)]
Bug 13972: Include fields from subscription and serial table in serial notification email
Currently it's not possible to include information about which
issue has arrived in the serial notification notice the patron
can subscribe to from the OPAC.
The patch makes the fields from the subscription and serial
table available to the notice template.
In order to be able to print information about the correct
issue, the GetAlert has been modified to expext the serialid
as externalid when the module is issue.
git grep SendAlerts (only call with 'issue' is in Serial.pm)
To test:
- Add a subscription, select a patron notification template
- Search for the record in the OPAC
- Go to the subscription tab - More details
- Subscribe to the notification
- Edit the notice template you selected for the subscription
- add fields from subscription
- add fields from serial (serial.serialseq has the issue
information)
- Receive an issue for the subscription
- Check that you have received the notification and that
all information has been printed correctly
NOTE: notice is sent directly, not through the message_queue
Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 10 Jul 2015 15:11:48 +0000 (16:11 +0100)]
Bug 12965: Prevent to erase an existing item type
On creating an item type, if it already exists, it will replace the
existing one.
This patch prevent that and display a message to the interface.
Note: The fields are lost.
Test plan:
1/ Create an item type 'AAA', description 'AAA'
2/ Edit it, update the description with 'BBB'
3/ Create an item type 'AAA' with a description 'CCC' => you should get
a warning "already exists".
Works well, no errors
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Warning message is triggered.
Adding, editing and deleting item types still works. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Mon, 13 Jul 2015 16:34:53 +0000 (17:34 +0100)]
Bug 13943: Prevent the deletion of items if the user cancels
On the edit items page, there is some weird JS code: if the user clicks
on the delete link and then cancel, the item is deleted anyway.
It's caused by the following JS code in browser.js
$('a[href*="biblionumber="]').click(function (ev) {
ev.preventDefault();
window.location = $(this).attr('href') + '&searchid=' + me.searchid;
});
Test plan:
- Do a search with multiple results
- Go to the detail page (make sure results browser shows up!)
- Use the "Edit items" link from the toolbar
- Delete an item (try both way)
- Choose "cancel"
- Delete an item (try both way) and confirm the deletion
You should see the browser after the deletion and the item should have
been deleted correctly.
- Edit an item (try both way)
You should see the browser (did not work before this patch)
Note: Before this patch, the 2 first columns didn't contain the
edit/delete item links, now it's only the 1st one.
Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Much better! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Wed, 26 Aug 2015 12:09:53 +0000 (14:09 +0200)]
Bug 11247: Add a simple unit test for TransformHtmlToXml
The unit test is db dependent (as Jonathan correctly remarked),
since the sub checks a preference.
Test plan:
Run t/db_dependent/Biblio/TransformHtmlToXml.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Srdjan [Thu, 14 Nov 2013 06:10:30 +0000 (19:10 +1300)]
Bug 11247: Fix calls of TransformHtmlToXml
The ind_tag of TransformHtmlToXml is unused.
Some calls to this function incorrectly revert indicator and ind_tag (which
is not a problem when both are empty..)
Patch of Srdjan Jankovic, amended and signed off by Marcel de Rooy.
The following calls are fixed:
call in acqui/addorder.pl: switched indicator with ind_tag
call in acqui/addorderiso2709.pl replaced too
acqui/finishreceive.pl replaced too
These calls are fine:
two calls in cataloguing/additem.pl are fine
call in serials/serials-edit.pl is fine
call in tools/batchMod.pl is fine
The folllow-up patch adds a simple unit test.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
With AcqCreateItem=='placing an order', tested if adding an order still
worked (covered both addorder.pl and addorderiso2709.pl).
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 18 Aug 2015 17:40:31 +0000 (18:40 +0100)]
Bug 14584: Encoding broken with system preferences
The pref are double encoded.
From bug 12411:
"This will fix the encoding issues existing in 3.14 and 3.16.
The issue still appear in master but is fixed by bug 11944."
They should not have been pushed together.
Test plan:
1) You need an accentuated language installed.
2) Go to NoLoginInstructions pref, and add some accentuated message like
"Hélo médames é mècieüx"
3) refresh opac home page, message should be gibberish
4) apply patch. Message should be ok now.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Jonathan Druart [Wed, 19 Aug 2015 15:24:32 +0000 (16:24 +0100)]
Bug 14696: useless use of String::Random in catalogue/search.pl
Bug 10404 adds the use of String::Random to catalogue/search.pl but bug
11369 removes it without removing the import line.
Test plan:
git grep String::Random catalogue/search.pl
should not return anything
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@unc.edu.ar>
Jonathan Druart [Mon, 24 Aug 2015 09:07:37 +0000 (10:07 +0100)]
Bug 14709: Do not access to C4::Context->userenv from the commandline
The script dies with
Can't use an undefined value as a HASH reference at tools/export.pl
line 149.
if it is called from the command line.
This is introduced by bug 13040.
The C4::Context->userenv is not defined in this case.
Test plan:
Execute the script using the command line.
With the patch applies you should not get the error.
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@unc.edu.ar>
Jonathan Druart [Tue, 4 Aug 2015 09:00:51 +0000 (10:00 +0100)]
Bug 14205: Deleting an Item/Record does not remove link to course reserve
A constraint is missing on the course_reserves.ci_id field.
This patch adds it and removes orphan rows.
Test plan:
0/ Don't apply the patch
1/ Login to Staff Site.
2/ Go to Course Reserves
3/ Create Course
4/ Add Reserve
5/ Go to item added (delete item/record)
6/ Refresh Course (see no items attached)
7/ Delete Course
8/ See course still listed in the courses (Not deleted)
9/ Apply the patch and execute the updatedatabase entry.
10/ Delete the Course
Note that the course has correctly been removed.
NOTE: Make sure to set the UseCourseReserves system preference to test.
Tested before (problem existed) and after (problem solved) update.
Dropped DB, web installed, and put in dummy data and retested.
Problem solved.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Jonathan Druart [Tue, 18 Aug 2015 08:08:09 +0000 (09:08 +0100)]
Bug 14685: Fix set guarantor for a child or professional accounts
Bug 13970 removed some useful code to automatically set the guarantor
when creating a child.
But finally there is a better way to do the job, we just need to assume
that only children or professional can have a guarantor.
Test plan:
1/ Create an adult patron and add a child.
2/ The guarantor info should be retrieved and set on the child creation
page.
3/ Create an organization and add a child
4/ The guarantor info should be retrieved and set on the adult creation
page.
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
This patch catches both cases, thanks Jonathan!
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Kyle M Hall [Fri, 5 Jun 2015 11:50:26 +0000 (07:50 -0400)]
Bug 14337: AllowRenewalIfOtherItemsAvailable counts holdable not for loan items when checking renewability
AllowRenewalIfOtherItemsAvailable checks
C4::Reserves::IsAvailableForItemLevelRequest to see if the item is
holdable, which catches not for loan values less than 0 ( i.e. holdable,
but not circ-able ). However, since this feature is about
actually checking out items to patrons, we should not count *any* not
for loan items when deciding if the available items will satisfy all
current holds.
Test Plan:
1) Enable AllowRenewalIfOtherItemsAvailable
2) Create a record with two items
3) Check out one item to a patron
4) Ensure the item is renewable
5) Place a hold on the record
6) The item should now be non-renewable
7) Add a second item to the record, but with a not for loan value < 0
8) Note the checkout is still renewable
9) Apply this patch
10) Note the checkout is now non-renewable
Works ok.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Joonas Kylmälä [Tue, 25 Aug 2015 07:24:54 +0000 (07:24 +0000)]
Bug 14703: Holidays description shows \r\n for every new line
Adds a new line for the holiday's description instead of the string
\r\n.
Test plan:
1. In tools -> Calendar look at some holiday's description
(Do a new holiday with description of multiple lines if
there is not already)
2. Notice that there is characters \r\n if someone has put
a newline in the holiday's description
3. Apply patch
4. See that the new lines show there now nicely
Sponsored-by: Vaara-kirjastot Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended slightly: no need to replace title. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Persson [Sun, 16 Aug 2015 22:01:05 +0000 (00:01 +0200)]
Bug 11584: Syspref WYSIWYG, dropdown added
This patch adds the 'Htmlarea' type to the dropdown box
introduced by bug 14268, commit 6e3bcc38.
Sponsored-By: Halmstad County Library Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds a system preference "UseWYSIWYGinSystemPreferences" to the Staff Client tab.
By default, it is off, which means that the TinyMCE WYSIWYG editor won't be shown for system
preferences with a type of "htmlarea".
However, when it's on, it will show the editor for "Local Use" preferences with a "htmlarea"
type, and for other system preferences in the "Opac", "Circulation", and "Staff Client" tabs,
which I have re-assigned. (Basically, I grepped for HTML and changed the type for all
the system preferences I found except for "IntranetNav", "OpacCustomSearch", and "OPACSearchForTitleIn",
as a WYSIWYG editor would potentially break the output for these system preferences or
add no value to them...)
_TEST PLAN_
0) Run `perl installer/data/mysql/updatedatabase.pl` after setting your environmental variables
1) Check the Opac tab to make sure that the WYSIWYG is nowhere to be seen
2) Change the "UseWYSIWYGinSystemPreferences" preference in "Staff Client" to "Show"
3) Refresh the Opac tab and notice that many system preferences now have a WYSIWYG editor
4) Try typing some text into these fields
5) Note that it gets marked as "modified"
6) Save the preference, and refresh the page
7) Note that the content has been saved
8) Take a look at how it's rendered on the actual webpage!
Signed-off-by: Martin Persson <xarragon@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Tue, 14 Jul 2015 04:17:48 +0000 (14:17 +1000)]
Bug 11584: Add TinyMCE license to about.pl
This patch adds the TinyMCE license info to about.pl
Signed-off-by: Martin Persson <xarragon@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This plugin is part of the TinyMCE distribution. It used to be in Koha, but
then someone removed it. It's useful for preferences like "opacheader" though.
*If you're using anything except IE, this should work super well. If
you're using IE, it'll probably only work for keyboard input and dragging
text within the editor box but not from outside of it. IE has worse
security, so you can probably paste using the context menu paste.
*While I think a WYSIWYG editor can be useful, there might be times
where the content is displayed differently than it is in the editor
because of higher level CSS and Javascript.
Signed-off-by: Martin Persson <xarragon@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 24 Apr 2015 08:02:19 +0000 (10:02 +0200)]
Bug 11880: Select what has been selected before
The previous patch wants to select the barcode option when the user is
on the item search for label, in all cases.
So even if 'title' is selected, a search done, and there is no result,
the barcode index is selected anyway.
In this case, the title option should be kept.
Test plan:
Confirm that the barcode option is the default choice, but other values
are kept if the search does not return any result.
Followed test plan, behaves as expected. Tested with all choices. Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Frédérick [Fri, 28 Feb 2014 21:21:46 +0000 (16:21 -0500)]
Bug 11880: Select the barcode index by default then searching for label items.
Test case:
* Go to "Tools -> Label creator -> Manage batches"
* Click on the "New batch" button
* Click on the "Add item(s)" button
* A search window should open. The "Barcode" value should be selected in the the selectbox.
Followed test case. Patch behaves as expected. Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>