Commit graph

21985 commits

Author SHA1 Message Date
b2839a7c9c Bug 11672: (followup) warnings tested
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-09-23 15:32:28 -03:00
3f2dda2f33 Bug 11672: Untranslatable dropdown on Guided Reports and dictionary
This patch removes hardcoded descriptions and sets them in the templates
using the variable content as id.

To test, create a new guided report and verify the 'module to report on' dropdown
shows as usual [1]. Functionality shouldn't get changed.

The patch also changes the dictionary pages where 'area' should be displayed/selectable
with the same strings as the guided reports. Try all the possible disctionary pages.

The last page when creating a dictionary now shows the 'area description' instead of the
code. The same happens to the dictionary list once you have dictionaries saved.

[1] The following texts get changed:
    Catalogue -> Catalog
    Acquisition -> Acquisitions

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-09-23 15:32:21 -03:00
b04f5ba8a0 Bug 11672: (regression test) get_report_areas gets tested
This patch introduces a unit test for the new get_report_areas functionality.

To try it, run
  $ prove t/db_dependent/Reports_Guided.t

It is expected to have 16 tests defined, and to fail the introduced one

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-09-23 15:32:13 -03:00
Colin Campbell
04857ed68e Bug 11633 Return Correct status if patron blocked by fines
If the patron has amassed charges that block borrowing, but we
allow staff override the information that the patron cannot
issue should be included the patron information response

This patch sets the appropriate status fields in the patron object

It restores the fee_limit member to the patron object
and calls a local subroutine to set it.

This could be done more elegantly but that would require more
major refactoring of the rather messy initializer code
in ILS::Patron

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-09-23 15:30:12 -03:00
Colin Campbell
2bd151fab5 Bug 11633 : Block Issue if fines require staff override
If a patrons fines exceed noissuescharge and we allow
staff to allow issue at their discretion via an override
the SIP process allowed charges to go ahead.
This patch closes the loophole which allowed self issue
to subvert the usual library loan policy

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-09-23 15:30:05 -03:00
Jonathan Druart
70c0b8280b Bug 7372: (follow-up) does execute this DB entry twice
Since this enh has been backported on 3.14, this patch should be applied
on 3.16 and master branch in order to update the updatedb entry.
It should not be executed twice otherwise the process is stuck on this
entry.

http://irc.koha-community.org/koha/2014-09-11#i_1567078
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-23 15:29:58 -03:00
Rafal Kopaczka
2d4d3d1bf5 Bug 12963: Columns misplaced in moremember.tt
After applying Bug 12899, in moremember page, checkouts table has
misplaced columns.

Test plan:
1. Check out title for a user. Columns in Detail page at checkout tab
are misplaced; there's no Due date column.
2. Aplly patch, everything shuld look fine now.

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

My bad! Thanks for catching this.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-19 16:41:50 -03:00
Jonathan Druart
81b9d8b8aa Bug 12953: FIX NewOrder test
The patch for bug 12827 has been written some days before bug 10402. One
occurrence of NewOrder has not been modified.

Test plan:
  prove t/db_dependent/Letters.t

should return green.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-18 10:10:17 -03:00
Katrin Fischer
3c1c5c04ce Bug 8868: Follow-up: Update boostrap documentation page
Updates the bootstrap documentation page for CancelHold.
2014-09-18 09:49:25 -03:00
Julian Maurice
45f474abdf Bug 8868: ILS-DI: CancelHold needs to take a reserve_id
CancelHold takes two parameters: patron_id and item_id.
If item_id is considered as an itemnumber, holds on title can't be
canceled.
If item_id is considered as a biblionumber, all holds on this
biblionumber (for a borrower) will be canceled.

So CancelHold have to consider item_id as a reserve_id.

- Added subroutine C4::Reserves::GetReserve
- C4::ILSDI::Services::GetRecords now returns the reserve_id
- Fix the text in the ilsdi.pl?service=Describe&verb=CancelHold page
- Unit tests for CancelReserved and GetReserve
- Do not delete row in reserves table if insert in old_reserves fails

Signed-off-by: Leila and Sonia <koha.aixmarseille@gmail.com>
Signed-off-by: Benjamin Rokseth <bensinober@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signing off, while noting a style issue in the patch review

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Placed and cancelled a hold using ILS-DI successfully.
Adding a follow-up to also update the ils-di documentation
page in the bootstrap theme.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

