Commit graph

19971 commits

Author SHA1 Message Date
Julian Maurice
54616c37e2 Bug 7295: More granular permissions for baskets
- Add branch info to baskets
- Add a list of borrowers that are allowed to manage a basket (one list
for each basket).
- Add a new subpermission: acquisition => order_manage_all

If user is superlibrarian, or if that user has permission acquisition = 1
(GranularPermissions = OFF), or subpermission acquisition =>
order_manage_all (GranularPermissions = ON), that user is authorised to manage
all baskets.

Depending on syspref AcqViewBaskets:
  'all': user can manage all baskets
  'branch': user can manage baskets of their branch (the basket branch is
            taken into account, not the branch of the basket's creator).
            If basket branch is not defined, all users can manage this
            basket.
  'user': user can manage baskets she created, and baskets in their
          user list

There are unit tests in t/Acquisition/CanUserManageBasket.t, which
require Test::MockModule

You can edit basket's branch and users list in basket modification page
(acqui/basket.pl)

Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:35:35 +00:00
Jonathan Druart
6e3e1eed48 Bug 11168: fix regression that broke exporting serial claims to CSV
Bug 7688 broke the exporting serial claims as CSV (see bug 10854).

For C4::Serials::GetLateOrMissingIssues(), $supplierid is not
meant to be mandatory.  This patch fixes that.

Test plan:
try to export a serial claim.
Without this patch, the csv is always empty.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 16:10:48 +00:00
Galen Charlton
9706908b26 Bug 7298: (follow-up) fix uninitialized variable warning
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:52:47 +00:00
Jonathan Druart
bdfcae57cd Bug 7298: (follow-up) fix translation for CSV strings
Following the same way as bug 10935, the headers are in an include file.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Translatability tested successfully.
Passes all tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:51:45 +00:00
Jonathan Druart
43adbda007 Bug 7298: (follow-up) various QA fixes
- use Modern::Perl;
- GPL version
- tabs

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and all tests.

Testing notes:
- CSV header row is now translatable.
  Tested by updating the German po files and checking for the line.
- Tested that claiming for late serial issues still works as
  expected, as one file has been renamed. Filed 10931 for
  untranslatable CSV contents.
- Tested that claiming late orders still works:
  * Table searching and sorting
    Works nicely, but some columns could be split up for better
    searching and sorting:
      * Order date: 20/01/2013 (245 days)
      * Total cost:     10.00x1 = 10.00 Books
        => item type should be separate
      * Basket:  10 MPL
        => Library and basket number could be separate columns
  * Filters
     * Combined various filters, search results look correct.
  * Selecting order for claiming
      * Limiting by vendor makes it possible to check/uncheck all
      * With no vendor limit, entries for other vendors will be
        locked after the first checkbox is checked for one vendor
  * Exporting as CSV
     * Exported single line > CSV appears correct.
     * Exporting multiple lines > CSV appears correct.
     PROBLEM: Translated CSV don't work correctly, as line
     breaks are lost in the translation process.
     Needs to be fixed in a follow-up.
  * Sending serial claim email
     * No regressions found - there are some problems with the
       email contents noted on bug 7298.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:51:25 +00:00
Jonathan Druart
58111f8ece Bug 7298: (follow-up) make CSV strings translatables.
Using a template file, the CSV headers become translatable.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:50:58 +00:00
Jonathan Druart
89d951c855 Bug 7298: (follow-up) fix checkboxes binding on load
Click on checkboxes should be bound on load.

Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:50:29 +00:00
Katrin Fischer
92aa1246e2 Bug 7298: (follow-up) fix capitalization and moving supplier id
Fixes a few capitalization errors on the late orders page like
- Claim orders
- filter
- Search results

Also moves the supplierid from the order date column to the
vendor column.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:50:08 +00:00
Jonathan Druart
fd2c751a86 Bug 7298: add option to export late orders as CSV
This patch allows to export late orders as CSV.

Test plan:
- Go on the late orders page (acqui/lateorders.pl)
- Select one or more order and click on the button "Export as CSV".
- The generated file should contains some information on the orders
  (order date, estimated delivery date, vendor name, information field,
  cost, basket name (and basketid), claims count and the claimed date)
  The last line of the file is the total of orders.
- You are not allow to select order from different vendor.
- The check/uncheck all links appears only if a vendor is selected.
- Check that the check/uncheck works for all pages of the table.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: sonia <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing comments on last patch in this series.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:49:24 +00:00
Galen Charlton
4f4946f8df Bug 8435: (follow-up) make SearchSubscriptions handle lack of userenv
This patch allows t/db_dependent/Bookseller.t to pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:37:00 +00:00
Galen Charlton
0838287630 Bug 8435: DBRev 3.13.00.038
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:30:12 +00:00
Jonathan Druart
5248f12a0e Bug 8435: (follow-up) handle lack of userenv gracefully
C4::Serials::can_edit_subscription now deals with C4::Context->userenv.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:29:42 +00:00
Jonathan Druart
019049fc51 Bug 8435: (follow-up) the unit tests should create the biblio
Previous version does not create the biblio.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:29:32 +00:00
Jonathan Druart
56ee35d3fb Bug 8435: (follow-up) use a transaction for unit tests
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:29:25 +00:00
Jonathan Druart
dc3dd3ede6 Bug 8435: (follow-up) add unit tests for can_edit_subscription
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:29:19 +00:00
Jonathan Druart
d2052311cb Bug 8435: add permission to enable editing other library's serials if IndependantBranches is on
In the serial module, we want to hide serials from others libraries.
However, to permit central serials manage, this patch introduces a
new permission, 'superserials'. If a staff member has this permission,
that person can override the restriction.

Test plan:
- Switch on the IndependantBranches syspref
- Add the permission 'superserials' for a patron and test you can
  navigate and see all serials
- Remove this permission and test you cannot manage/view subscriptions
  from others libraries

Signed-off-by: Frederic Durand <frederic.durand@unilim.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:27:19 +00:00
Galen Charlton
eaf4730abe Bug 8037: (follow-up) fix undefined variable warning during template processing
Fix instances of the following warning appearing in the Apache log:

... parcel.pl: Argument "" isn't numeric in addition (+)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 15:17:44 +00:00
Galen Charlton
8c60cd41a8 Bug 8037: (follow-up) improve GetBudgetByOrderNumber test
This patch moves the GetBudgetByOrderNumber() test from
Budgets.t to Acquisition.t, thereby making it easier to
test without doing a direct SQL insert into the aqorders table.

To test:

[1] Verify that prove -v t/db_dependent/Budgets.t passes
[2] Verify that prove -v t/db_dependent/Acquisition.t passes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:57:18 +00:00
Galen Charlton
4b3b87a7c3 Bug 8037: (follow-up) tweak fund subtotal note
Use "Tax exc." rather than "GST exc." to be consistent with other parts
of the table footer.  Also remove the new style introduced in the previous
patch; defining non-semantic CSS classes like font-weight-normal is not
desirable.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:53:33 +00:00
Jonathan Druart
380bfcedd5 Bug 8037: (follow-up) bad sql query and variable renaming
The first patch does a left join on aqorders_items which returns too
much order lines.

This patch follows the Galen's suggestion: it removes the join and calls
the GetItemnumbersFromOrder routine for retrieving itemnumbers.

Bonus: the "parcelitems" variable is badly named and obfuscates the code.
I changed it for "orders".

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:53:17 +00:00
4f775cd640 Bug 8037: (follow-up) adds the note "GST exc." for subtotals by fund
Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:53:17 +00:00
dd22c0ec0f Bug 8037: (follow-up) fix various issues
[1] Add test for GetBudgetByOrderNumber()
[2] Remove unconditional warn.
[3] Remove MySQLism

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:53:16 +00:00
3910d5e8b4 Bug 8037: Display holds & fund on the already received table on order receipt summary
Adds a column to indicate holds on received items, as well as adding
a new column for fund and showing the subtotals per fund above
the total subtotal.

To test:

[1] Create an order basket containing at least one title and
    ensure that an item is created for that title.  Close the
    basket.
[2] Place a hold on the title.
[3] Receive the order.  After receiving it, but before finishing
    the invoice, the table of already received orders should now
    have columns for the order budget and number of holds on the
    title as well as lines with the subtotal per fund.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:53:07 +00:00
Galen Charlton
0f6882896d Bug 10572: DBrev 3.13.00.037
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:45:47 +00:00
320afd2fc5 Bug 10572: (follow-up) ensure SQL for all translations has the phone transport type
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:45:02 +00:00
2eb34034df Bug 10572: (follow-up) DBrev to ensure presence of phone transport type
Test plan:
Run the updatestructure step of web installer.
Check if you have a phone message_transport_type.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:44:27 +00:00
568f32606c Bug 10572: Add phone to message_transport_types table for new installs
In connection to bug 4246, commit 591bae324 added
phone to the message_transport_types table in updatedatabase.pl

This should be done also for new installs via the .sql files of the web
installer.

I am adding it only to English now, basing this change upon the work in
reports 10509 and 10520. (I discovered this tiny omission there too.)

Test plan:
Apply patches 10509/10520.
Run new install or run this particular sql file from command line.
Note: If you only run this particular file, you do not need patch 10509.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:41:49 +00:00
Galen Charlton
c59f17e454 Bug 11135: (follow-up) improve testing of OVERRIDE_SYSPREF_NAMES
This is a bit pedantic -- since for obvious reasons, I can't
see us ever letting '0' be the name of a system preference,
and I suspect it's impossible for the value of something in the
$ENV hash to be undefined -- but better to test for exactly what
we mean.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:21:25 +00:00
Colin Campbell
ded0db9d63 Bug 11135: avoid logging warnings if OVERRIDE_SYSPREF_NAME is not set
Calling split on an undefined var generates warning to
the log. Let's check it exists before processing it

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 14:16:07 +00:00
Bernardo Gonzalez Kriegel
742e070fcc Bug 11134 - Typo on course reserves help
This patch fixes a small typo on course reserves help

To test:
1) Go to Course reserves
2) Press 'New course'
3) Press Help
4) On 3dr paragraph you will read "To link a ninstructor ..."
5) Apply patch
6) Now it reads "To link an instructor ..."

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2013-10-31 14:10:04 +00:00
Galen Charlton
ca18e624fd Bug 9456: (follow-up) use datatables.inc
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:54:26 +00:00
Jonathan Druart
ce4c7f31bf Bug 9456: (follow-up) remove whitespaces and tab
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:52:24 +00:00
1b10a6f3a0 Bug 9456: (follow-up) sort on callnumber only
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:52:05 +00:00
eedb0aade4 Bug 9456: (follow-up) Remove useless CSS
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:51:49 +00:00
470bc63512 Bug 9456: (follow-up) move sort filters to datatables.js
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:51:29 +00:00
75f9cdcf80 Bug 9456: (follow-up) add tooltip
Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:51:15 +00:00
5a781c2ff9 Bug 9456 - Add callnumber column to the cart
This patch adds call-number sorting to the staff client cart. Sortining is enabled
on the 'Items' column which uses a custom sorting routine to sort the callnumbers.
If the sort is ascending, each column will be sorted by the highest ordered
callnumber for that row. Likewise, if the sort is descending the table will be
sorted by the lowest valued callnumber for that row.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:51:03 +00:00
Galen Charlton
f556bf0cc9 Bug 9044: (follow-up) restore the toolbar menu items
This patch adds the following items back to the cataloging
toolbar:

- Edit items in batch
- Delete items in a batch

My rationale: the question of the best UI for selecting items for
batch operations is not yet settled.  Adding the ability to select
items from the bib details page is indeed useful, but as currently
implemented, it can hide the availability of the batch
edit/deletion operations if no item is yet selected.  Although
having both the toolbar items and the links that display when an
item is selected is a bit redundant, for now I think we can live
with that until we get more eyes on the UI.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:31:23 +00:00
Galen Charlton
0476b6da32 Bug 9044: DBRev 3.13.00.036
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:31:23 +00:00
Julian Maurice
a794ce5a76 Bug 9044: (follow-up) set the number of filters according to number of columns
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Filters now shows correctly. No errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
This feature is a little controversial as it removes
the batch edit/delete options from the menu and moves them
to the item table, additionally controlled by a system
preference. Maybe later on, we can think about the UI a bit
more, but it works nicely.

Tested with.
- SeparateHoldings and SeparateHoldingsBranch activated/deactivated.
- Search filters.
- None, both, or one of the permissions.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:31:12 +00:00
Julian Maurice
5153ef1387 Bug 9044: (follow-up) change dropdown list into links list
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
That's the one I sign.

Comment: At first I don't know where to find links, until
I selected an item.
Works as described. No koha-qa errors.

