Owen Leonard [Wed, 2 Mar 2016 17:35:56 +0000 (12:35 -0500)]
Bug 15961 - Use Font Awesome icons for confirmation of currency deletion
When deleting a currency, the confirmation and error dialogs should use
Font Awesome icons. This patch makes this change.
To test, apply the patch and go to Administration -> Currencies and
exchange rates.
- Click the "delete" link next to any currency.
- Verify that the confirmation dialog is correctly styled.
- Test the both cancel and confirm operations.
- Verify that the deletion confirmation dialog is correctly styled.
Bug 15962 prevents testing the error dialog which should appear if you
try to delete a currency which is use (defined as a currency in a vendor
record). To test this error you could manually enter a currency code
into aqbooksellers.currency and then try to delete that currency.
Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Aleisha [Thu, 3 Mar 2016 02:20:47 +0000 (02:20 +0000)]
Bug 15965: Koha to MARC mapping - table changes with selection of drop down menu
EDIT: Removing JS line
To test:
1) Go to Admin -> Koha to MARC Mapping
2) Test selecting biblio / biblioitems / items
3) Confirm the table content changes and behaves as it should which each
selection
Sponsored-by: Catalyst IT Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Mon, 29 Feb 2016 10:04:51 +0000 (10:04 +0000)]
Bug 5404: Move the test to a new IsMarcStructureInternal sub
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
had a funny description:
Added function to check if a MARC subfield name is "koha-internal"
(instead of checking it for 'lib' and 'tag' everywhere); temporarily
added to Koha.pm
"Temporarily", since 2003, everything is relative, isn't it? :)
The thing is that GetMarcStructure returns hash like
The attributes for field_200 can be 'repeatable', 'mandatory', 'tag', 'lib'.
We don't want to loop on these values when looping on subfields.
Since there are just { k => v } with v is a scalar (string), it's easier
to test if we are processing a subfield testing the reference.
At some places, we don't need to test that, we are looping on values
from MARC::Field->subfields which are always valid subfields.
Test plan:
1/ Edit items using the batch item mod tool
2/ display and edit items via the cataloguing module.
You should not see any changes between before and after the patch
applied.
Tech notes:
We need to check what we are processing when we loop on 'subfields' from
GetMarcStructure, not from MARC::Field->subfields.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Marcel de Rooy [Sat, 27 Feb 2016 13:40:44 +0000 (14:40 +0100)]
Bug 13871: [QA Follow-up] Adjust Patron Info Request
Conform QA comment, Patron Info request is slightly adjusted to be
consistent with changes to Patron Status request.
If the cardnumber is ok and the password is wrong, BL=N is reported but
also add 'Invalid password' in AF.
Additionally, an invalid card number is reported in AF.
Test plan:
[1] Send patron info request for invalid card.
[2] Idem for valid card, no password.
[3] Idem for valid card, good password.
[4] Idem for valid card, wrong password.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Verified by telnetting SIP server.
And tested additionally with the new unit test of bug 15956.
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Marcel de Rooy [Sat, 27 Feb 2016 13:26:51 +0000 (14:26 +0100)]
Bug 13871: [QA Follow-up] Adjust Patron Status Request
Conform QA comment on Bugzilla, we do this:
[1] Attribute for overdrive mode/invalid credentials is not really needed.
We can always pass a screen message that card or password is invalid.
[2] If the cardnumber is correct and the password is wrong, we should
still honour the request. The bad password is recognized by BLN and
an additional message in AF.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Verified by telnetting SIP server.
And tested additionally with the new unit test of bug 15956.
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Mason James [Mon, 23 Mar 2015 01:30:26 +0000 (14:30 +1300)]
Bug 13871: [TITLE_AMENDED] Additional changes
The original perltidy patch from Mason has been amended.
The perltidy itself has been moved to a separate patch with the current
perltidyrc applied.
As noted on Bugzilla, the original perltidy patch included some extra
changes:
[1] You prefix timestamp with Sip
This is not actually needed (it is imported), but if we should prefix it,
we should prefix now with C4::SIP::Sip. But you only changed two
occurrences (out of 26). So I remove these two changes.
[2] You remove the $server parameter from two calls of maybe_add:
A closer look at the remaining code tells me that $server is always
passed to maybe_add for FID_SCREEN_MSG. So this only left me the
current whitespace change.
But at least we documented what we did or did not, and why..
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Tue, 16 Feb 2016 11:14:55 +0000 (11:14 +0000)]
Bug 15635: Change method type to _type for bug 15446
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
To retrieve a patron image, we can call Koha::Patron::Images->find or
Koha::Patrons->find->image
Both will return a Koha::Patron::Image object.
Test plan:
1/ From the patron/member module, open all tabs on the left (Checkouts,
detail, fines, etc.)
The image should be correctly displayed.
2/ At the OPAC, on the patron details page (opac-memberentry.pl) the
image should be displayed as well.
3/ Same on the sco module.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The C4::Members::RmPatronImage just removed a row in patronimage.
This can be accomplished using the delete method of Koha::Patron::Image.
Test plan:
From the patron defail page, try to delete the image of a patron.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The C4::Members::PutPatronImage inserted/updated the image of a patron.
This can be done easily with ->find->set->store or ->new->store
Test plan:
1/ Modify the image of a patron from the patron detail page
2/ Add an image to a new patron
3/ Use the "Upload patron images" tools (tools/picture-upload.pl) to add
or modify the image of a patron
4/ Use the "Upload patron images" tools (tools/picture-upload.pl) to add
or modify the image of several patrons, using a zip file.
Stress the script trying to get as many errors as possible (wrong
cardnumber, wrong mimetype, file does not exist, etc.)
With this patch, if the cardnumber does not exist, you will get a
specific error "Image not imported because this patron does not exist in
the database"
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 21 Jan 2016 12:33:25 +0000 (12:33 +0000)]
Bug 15635: Koha::Patron::Images - Add new classes
There are 3 subroutines in C4::Members to get, add and delete patron
images:
- GetPatronImage
- PutPatronImage
- RmPatronImage
By creating these 2 Koha::Patron::Image[s] classes, we could remove them easily.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Owen Leonard [Tue, 1 Mar 2016 18:23:52 +0000 (13:23 -0500)]
Bug 15950: Use Font Awesome icons for acquisitions basket close confirmation
When closing a basket in Acquisitions the confirmation dialog should be
styled using Font Awesome icons. This patch adds them.
The cancel button has been moved into its own form so that we can get
rid of several problematic JavaScript issues: The use of the
"javascript:" pseudo-protocol, the use of an "onclick" attribute, and
the use of a JS redirect where a GET action will do.
To test, apply the patch and locate an open basket in Acquisitions which
can be closed.
- Click the 'Close this basket' button and confirm that the icons in the
dialog look correct.
- Test the cancel operation to make sure you are redirected back to the
page showing the basket details.
- Test the confirm operation and verify that the basket is closed.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Please note that the confirmation message display depends on
BasketConfirmations.
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Owen Leonard [Tue, 1 Mar 2016 19:48:45 +0000 (14:48 -0500)]
Bug 15951: Use Font Awesome icons for acquisitions order cancellation confirmation
In Acquisitions, when you delete (cancel) an order, a dialog asks you to
confirm. This dialog should be styled with Font Awesome icons.
Other minor edit: Changing page grid style for centered main content
area.
To test, apply the patch and locate a basket in Acquisitions with an
order.
- View the details for the basket.
- Click the 'Delete' link next to the order you want to delete.
- Confirm that the dialog is correctly styled.
- Test the cancel operation and verify that you are correctly redirected
back to where you were.
- Test the confirmation operation and verify that your order is deleted.
- Also test the deletion process from Acquisitions -> Vendor -> Invoices
-> Invoice -> Go to receipt page -> Delete order.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Owen Leonard [Wed, 2 Mar 2016 16:37:09 +0000 (11:37 -0500)]
Bug 15959: Use Font Awesome icons for attach item confirmations
When attaching an existing item to a record, the confirmation and error
dialogs should be styled using Font Awesome icons. This patch revises
the buttons and revises the global CSS file.
To test, apply the patch and clear your cache if necessary.
- Locate a record in the catalog to which you can attach an item.
- Select "Attach item" from the "Edit" menu.
- Submit a barcode for an exising item.
- Verify that the confirmation dialog is correctly styled.
- Test the operation of both the "OK" and the "Attach another item"
buttons.
- Submit an invalid barcode.
- Verify that the error dialog is correctly styled.
- Test the operation of both the "OK" and the "Try again"
buttons.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Owen Leonard [Mon, 29 Feb 2016 18:39:16 +0000 (13:39 -0500)]
Bug 15940 - Remove unused JavaScript from authorities MARC subfield structure
The authorities MARC subfield structure template contains some unused
JavaScript, "function displayMoreConstraint()" This patch removes it.
To test, apply the patch and go to Administration -> Authority types ->
MARC structure -> Subfields -> Edit subfields and confirm that there are
no JavaScript errors and tab switching works correctly.
A search of the source code should show no instances of
"displayMoreConstraint."
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
No regression, no JS warning.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Mon, 8 Feb 2016 13:00:37 +0000 (13:00 +0000)]
Bug 15755: Display default item type as "All" in circ rules
Bug 15354 did not fix correctly the issue with the item type display.
The default item type '*' should be "All", at the moment nothing is
displayed in the column.
Test plan:
1/ Define a rule for default item types (All/*) and for specific item
types.
2/ Translate some item type descriptions used in previous step
3/ Default item type should be "All" and correct translations should be
displayed.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Owen Leonard [Mon, 29 Feb 2016 16:04:37 +0000 (11:04 -0500)]
Bug 15864 - SMS cellular providers link missing from administration sidebar menu
When the SMSSendDriver system preference is set to "Email" a link to the
SMS cellular providers management page should appear in the left-hand
sidebar menu on Administration pages. This patch adds the link to
admin-menu.inc.
To test, apply the patch set your SMSSendDriver system preference to
"Email." View various Administration pages which show the left-hand
sidebar menu and confirm that "SMS cellular providers" is in the list.
Empty the SMSSendDriver preference and confirm that the link no longer
appears.
Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
1 - Add some marc modification templates in a non alpha order (Shoes,
Hats, Cats)
2 - visit the pages above and note the templates are in order
added
3 - apply patch
4 - visit the three pages and note correct order
5 - verify all tools continue to work as expected
Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Mark Tompsett [Fri, 19 Feb 2016 20:49:02 +0000 (15:49 -0500)]
Bug 15871: Improve PerlCritic level for t/RecordProcessor.t
perlcritic -5 failed.
Attempt to clean up to a higher level:
-- use English to address use of $@ variable
-- perltidy on the code
-- substitute q{} for ''
-- expand out single line hacky goodness (... s/\.pm$//) to more code
-- remove parenthesis on functions that don't need it
-- add x, s, and m as needed to regexps
-- change double quotes to single quotes where no variable involved
-- tweaked eval destroy test to check return value and use $EVAL_ERROR
-- renamed $processor to $record_processor in the subtest to avoid
lexical warnings
TEST PLAN
---------
$ perlcritic -5 t/RecordProcessor.t
Don't modify $_ in list functions at line 43, column 25. See page 114 of PBP. (Severity: 5)
$ perlcritic -2 t/RecordProcessor.t
No package-scoped "$VERSION" variable found at line 1, column 1. See page 404 of PBP. (Severity: 2)
Quotes used with a string containing no non-whitespace characters at line 34, column 36. See page 53 of PBP. (Severity: 2)
Quotes used with a string containing no non-whitespace characters at line 34, column 39. See page 53 of PBP. (Severity: 2)
Quotes used with a string containing no non-whitespace characters at line 36, column 33. See page 53 of PBP. (Severity: 2)
Quotes used with a string containing no non-whitespace characters at line 36, column 36. See page 53 of PBP. (Severity: 2)
Don't modify $_ in list functions at line 43, column 25. See page 114 of PBP. (Severity: 5)
Regular expression without "/s" flag at line 43, column 33. See pages 240,241 of PBP. (Severity: 2)
Regular expression without "/x" flag at line 43, column 33. See page 236 of PBP. (Severity: 3)
Regular expression without "/m" flag at line 43, column 33. See page 237 of PBP. (Severity: 2)
Regular expression without "/s" flag at line 43, column 66. See pages 240,241 of PBP. (Severity: 2)
Regular expression without "/x" flag at line 43, column 66. See page 236 of PBP. (Severity: 3)
Regular expression without "/m" flag at line 43, column 66. See page 237 of PBP. (Severity: 2)
Expression form of "grep" at line 47, column 8. See page 169 of PBP. (Severity: 4)
Expression form of "grep" at line 50, column 20. See page 169 of PBP. (Severity: 4)
Regular expression without "/s" flag at line 50, column 26. See pages 240,241 of PBP. (Severity: 2)
Regular expression without "/m" flag at line 50, column 26. See page 237 of PBP. (Severity: 2)
Return value of eval not tested at line 73, column 1. You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed. (Severity: 3)
Magic punctuation variable $@ used at line 78, column 5. See page 79 of PBP. (Severity: 2)
Reused variable name in lexical scope: $processor at line 84, column 5. Invent unique variable names. (Severity: 3)
Subroutine "new" called using indirect syntax at line 87, column 18. See page 349 of PBP. (Severity: 4)
Subroutine "new" called using indirect syntax at line 93, column 18. See page 349 of PBP. (Severity: 4)
Quotes used with a string containing no non-whitespace characters at line 96, column 40. See page 53 of PBP. (Severity: 2)
Subroutine "new" called using indirect syntax at line 99, column 18. See page 349 of PBP. (Severity: 4)
Subroutine "new" called using indirect syntax at line 106, column 18. See page 349 of PBP. (Severity: 4)
$ prove -v t/RecordProcessor.t
t/RecordProcessor.t .. ok
All tests successful.
Files=1, Tests=13, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.22 cusr 0.02 csys = 0.25 CPU)
Result: PASS
Repeat perlcritic level 2, and only $VERSION warning should exist.
Retest with the prove.
Run koha qa test tools.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
I don't really care about perlcritic as long as it involves changing '' into qw{} (WTF?)
Anyway, I'd do this kind of things as we go, for example, if we were adding more tests. In that
case it would just be a followup for this, after you provided a patch for an enh/bugfix.
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Mon, 11 Jan 2016 15:57:59 +0000 (15:57 +0000)]
Bug 15548: Move new patron related code to Patron*
The 'borrower' should not be used anymore, especially for new code.
This patch move files and rename variables newly pushed (i.e. in the Koha
namespace).
Test plan:
1/
git grep Koha::Borrower
should not return code in use.
2/
Prove the different modified test files
3/ Do some clicks in the member^Wpatron module to be sure there is not
an obvious error.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described. Tested with Circulation, Members/Patrons, Discharge,
Restrictions modules and the must common functionalities
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
This subroutine just retrieved the messages given some parameters.
Some job should not have been done in this subroutine.
It was called only 3 times, in circ/circulation.pl and opac-user.pl.
Basically it was used to retrieved the message to displaye for a given
patron ($borrowernumber) at the OPAC (B) or Staff (L).
For the 3 calls, the 2 parameters $borrowernumber and $type
(message_type) were passed, the "%" trick at the beginning of the
subroutine was useless.
Moreover, the date formatting should be done on the TT side, not in
subroutine.
The can_delete flag was set if the branchcode given in parameter was the
same as the one of the message. This has been delegated to the template.
Indeed the can_delete was not valid, since it must depend on the
AllowAllMessageDeletion pref.
The test is now:
IF message.branchcode == branch OR
Koha.Preference('AllowAllMessageDeletion'')
There is not specific test plan for this patch, the changes have already
been tested in previous patches.
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Wed, 20 Jan 2016 17:31:50 +0000 (17:31 +0000)]
Bug 15632: Koha::Patron::Messages - Add new classes
The following 4 CRUD subroutines in C4::Members:
- AddMessage
- DeleteMessage
- GetMessagesCount
- GetMessages
could be replaced with a new package based on Koha::Objets.
This patchset will add the 2 Koha::Patron::Message[s] classes, then use
it to replace the different calls to these subroutine.
It will slightly reduce the size of C4::Members
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Thu, 17 Dec 2015 10:57:48 +0000 (10:57 +0000)]
Bug 15084: DBIx::Class - Shema changes
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Thu, 29 Oct 2015 14:55:23 +0000 (14:55 +0000)]
Bug 15084: DB Changes - add currency.archived and FK on aqorders.currency
See the comment for details.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Thu, 29 Oct 2015 14:54:40 +0000 (14:54 +0000)]
Bug 15084: Add tests for Koha::Acquisition::Currenc[y|ies]
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Thu, 29 Oct 2015 14:51:37 +0000 (14:51 +0000)]
Bug 15084: Remove C4::Budgets::ConvertCurrency
This subroutine is unused and can be removed.
There is no trace left of currency in C4::Budgets.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Thu, 29 Oct 2015 12:21:52 +0000 (12:21 +0000)]
Bug 15084: Replace C4::Budgets::GetCurrencies with Koha::Acquisition::Currencies->search
Most part of the code here is unnecessary complex. We should selected
the currency if it is selected, that's all :)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Thu, 29 Oct 2015 11:43:29 +0000 (11:43 +0000)]
Bug 15084: use Koha::Acquisition::Currenc[y|ies] in admin/currency
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Thu, 29 Oct 2015 15:31:39 +0000 (15:31 +0000)]
Bug 15084: Make sure the previous active currency is marked as inactive
On inserting an active currency, others should be marked as inactive.
We can only have 1 active currency at the same time.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
The first step of this patch set is to move the business logic code from
admin/currencies.pl to Koha::Acquisition::Currenc[y|ies].
Then a foreign key will be created on aqorders.currency as we want to
assure data integrity. Note that a aqbooksellers.currency also exists
but is never used. It could be removed in another bug report.
This update has to care about possible breaking relation. For instance
an old order has been made using a currency which is now deleted. To be
sure the update process won't break a new column currency.archived is
created and leave open the door for a further improvement (marked a
currency as archived from the interface: this won't be provided by this
enhancement).
These archived currencies won't appear on the interface for newly
created items (order/suggestion).
Once this is done it becomes easy to remove the subroutine from
C4::Budgets: GetCurrencies and GetCurrency.
ConvertCurrency will also be removed but is not used anymore.
Note that none of these subroutines were covered by tests. Now they are.
Test plan:
0/ Don't apply this patch
1/ Create a temporary currency and an order using it
2/ Remove the currency from your CLI
3/ Apply the patch and execute the DB entry
4/ Note that the currency is inserted and marked as archived.
5/ Edit the previous order and confirm that the correct currency is
still selected.
It won't never be displayed anywhere else.
6/ Test the admin script: on admin/currency.pl add/remove/edit
currencies.
You could not have 2 active currencies at the same time.
7/ Then on the different scripts of the acquisition module, focus on the
currencies values and create a new order, receive it.
Create/edit a suggestion
Other changes must be checked by the QAer.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Kyle M Hall [Thu, 21 Aug 2014 15:22:30 +0000 (11:22 -0400)]
Bug 12803 - Add ability to skip closed libraries when generating the holds queue
The holds queue is typically generated many times a day in order to
select items to fill holds. Often these items are to be sent to a
different library. However, if the library whose item is picked to fill
a hold is closed, that hold will remain unfilled even if there are other
open libraries who own that item. It would be helpful if we could skip
closed libraries for the purpose of selecting items to fill holds.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Create a record with two items on it, one at Branch A, and one at
Branch B
4) Place a hold for pickup at Branch C
5) Generate the holds queue
6) Note which branch's item is selected for the hold
7) Enable the new system preference HoldsQueueSkipClosed
8) Add today as a holiday for that branch noted in step 6
9) Regenerate the holds queue
10) View the holds queue, notice the item selected is not from
the closed branch!
11) prove t/db_dependent/HoldsQueue.t
Signed-off by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Marcel de Rooy [Mon, 15 Feb 2016 08:13:58 +0000 (09:13 +0100)]
Bug 12426: [QA Follow-up] Clear to_address to force update
When resending an email from the Notices tab in Patrons, we would like
to use the recent email address.
Test plan:
[1] Look up a patron with some notices sent.
[2] Adjust the patron email address (watch AutoEmailPrimaryAddress).
[3] Resend the notice. Verify if the new address was used.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This patch allows to resend both sent and failed messages.
With messages in 'sent' status, we have to be careful not to accidentally send
sent messages again. With the previous patch using GET request, this was likely
to happen because of browser storing the GET parameters.
This patch changes request method from GET to POST. Instead of a simple link,
we now have a form element.
In notices.pl we redirect back to notices.pl, because with POST there is a risk
of resending the message accidentally by form resubmission at refresh.
To test, find/create a Patron that has sent or failed notices in message_queue:
1. Enable EnchancedMessagingPreferences system preference
2. Go to Patrons -> Notices
3. In the Notice column, click the title of the sent or failed message
4. Observe that there is nothing for resending the sent or failed message
5. Apply the patches.
6. Reload Notices page and repeat step 3
7. Observe that there is now a link "Resend" in the Status-column
8. Click Resend
9. Observe that the message gets into 'pending' status
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Mon, 14 Sep 2015 10:35:56 +0000 (11:35 +0100)]
Bug 12426: Simplify the code adding a new subroutine GetMessage
The C4::Letters module does not have a GetMessage subroutine, which
could be quite useful.
This patch adds it and simplifies the code added by the previous patch.
It also adds a few tests and fixes POD typos.
Note that ResendNotice only resends failed messages. This will avoid to
resend already sent messages (using an url from the browser history for
instance).
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Bug 12426: Allow resending of messages from the notices tab in the patron account
This patch adds a link 'Resend' under a notice in 'failed' status
in the Patron's Notices tab.
By clicking the link, we will request notices.pl with parameter
"resendnotice=XXXXX" where XXXXX is message_id. In notices.pl,
we then check whether the given message is actually in 'failed'
status. If so, we use the C4::Letters::ResendMessage(123) to
change the status of the message into 'pending'. This way it
will be processed again by the cronjob process_message_queue.pl.
To test, find/create a Patron that has failed notices in message_queue:
1. Enable EnchancedMessagingPreferences system preference
2. Go to Patrons -> Notices
3. In the Notice column, click the title of the failed message
4. Observe that there is nothing for resending the failed message
5. Apply patch.
6. Reload Notices page and repeat step 3
7. Observe that there is now a link "Resend" in the Status-column
8. Click Resend
9. Observe that the message gets into 'pending' status
Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Mirko Tietgen [Thu, 3 Mar 2016 06:58:55 +0000 (07:58 +0100)]
Bug 14168: (followup) require WWW::YouTube::Download only when syspref enabled
This patch fixes the problem of missing WWW::YouTube::Download breaking
record detail views. Instead of a general 'use', the module is only
required if the related syspref is enabled.
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Wed, 25 Sep 2013 14:45:14 +0000 (16:45 +0200)]
Bug 11023: Automatic item modification by age (Was Toggle "new" status")
This patch adds:
- a new DB field items.new.
- a new page to configure this new status
(tools/toggle_new_status.pl).
- a new cronjob script (misc/cronjobs/automatic_item_modification_by_age.pl
was misc/cronjob/toggle_new_status.pl)
Why this status is useful for some libraries ?
The use cases are:
- to know easily what are the new items (with a simple sql query).
- to display an icon in the search results.
- issuing rules can be adapt for new items. Automatically (using the
cronjob script), the status change (depending the configuration) and
the item can be issued, for example.
- a RSS/Atom feeds can be created on these new items.
Test plan:
- log in with a librarian having the tools > items_batchmod permission.
- navigate to Home > Tools > Automatic item modifications by age (was: Toggle new status)
- click on the edit button
- there are 3 "blocks":
* duration: the duration during an item is considered as new.
* conditions: the status will change only if the conditions are meet.
* substitutions: if there is no substitution, no action will be done.
You can add some change to apply to the matching items.
E.g. ccode=3
new=''
If the value is an empty string (in other words, the input does not
contain anything), the field will be deleted.
You can create as many rules as you want.
- test the interface : add/remove rule, conditions, substitutions,
submit the form, edit, etc.
(There is a looot of JS everywhere, so certainly a looot of bugs...).
- when you have your rules defined, you can now launch the cronjob
script without any parameter.
A report will be displayed with the matching itemnumber and the
substitutions to apply. Verify results are consistent.
- launch the script with the -c argument and verify values have been
modified depending the substitution rules.
Signed-off-by: juliette et remy <juliette.levast@iepg.fr> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023: Add the ability to specify fields from biblioitems table.
Test plan:
Same as before but try with fields from the biblioitems table.
Signed-off-by: juliette et remy <juliette.levast@iepg.fr> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023: Add UT for C4::Items::ToggleNewStatus
Test plan:
prove t/db_dependent/Items/ToggleNewStatus.t
Signed-off-by: juliette et remy <juliette.levast@iepg.fr> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023: FIX - condition on biblioitems table does not work
If a rule contains a condition on the biblioitems table, the match won't
work. This patch fixes this issue.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023: Use DBIx-Class to retrieve column names
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023: Don't use the biblioitems fields for the subtitution
It's dangerous to allow a change on the biblioitems fields with this
feature.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023: Rename the duration parameter with 'age'
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023: The age parameter should be a number
The template should check if the age parameter is correctly filled
(should be a number).
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023: Change the name of the feature
Originaly this feature only permits to update the "new" field.
Now all item fields can be updated.
The name of the feature is now "Automatic item modifications by age".
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023 [QA Followup]
* Update DB version
* Fix capitalization error
* Rename misc/cronjobs/toggle_new_status.pl to misc/cronjobs/automatic_item_modification_by_age.pl
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 11023 [QA Followup] - Complete the renaming of "toggle new status" to "automatic item modification by age"
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Owen Leonard [Tue, 23 Feb 2016 19:27:31 +0000 (14:27 -0500)]
Bug 15887: Revise layout and behavior of item search fields management
This patch adds some JavaScript to the item search fields management
page so that the add form is not displayed by default. This simplifies
the interface and makes it more consistent with other similar
interfaces.
Also changed in this patch:
- Changing instances of "Items search fields" to "Item search fields."
- Correct form structure to use ordered list
- Add "required" classes and enable built-in JS form validation.
- Add explicitly labeled "Choose" options to <select>s.
- Add missing ids to form fields (labels don't work without them).
- Correct classes of message and alert dialogs.
- Add JS confirmation of deletions.
- Convert MARC tag and subfield dropdowns to regular inputs (Bug 15384).
To test, apply the patch and go to Administration.
- Confirm that the "Item search fields" link is correct.
- Follow the link and confirm that the list of existing fields is shown
by default, or a message saying there are no existing fields.
- Click the "New search field" button and confirm that it displays the
entry form.
- Confirm that submitting an empty form does not work.
- Confirm that clicking the "Cancel" link correctly hides the form.
- Confirm that submitting valid data works correctly.
- In the table of existing item search fields, confirm that the "Edit"
button works correctly.
- Confirm that submitting edits works correctly.
- In the table of existing item search fields, confirm that clicking
"Delete" highlights the row in question and a confirmation dialog
appears.
- Test both canceling and confirming deletion.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described. JSHint OK, koha-qa OK.
Revision per QA: Undid the change making tag and subfield inputs text
fields.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Owen Leonard [Fri, 26 Feb 2016 18:27:17 +0000 (13:27 -0500)]
Bug 15927 - Remove use of <tr class="highlight"> for alternating row colors
The "highlight" class on table rows is unnecessary since we have a CSS
rule which defines colors for alternating row colors. This patch removes
use of the "highlight" class from templates and removes the definition
from staff-global.css
To test, view the affected pages and confirm that the change has not
broken anything.
Acquisitions -> Vendor -> View basket
Acquisitions -> Late orders
Acquisitions -> Ordered
Acquisitions -> Vendor -> Receive shipment
Acquisitions -> Spent
Acquisitions -> Vendor details -> Contracts table
Administration -> MARC frameworks (comment removed only)
Administration -> Class sources
Authorities -> Authority search results
Catalog -> Bibliographic detail page -> Items -> View item's checkout
history
Catalog -> subject.tt (is this template used?)
Cataloging -> Cataloging search results
Patrons -> Patron account
Reports -> Patrons who haven't checked out
Reports -> Statistics wizards -> Patrons
Reports -> Top lists -> Most-circulated items
Reports -> Inactive -> Items with no checkouts
Reports -> Reports dictionary
Reports -> Statistics wizards -> Circulation
Reports -> Statistics wizards -> Holds
Holds -> Place a hold -> Existing holds table
Serials -> New subscription -> Search for a vendor -> Search results
Serials -> Check expiration
Serials -> Subscription -> Serial collection
Serials -> Subscription -> Serial collection -> Edit serials
Suggestions
Tags -> View tags -> View titles with a tag
Tools -> Manage staged MARC records -> Batch (I think the affected
section of this template is obsolete)
Tools -> Log viewer -> Log result
Lists -> View lists (May be broken by Bug 15916)
Note that if you search the templates for instances of a <tr> with a
"highlight" class you'll find two instances in slip templates which
refer to a class defined in printreceiptinvoice.css.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Looks good. Haven't seen any regression.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Galen Charlton [Tue, 1 Mar 2016 13:51:56 +0000 (13:51 +0000)]
Bug 15947: move SIPILS.t to DB-dependent test directory
SIPILS.t requires an active koha-conf.xml to pass,
and consequently is moved to t/db_dependent so that
'make test' can succeed.
To test
-------
[1] Unset KOHA_CONF and either do a make test or a
prove -v t/SIPILS.t. Note that the tests fail.
[2] Apply the patch and run make test again; this time,
the test suite should pass.
[3] Verify that with KOHA_CONF *set*,
prove -v t/db_dependent/SIPILS.t passes.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
To test, apply the patch and clear your browser cache. Edit the primary
email address of a patron so that it is very long. View that patron in
the staff client (on the checkout or details page, for instance) and
confirm that the email address is truncated with "..."
Confirm that the link and the title attribute of the link contain the
correct, full email address.
Revision uses a percentage instead of a fixed width for email display in
the sidebar to accommodate varying sidebar widths. Also added: Handling
of all email addresses displayed on the patron detail page. Although
email addresses in the body of that page were not in the scope of the
original patch, it's a good improvement to include those as well.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Kyle M Hall [Tue, 8 Jul 2014 15:49:50 +0000 (10:49 -0500)]
Bug 14134 - Make "Holds over" show holds expiring tomorrow if ExpireReservesMaxPickUpDelay is set
If ExpireReservesMaxPickUpDelay is enabled, the "holds over" tab becomes
useless. It would be nice if the "holds over" tab would display
*tomorrow's* "holds over" so the librarian can see what will be
automatically canceled over night.
Test Plan:
1) Apply this patch
2) Enable ExpireReservesMaxPickUpDelay
3) Note the "holds over" list now displays holds that will have been
waiting more than the number of days defined in ReservesMaxPickUpDelay
as of tomorrow.
Signed-off-by: Jason Burds <JBurds@dubuque.lib.ia.us> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Bug 14532: (followup) Use tar's --exclude for simplicity
This patch creates an --exclude definition for the tar command
so it is easier to stack excluded stuff. It does so for the
authority and biblio indexes if --exclude-indexes is passed.
A side effect from this, is that uploads and plugins are still
backed up, as Jonathan noted.
Regards
Edit: Fixed a weird quoting problem.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Bug 14532: Add --exclude-indexes switch to koha-dump
This patch changes the default behaviour of koha-dump to make the inclusion
of Zebra indexes on the dump optional. It does so by introducing a new option
switch that allows to have the previous behaviour in place.
To test:
- Run
$ koha-dump your_instance
- Save a copy of the dump files
- Apply the patch / extract the koha-dump script
- Run the new one:
$ koha-dump your_instance
=> SUCCESS: Verify the contents of the dump are the same
(i.e. it includes /var/lib/koha/your_instance)
- Run with the new switch:
$ koha-dump --exclude-indexes your_instance
=> SUCCESS: The dump does not contain stuff from /var/lib/koha/your_instance
- Go through the rest of the new option switches
-h | --help
-q | --quiet
=> SUCCESS: They work as expected.
- Sign off :-D
Regards
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Jesse Weaver [Mon, 31 Aug 2015 23:45:16 +0000 (17:45 -0600)]
Bug 14659: Allow patrons to enter card number and patron category on OPAC registration page
Test plan:
1. Open OPAC self-registration page while logged out.
2. Note that cardnumber and categorycode are not shown.
3. Remove cardnumber and categorycode from
PatronSelfRegistrationBorrowerUnwantedField.
4. Enable autoMemberNum.
5. Reload self-registration page, note that categorycode now shows.
6. Disable autoMemberNum.
7. Reload self-registration page, note that cardnumber now shows.
8. Try saving a patron with an existing cardnumber; this should fail
and explain why.
9. Set CardnumberLength, and verify that those length restrictions are
enforced.
10. Verify that patron can be created with custom categorycode and
cardnumber.
Signed-off-by: Michael Sauers <msauers@dospace.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Kyle M Hall [Fri, 28 Aug 2015 11:31:10 +0000 (07:31 -0400)]
Bug 14751 - Allow C4::Context->interface to be set to 'sip' or 'commandline'
Koha::Logger allows us to split up logging to separate files based on
the interface. However, right now the interface is limited to just
'opac' or 'intranet'.
We should extend this to allow the interface to also be set to 'sip'
for SIP server logging, and to 'commandline' for cronjobs and all other
command line scripts.
Signed-off-by: Chris <chris@bigballofwax.co.nz>
Does what it says on the tin
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Nick Clemens [Wed, 10 Feb 2016 00:54:26 +0000 (00:54 +0000)]
Bug 14753 - Use columns configuration for checkins table
This patch adds the ability to configrue the visible columns on the
check in screen.
To test with both patches:
1 - Check in an item
2 - Note there is no 'Date acquired' column
3 - Apply patches
4 - Note there is still no 'Date acquired' column
5 - Note that there is now a "Show / hide columns" button
6 - Verify that you can check the box and view the 'Date acquired'
column
7 - Verify that showing/hiding columns works (it will not carry over
between items due to page reload)
8 - Verify that changes from the 'Configure columns' section of
Administration hold between checkins
Sponsored by: North Central Regional Library (ncrl.org)
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
C4::Koha::IsAuthorisedValueCategory contains only 2 useful calls, from
C4::Reports::Guided and reports/guided_reports.pl
It can be replaced with
Koha::AuthorisedValues->search({ category => $authorised_value})->count
Test plan:
1/ Create a sql report using an authorised value category, something
like:
SELECT COUNT(*) FROM items where itemlost=<<lost|LOST>>
2/ Execute the report and confirm that everything works fine.
3/ Create a sql report using a nonexistent authorised value categor,
something like:
SELECT COUNT(*) FROM items where itemlost=<<lost|NONEXIST>>
4/ When saving the report, you should get a warning message
"lost: The authorized value category (NONEXIST) you selected does not exist."
5/ Save anyway and execute the report, you should get the same warning
message.
QA:
git grep IsAuthorisedValueCategory
should not return any results
prove t/db_dependent/ReportsGuided.t
should return green
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Aleisha [Mon, 15 Feb 2016 22:14:43 +0000 (22:14 +0000)]
Bug 15821: Use Font Awesome icons in confirmation dialogs - Circulation
To test, apply the patch and test deletion in the following cases. Test
both confirmation and cancel actions.
Circulation -> Check out
-> An item that is checked out by someone else
-> An item that is on hold to someone else
-> To a patron that has more than noisuescharge in fines (Allow
AllowFineOverride syspref)
-> To a patron that has reached the max amount of checkouts (Allow
AllowTooManyOverride syspref)
-> To a patron that has more than noissuescharge in fines (Allow
AllowFineOverride syspref and set noissuescharge syspref)
-> Renew -> An item that is on hold to someone else
-> To a patron that is at max renewals (Allow AllowRenewalLimitOverride syspref)
-> An item that is not checked out by anyone
-> Check in -> An item that is in transit to another branch
And look for other confirmation dialogs and check if I've missed any
Sponsored-by: Catalyst IT
EDIT: Made changes from Comment 2 Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Owen Leonard [Wed, 24 Feb 2016 17:18:01 +0000 (12:18 -0500)]
Bug 15910 - Move header search keep text JavaScript into staff-global.js
Bug 14189 added some global JavaScript to a new include file which is
included in doc-head-close.inc. Since it's included globally, there is
no reason not to move it to staff-global.js. This patch does so.
To test, apply the patch and clear your browser cache if necessary.
- Navigate to any page in the staff client which has multiple header
search tabs.
- Type something in one of the tabs.
- Switch tabs. Verify that your text was copied to the newly-displayed
form field.
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: Brendan Gallagher brendan@bywatersolutions.com