EDIT: I removed the changes it did to the prog theme.
2014-09-18 09:48:41 -03:00
3ce2c0235c Bug 12405 - Search links on callnumber fails on intranet results page
On intranet results page, the callnumber of items is a search like :
/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=[% result.itemcallnumber |url %]

The callnumber should be URI-escaped to avoid special URI characters like & , ? ...
If the callnumber contains some CCL words or parenthesis, the search will fail, it should be wrapped with double-quotes.

This patch adds this to catalogue/results.pl and catalogue/shelves.pl :
- uri TT filter instead of url
- adds double-quotes using there URI code %22 since its in a HTML attribute using double-quotes

Test plan :
- Edit an item callnumber with : & ABC 123
- Index zebraqueue
- Perform a search returning this item
- Click on the callnumber
=> Without this patch you get no result, because URL parameters are : idx=callnum&q=& ABC 123
=> With this patch you get results
- Set syspref QueryWeightFields off (because this is no bug if on)
- Edit an item callnumber with : AB(C) AND OR
- Index zebraqueue
- Perform a search returning this item
- Click on the callnumber
=> Without this patch you get no result, because the search contains CCL words "OR" and "AND"
=> With this patch you get results

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tested all with and without queryweightfields -
all searches from clicked call numbers for given callnumbers fail without the patch, all are successful with the patch.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described - no problems found.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-18 09:43:16 -03:00
bf26d347c1 Bug 12763 [QA Followup] - Remove tabs and trailing space
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-18 09:41:31 -03:00
Marc Véron
2aded36d08 Bug 12763: Add more information for users to OPAC Error 404 page
This patch adds more information to the OPAC 404 error page to make it more user friendly.

To test:

- Apply patch
- Is the information clearly understandable and does it contain all necessary information?
- Native speakers: Is the text correct?
- Non native speakers: Is the text easy to translate?
- Is the HTML correct?

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-09-18 09:41:16 -03:00
Marc Véron
a414f413c8 Bug 4927 - OPAC advanced search has two call number entries; remove one?
This patch removes the second Call number entry in OPAC Advanced search with Advanced option (for bootstrap).

To test:
- Go to OPAC, Advanced search, enable Advaced options
- In dropdowns you see two entries "Call number"
- Apply patch
- Verify that the second "Call number" has disappeared (below ISSN)

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template change only - no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 22:14:07 -03:00
Jonathan Druart
e2b0454ed4 Bug 12609: Add some unit tests for C4::Ratings
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 22:08:57 -03:00
bb78928bef Bug 12609 - Replace use of DBI in C4::Ratings with DBIx::Class
Test Plan:
1) Apply this patch
2) prove t/db_dependent/Ratings.t
3) Note all unit tests pass

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Also tested:
- Adding a rating
- Rating displayed on detail
- Rating displayed on results
- Modifying a rating
- Change displayed correctly on detail and results

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 22:08:48 -03:00
5d5481ed19 Bug 12890 - Improve title and breadcrumbs when editing saved SQL report
When editing an existing SQL report the page title and breadcrumbs are
incomplete:

Home > Reports > Guided reports wizard >

This patch corrects this.

To test, apply the patch and edit an existing SQL report. The page title
and breadcrumbs should be more complete:

Home > Reports > Guided reports wizard > Saved reports > Edit SQL report

Patch behves as expected
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 22:03:56 -03:00
Jacek Ablewicz
9351cde90f Bug 12697 - Surplus closing </div> in OPAC advanced search (bootstrap)
In koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt template,
there is a surplus closing </div> in line 336 (= line 332, in case
Bug 12521 is applied first):

   336: </div> <!-- / .span4 -->

which causes some minor layout problems for this page - i.e.: page
footer ("Powered by Koha" + custom footer set up in system prefrences -
if any) is "glued" to the bottom (to the language selection bar);
unless Bug 12521 is applied first, this affects the placement of the
2nd search bar as well.

To reproduce:

