Just as mentioned in the first patch for sendbasket, I discovered that
the call of GetMarcNotes is not really used in sendshelf. The array is
passed to the template, but the template does not use it. (It uses the
information from GetBiblioData.)
Test plan:
[1] Send a list that includes a record with some notes (opac and staff).
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
A simple regex is added to the basket and detail templates to select the
URLs passed separately from MARC21 555$u by GetMarcNotes. Note that the
regex tests if a note starts with http:// or https:// and does not contain
any whitespace in order to be considered as a url.
These URLs are put in an anchor tag.
This touches four places:
[1] opac detail, tab title notes
[2] catalogue detail, tab Descriptions
[3] opac basket, more details, notes
[4] staff basket, more details, notes
Test plan:
[1] Edit a record. Add a 500$a, 555$a and a URL in 555$u.
Put "http://this is not a url" in the 500$a (whitespace!).
[2] Check opac-detail, tab Title Notes. Check the URL.
[3] Do the same for catalogue/detail.
[4] Add record to cart in OPAC. Open basket. Check More details.
[5] Repeat previous step in staff.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This patch removes the code for inserting the <a> anchor tags around
URLs in GetMarcNotes (as added originally).
The URLs are placed in separate array elements; the template should take
care of further handling.
The unit test has been adjusted accordingly.
Test plan:
Run the unit test.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This patch includes:
[1] Add some logic to GetMarcNotes to embed the contents of MARC21 field
555$u in a html anchor tag.
[2] Add a unit test for GetMarcNotes in Biblio.t
[3] Remove calls to GetMarcNotes from sendbasket.pl (opac and staff).
A closer look revealed that the data was not used; the notes in the
mail of sendbasket are taken from GetBiblioData.
Test plan:
[1] Edit a record. Add one or two URLS in 555$u. Add something in 500$a too.
[2] Check if you can click the URLs in opac and staff detail tab Notes or
Descriptions.
[3] Run the unit test t/db../Biblio.t
[4] Add something in the cart. Click More Details and send the cart.
Verify that you have something in Notes (from 500$a).
Signed-off-by: Marc Veron <veron@veron.ch>
Followed test plan. Works as expected. QA tools OK.
Tested with all patches together, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This patch allows for more flexibility for determining when the number
of holds a record has should trigger the reduction of the loan length
for items on that record.
This patch adds a new system preference decreaseLoanHighHoldsControl,
which defaults to 'static', the original behavior of the feature.
It also has a new behavior 'dynamic' which makes the feature only
decrease the loan length if the number of holds on the record exceeds
the number of holdable items + decreaseLoanHighHoldsValue.
It also allows items to be filtered from the list of items based
on the damaged, lost, not for loan, and withdrawn values even if
those values would have allowed holds ( i.e. values < 0 )
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Set decreaseLoanHighHolds to Enable
4) Set decreaseLoanHighHoldsControl to "over the number of items on the record"
5) Set decreaseLoanHighHoldsDuration to 1
6) Set decreaseLoanHighHoldsValue to 3
7) Create a record with 5 items
8) Please 8 or more holds on the record
9) Check out one of the items to a patron
10) Note the loan length is reduced to 1 day
11) Set decreaseLoanHighHoldsValue to 3 to 2
12) Check out one of the items to a patron
13) Note the loan length is *not* reduced
14) Enbale all the filters possible in decreaseLoanHighHoldsIgnoreStatuses
15) Set one item to be damaged
16) Note the loan length is reduced
17) Unset the damaged status
18) Repeat steps 15 - 17 for lost, not for loan, and withdrawn
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
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>
It will prevent wrong value to be selected when the back button of the
browser is used.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
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>
Adding descriptions for changes in t/db_dependent/Biblio.t.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
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>
The commit b5ecefd485
Date: Mon Feb 3 18:46:00 2003 +0000
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
field_200 => {
subfield_a => {
%attributes_of_subfield_a
},
%attributes_of_field_200
}
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>
When you are ready, you still see that small detail.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
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>
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>
NOTE: apply this patch after the additional perltidy patch
this patch is basically a small work-around to fix some confusing login text,
when users enter incorrect auth details via Overdrive's website
with this option disabled (default) there is no change to SIP's behaviour
to test...
1/ configure your overdrive account to talk to your Koha's SIP service
2/ start Koha's SIP
3/ enter a correct username and correct password in overdrive
see overdrive display '(1) Greetings from Koha' (good)
4/ enter a correct username and *incorrect* password in overdrive
see overdrive display '(1) Greetings from Koha' (bad)
5/ enter an incorrect username in overdrive
see overdrive display '(1)' (badder)
6/ apply patch, enable 'overdrive-mode' in Koha's SIPConfig.xml
example...
---------------------
<accounts>
<login id="kohasip" password="xxxxx" delimiter="|"
error-detect="enabled" institution="YYY" overdrive-mode="1" />
</accounts>
---------------------
7/ restart SIP
8/ enter a correct username and correct password
see overdrive display '(1) Greetings from Koha'
9/ enter a correct username and *incorrect* password
see overdrive display '(1) Invalid patron or patron password'
10/ enter an incorrect username and incorrect password
see overdrive display '(1) Invalid patron or patron password'
http://bugs.koha-community.org/show_bug.cgi?id=1387
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>
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>
Run perltidy pro=xt/perltidyrc on the file.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
From C4::Templates::output
# add variables set via param to $vars for processing
for my $k ( keys %{ $self->{VARS} } ) {
$vars->{$k} = $self->{VARS}->{$k};
}
This loop is not necessary, we could do the same with
$vars = { %$vars, %{ $self->{VARS} } };
After a quick benchmark, it gains 100 microseconds when we pass 170 vars
to the template.
Test plan:
Do some clicks on the interface, everything should be ok.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Perl idiosyncratic way of merging hash, clearer, if not quicker (not
verified)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
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>
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>
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>
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>
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>
This patch makes some markup changes to the patron lists interface in
order to make them more consistent with other areas of Koha.
Change to look for when testing:
Tools -> Patron lists:
- Wrap "New patron list" button in standard <div id="toolbar">
- Place toolbar above page heading.
Tools -> Patron lists -> New patron list:
- Use built-in form validation for required fields
- Clarify page title and breadcrumbs on list add and edit
Validation errors have been corrected on all three templates, including
removal of an extra </div>.
Revision: I was wrong about the frequency of use of "Modify." There's no
clear-cut reason to replace it with "Edit" so I have undone that change.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Works as expected. No regression. Better texts. Consistent validation.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
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>
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>
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>
This patch sorts the modification templates when getting them from the
database This affects the pages below:
tools/batch_record_modification.pl
tools/marc_modification.pl
tools/stage-marc-import.pl
To test:
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>
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
$ prove -v t/RecordProcessor.t
...
$ git bz apply 15871
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>
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>
The messages related tests in t/db_dependent/Members.t are not
deprecated and can be removed.
Test plan:
git grep AddMessage
git grep DeleteMessage
git grep GetMessagesCount
git grep GetMessages
should not return any result.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Brendan A Gallagher <brendan@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>