Solved merge conflict on updatedatabase.pl

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:30:51 +00:00
Jonathan Druart
0c2fa7a570 Bug 9044: QA followup
1/ Remove filter and sort for the checkboxes column.
2/ Enable the pref by default.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:30:36 +00:00
Julian Maurice
eac6dc6e27 Bug 9044: (follow-up) Add a blank option + add missing 'for' attributes
Signed-off-by: Pierre Angot et Leila Arkab <tredok.pierre@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:30:05 +00:00
Julian Maurice
8848863b7b Bug 9044: Provide item selection in record detail page (staff client)
This patch add a column in the items table of catalogue/detail.pl that
contains checkboxes for item selection and a drop-down list of actions
that can be executed for the selection of items.

Currently available actions are:
- Delete selected items: redirect to batch items deletion
- Modify selected items: redirect to batch items modification

Item selection is only enabled if the new syspref
StaffDetailItemSelection is ON.
Actions are not displayed if user doesn't have the right permissions.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Further testing notes on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:29:35 +00:00
Galen Charlton
72b1782487 Bug 7688: (follow-up) have Serials.t create its test subscription
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 05:07:44 +00:00
Galen Charlton
da9c4cab1f Bug 2720: (follow-up) fix error that prevented sysprefs from being loaded
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:51 +00:00
Galen Charlton
3c0d3b00b2 Bug 2720: (follow-up) update DBIx::Class schema classes
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:50 +00:00
Galen Charlton
6c632637e1 Bug 2720: (follow-up) add new table to kohastructure.sql
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:50 +00:00
Galen Charlton
eff4815991 Bug 2720: (follow-up) add foreign key from new table to borrowers
Foreign keys should be added as a matter of course for new tables.

Argubably, borrower_debarments.manager_id could also be linked to
borrowers, but this patch does not do that.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:50 +00:00
Galen Charlton
965b2c7d58 Bug 2720: DBRev 3.13.00.035
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-31 01:56:50 +00:00