1/ go to the OPAC advanced search page
2/ zoom out (e.g., use Ctrl-<minus> several times) and obeserve the
result
3/ no need for step 2/ (zooming out) when using a display with
(relatively) high vertical resolution; also, this particullar problem
gets more apparent/more noticeable with MARC21/USMASRC "subtype"
options being hidden in the OPAC advanced search (Bug 9043).

To test:

1/ ensure that Bug 12521 is applied first/already applied
2/ apply patch
3/ confirm that this issue is no longer reroductible

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
On top of 12521, don't know exactly what to reproduce, but
surplus '</div>' is real (33 open, 34 close).
Everything looks correct, no koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 21:58:09 -03:00
Liz Rea
77e8cf024d Bug 12521 - Change layout a bit of the opac advanced search
To test:

Load up the advanced search and make sure it displays properly, with all of the elements within the main div, and only one container-fluid.

Patch behaves as expected. Advanced search looks much better now.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Checked visually and with HTML validator.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 21:56:31 -03:00
Marc Véron
3996fa7b47 Bug 12882 - Translations: Resolve ambiguity for word "checked" in Z39.50 server administration
This patch resolves the ambiguity of the word "Checked" for Z39.50
server administration.

To test:
Apply patch
In staff client, go to Home:Administration:Z39.50/SRU servers
Result: Column heading of 6th column should show "Preselected" (instead
of "Checked")

Edit or create new server for Z39.50 and SRU
Result: Checkbox underneath "Password" should have label "Preselected
(searched by default):"

Click "Help" at top right of screen
Result: Wording changed for selecting targets as default.

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-09-17 21:52:30 -03:00
781142224c Bug 12863 [CSS follow-up] News in OPAC: HTML broken with nested p tags and multiple thead in same table
This patch contains the revised and compiled CSS which will style the
OPAC's new news markup to match the previous version.

To test, apply the patch and clear your browser cache if necessary. View
news in the OPAC and confirm that it is styled like it was before the
patch making markup changes.

CSS patch behaves as expected. Thanks to Owen for adding this.
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@gmail.com>
2014-09-17 21:50:32 -03:00
f10f88266b Bug 12863 [LESS follow-up] News in OPAC: HTML broken with nested p tags and multiple thead in same table
This follow-up modifies the LESS file to add style to the new markup to
match the previous markup. A subsequent patch will include the revised
and compiled CSS.

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@gmail.com>
2014-09-17 21:50:27 -03:00
Marc Véron
dbe1e920d3 Bug 12863 - News in OPAC: HTML broken with nested p tags and multiple thead in same table
This patch fixes broken HTML in OPAC news by replacing table display
with divs.

To test:

Create multiple news for OPAC
Validate with HTML validator or check source code
Result:
Error with nested p tags
Table header thead is repeated for every news (not allowed)
Bonus testing: Let a screen reader like NVDA read the news and try to
understand it with closed eyes.

Apply patch
Result:
No more HTML errors in news
Screen reader reads news properly

To style you can use classes newscontainer, newsitem, newsheader,
newsbody and newsfooter.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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-09-17 21:50:25 -03:00
33d7a28afa Bug 12728: DBRev 3.17.00.025 2014-09-17 21:33:49 -03:00
a6da517127 Bug 12728: [QA Follow-up] Add StatisticsFields to sysprefs.sql
This patch adds a dbrev.
If people installed Koha after the initial dbrev (3.09.00.015), an install
with sysprefs.sql did not add the pref. So they still could not have it.

Test plan:
If you have the pref, running an database update should not do anything.
If you do not have the pref (delete it via mysql), it should be added.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 21:31:47 -03:00
9d48d31130 Bug 12728: Add StatisticsFields to sysprefs.sql
Bug 7955: [Statistics tab for Patron checkouts] introduced the pref
StatisticsFields but did not add it to the sql install file.

Test plan:
Run webinstaller or mysql ... < sysprefs.sql
Verify that the new pref is in your systempreferences table.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Run webinstall, new syspref loaded.
No koha-qa errors.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 21:31:40 -03:00
Jonathan Druart
5af96e0f78 Bug 12827: NewOrder needs more unit tests
NewOrder should be more tested!

This patch moves the existing unit tests into a new file and adds some
unit tests.

Note that there is no DB field aqorders.subscription, so the test in
NewOrder can be removed.

Test plan:
  prove t/db_dependent/Acquisition/NewOrder.t
and
  prove t/db_dependent/Acquisition.t
should return green.

Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 21:22:56 -03:00
Jonathan Druart
2217f98b7c Bug 12827: NewOrder should not return basketno
Since the basketno parameter is needed to insert an order, it is useless
to return it.

This patch changes the prototype for the C4::Acquisition::NewOrder
subroutine. The return value is now a scalar containing the ordernumber
created.

Test plan:
Verify there is no regression on an acquisition workflow:
1/ Create an order with several items
2/ Modify the order
3/ Receive some items
4/ Cancel the receipt
4/ Receive some items
5/ Receive all remaining items
6/ Cancel the receipt

Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 21:22:26 -03:00
Jonathan Druart
55e5c82ab5 Bug 12891: NewOrder does not return ordernumber if ordernumber is defined
The behavior is quite weird, but
  $schema->resultset('Table')->create($data)->id
does not return the id inserted if $data contains the key.

To be more clear, in this case
  $schema->resultset('Aqorder')->create($new_order)->id
returns an empty string because $new_order->{ordernumber} is an empty
string!

This was not caught by the unit tests, I added one.

Test plan:
- AcqCreateItem set to ordering
- Create an order with items and verify items are correctly linked to the
  order.

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed that without the patch the created item is not linked to the
order (entry in aqorders_items). With the patch, it works as expected.
Passes tests and Koha QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 21:19:35 -03:00
d15cecaced Bug 11577: Update DBIx
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 21:10:27 -03:00
cd69768f72 Bug 10883 - AllowHoldDateInFuture can let a patron jump to the top of the holds list
If a patron is allowed to add a future date for the hold using the
"Hold starts on date" field, that patron can put a date in that is
in the *past* which will cause them to move to the top of the holds
queue ( assuming they make the past date far enough back that it is
earlier than all the other hold dates ).

Test Plan:
1) Enable future holds
2) Note you can use dates in the past for "hold starts on date"
3) Note you can use dates in the past for "hold expires on date"
4) Apply this patch
5) Refresh the page
6) Note you can no longer use dates in the past for those fields

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changed subject: OpacAllowHoldDateInFuture to AllowHoldDateInFuture
as this fix applies to staff.
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 20:12:49 -03:00
eb4df0eff2 Bug 11577: DBRev 3.17.00.024
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 20:08:27 -03:00
84548dcba9 Bug 11577 : Fixing a tiny copy/paste issue
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 19:23:37 -03:00
788d6bd724 Bug 11577 : Fixing a tiny typo
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-17 19:23:31 -03:00
Holger Meißner
6d022bd4a4 Bug 11577: Add Hochschule für Gesundheit to contributing institutions
Automatic renewal is the second feature sponsored by the hsg.

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:28 -03:00
Holger Meißner
904b35645c Bug 11577: Unit tests
This patch fixes two unit tests that broke because of the new feature.
Also adds some new test cases.

To test:

1) prove t/db_dependent/Circulation.t
2) prove t/db_dependent/Circulation_Issuingrule.t

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:26 -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
Holger Meißner
17821c58cc Bug 11577: OPAC bootstrap theme changes
This patch makes opac-user.pl and the bootstrap version of opac-user.tt
handle the new renewal errors "auto_renew" and "auto_too_soon".

To test:

1) Set global syspref "opacthemes" to bootstrap.
2) Set global syspref "OpacRenewalAllowed" to Allow.
3) Test the same things as in previous patch, this time for the OPAC
   summary page.

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:21 -03:00
Holger Meißner
0270b8d3b6 Bug 11577: Expand description of AllowRenewalLimitOverride
With the introduction of the new automatic renewal feature global syspref
AllowRenewalLimitOverride is expanded in meaning. It now gives the option
to override blocks if:

- the number of allowed renewals is exceeded
- the renewal is premature (No renewal before)
- the item is scheduled for automatic renewal
- the renewal is premature and the item is scheduled for automatic renewal

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:18 -03:00
Holger Meißner
555d0d5898 Bug 11577: Add 'auto_renew' and 'auto_too_soon' to renewal page
This patch adds the new renewal errors 'auto_renew' and 'auto_too_soon'
to the renewal interface.

To test:

1) Issue two items:
   - one with automatic renewal and no value for "No renewal before"
   - another with automatic renewal and a value for "No renewal before"
2) Try to renew:
   Home > Circulation > Renew
3) Confirm there are error messages explaining that the items have been
   scheduled for automatic renewal and that one of the renewals is also
   premature.
4) If global syspref AllowRenewalLimitOverride is set to "Allow" you
   should be given the option to override.

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:16 -03:00
Holger Meißner
b49bcfef09 Bug 11577: Code and intranet template changes
This patch adds a checkbox for "Automatic renewal" to the checkout page.
CanBookBeRenewed is modified to include two new errors:
- auto_renew (renewal shouldn't be done manually)
- auto_too_soon (renewal is premature and shouldn't be done manually)

To test:

1) Add or edit an issuing rule with "Automatic renewal" and another
   one without it.
2) Issue at least three items:
   - automatic renewal by issuing rule
   - automatic renewal by Checkbox on the checkout page
   - no automatic renewal
3) Test the following steps for both:
   Home > Circulation > Checkouts
   Home > Patrons > Patron details
4) Confirm that issues with automatic renewal cannot be renewed manually,
   even if there are still renewals left and it's not too soon to renew.
5) Confirm that "Scheduled for automatic renewal" and the remaining
   renewals are displayed. If no renewals are left "Not renewable" should
   be displayed.
6) Confirm that issues without automatic renewal behave as usual.

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:14 -03:00
Holger Meißner
633f6c150e Bug 11577: Add "Automatic renewal" to the circulation and fine rules
This patch adds a column "Automatic renewal" to the circulation and
fine rules table.

To test:

1) Add or edit some issuing rules.
2) Confirm that "Automatic Renewal" is set to "No" by default and
   can be switched to "Yes".

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:09 -03:00
Holger Meißner
282aa8ffce Bug 11577: Add auto_renew flags to the database
- issues.auto_renew
- old_issues.auto_renew
- issuingrules.auto_renew

Default value is zero.

To test:

1) Run installer/data/mysql/updatedatabase.pl
2) Create SQL reports like:
   SELECT * FROM issues LIMIT 0,1
3) Confirm that a column auto_renew was added to each of the three tables.

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:05 -03:00
84b4ace746 Bug 12879: Remove unnecesary diags from Holds.t
There are two unnecessary diag statements:
- Creating biblio instance for testing.
- Creating item instance for testing.

TEST PLAN
---------
1) prove t/db_dependent/Holds.t

t/db_dependent/Holds.t .. 1/38 # Creating biblio instance for testing.
Use of uninitialized value in subroutine entry at /home/tcohen/git/koha-community-src/C4/Charset.pm line 181.
 # Creating item instance for testing.
Use of uninitialized value in subroutine entry at /home/tcohen/git/koha-community-src/C4/Charset.pm line 181.
Use of uninitialized value in subroutine entry at /home/tcohen/git/koha-community-src/C4/Charset.pm line 181.
t/db_dependent/Holds.t .. ok
All tests successful.
Files=1, Tests=38,  1 wallclock secs ( 0.03 usr  0.01 sys +  1.13 cusr  0.11 csys =  1.28 CPU)
Result: PASS

-- They are in the first and fourth lines of this sample output

2) apply patch
3) prove t/db_dependent/Holds.t

t/db_dependent/Holds.t .. 1/38 Use of uninitialized value in subroutine entry at /home/mtompset/kohaclone/C4/Charset.pm line 186.
Use of uninitialized value in subroutine entry at /home/mtompset/kohaclone/C4/Charset.pm line 186.
Use of uninitialized value in subroutine entry at /home/mtompset/kohaclone/C4/Charset.pm line 186.
t/db_dependent/Holds.t .. ok
All tests successful.
Files=1, Tests=38,  1 wallclock secs ( 0.01 usr  0.00 sys +  0.78 cusr  0.09 csys =  0.88 CPU)
Result: PASS

-- They are no longer in the first and fourth lines of this sample output

4) run koha QA test tool

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-16 15:21:40 -03:00
d8ed913059 Bug 12899: Row grouping in checkouts table is alphabetical and depends on translation
The sort order of the "today's checkouts" and "previous checkouts" row
groupings depends on the label, so in English "today's checkouts" comes
first. However, in other languages the reverse alphabetical order is
incorrect resulting in "previous checkouts" coming first.

This patch adds a dummy column with numeric data on which the sorting
can be done. This should make it translation-agnostic.

To test, apply the patch and install or update a translation which will
demostrate the problem (sv-SE for instance).

- Clear your browser cache and switch to the English templates.
- Check out some items to a patron who has checkouts from a previous
  day.
- Confirm that the sorting of the "today's checkouts" and "previous
  checkouts" row groups is correct.
- Switch to the new/updated translation and reload the circulation page
  for that patron. Confirm that the sort remains correct.
- Confirm that the checkouts table looks correct and that other features
  (sorting, checkboxes) still work correctly.

Revision: Corrected the table footer include to correct the colspan
error causing column misalignment.

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-09-16 15:20:51 -03:00
Jacek Ablewicz
7289214e30 Bug 12811 - Patron 'Details' and 'Check out' pages not working for staff users without renewal override permissions
In case when the staff user doesn't have (circulate) ->
(override_renewals) permission granted, this code part

   var AllowRenewalLimitOverride = [%
CAN_user_circulate_override_renewals && AllowRenewalLimitOverride %];

in circ/circulation.tt and members/moremember.tt leads to javascript
error, because TT statement evaluates to empty string.

To reproduce:

- set AllowRenewalLimitOverride syspref to "Don't allow" (this step is
  possibly redundant / not quite relevant),
- for testing purposes, log in as some (sample) staff user whitch does
  not have permission granted for "(override_renewals) Override blocked
  renewals",
- have a look at some patron accounts (preferably, ones with 1+
  check-out), observe that page layout is incorrect in "Check Out" and
  "Details" tab.

To test:

- apply patch,
- retest and ensure that this issue is no longer reproductible,
- make sure that there are no regressions of any kinds regarding renewal
  override permission for staff users (i.e, that it still works like
  intended).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes QA script and tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-16 15:18:54 -03:00
Dobrica Pavlinusic
b8fae8489f Bug 12729 - Overdue items won't show as overdue in red in circulation
It seems that Firefox date parser doesn't like our dates which are
formatted in ISO format like "2014-08-06 00:00:00". This results in
missing red color in overdue dates.

So intead of munching different date formats and JavaScript (and having
to support different browers) this patch moves check for overdue dates
back to mysql and just transfers boolean value to JavaScript so it can
show correct class for date_due.

Test scenario:
1. find borrower with overdue checkouts
2. verify that all dates are black (and are in ISO format)
3. apply this patch
4. reload page and verify that overdue dates turned red

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with different due dates (hourly and not) and different date formats.
Passes tests and QA script.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-16 15:17:53 -03:00
Jacek Ablewicz
09c4417216 Bug 12859 - Patron import tool doesn't import extened attributes values any longer
To reproduce:

1/ define/set up extended pattron attribute in administration module,
2/ using "Tools -> Import patrons", try to import some sample patron
record[s], having some arbitrary (non-empty) value assigned in
'pattron_attributes' CSV column for attribute defined in step 1/,
3/ observe that extended attribute defined in step 1/ was not imported
(not added to the database), without any warnings.

This patch restores a small code chunk which went AWOL somewhere around
commit b4158f2d24.

To test:

1/ apply patch & retest,
3/ ensure that this issue is no longer reproductible, and there are no
apparent regressions of any kind,
4/ make sure that the ability to specify default value for extended
attributes added in bug Bug 12716 is still working as intended
(= follow up the test plan for bug 12716).

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>
Patch fixes import of extended patron attributes.
Step 1-3 in test plan confirmed.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-16 15:09:35 -03:00
Robin Sheat
8a63c17f79 Bug 12918: fix failing test case
A bug in a test case causes test case failure. It also required a
database, so I'm moving it out of the way.

Test plan:
1) prove -v t/db_dependent/Templates.t
   -- bombs!
2) apply patch
3) prove -v t/db_dependent/Templates.t
   -- works!

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Good catch Robin, it didn't fail in Perl 5.18 so didn't notice the mistake.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-15 10:53:00 -03:00
Robin Sheat
692e0572e1 Bug 12870 - require a higher version of Test::Simple
New test cases won't build with the version of this in squeeze.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-15 10:52:43 -03:00