It defaults to 0 in get_template_and_user
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
With previous renew values
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To make this work I moved the _get_sub_length function from
subscription-add.pl to C4/Serials.pm so that the subscription-renew.pl
script could also call it to store the sublength for the appropriate
field of the subscriptions database table.
Test plan:
1. Create a subscription and notice that there is a dropdown box for sub
length containing the values: issues, weeks, months
2. Renew the subscription and notice that there are 3 input text boxes:
'number of num', 'number of weeks' and 'number of months'
3. Input a 'Number of weeks' value of 2
4. Query the subscription database table and notice that the value of 2
has been stored in the weeklength field for the subscription record you
just renewed
5. Apply the patch
6. Renew the subscription and notice that there is now a sublength
dropdown box containing issues, weeks and months
7. Set the month value to 3
8. Query the database and notice that 3 was stored in the monthlength
field for the subscription record
9. Create a new subscription and select the sub length values of issues
and 3
10. Query the database and notice that the numberlength field for the
subscription you just created is set to 3 showing that the sublength
dropbox is still working for creating a new subscription
Sponsored-By: Catalyst IT
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
It will avoid crash and invalid data when creating/updating a
subscription.
This could have been done with a AJAX query but seems more convenient
this way.
Test plan:
- Create or update a subscription
- In the "Vendor" input try an empty string, a valid vendor's id, and
invalid one.
=> With an empty string you get the existing alert message
=> With a valid id you do not get any messages
=> With an invalid id you are not allowed to go to page 2
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
A couple of things wrong in serials/subscription-add.pl
1.
447 if ( defined( $query->param('mana_id') ) ) {
It's always defined, you wanted to test with ""
2.
375 if ( (C4::Context->preference('Mana')) and ( grep { $_ eq "subscription" } split(/,/, C4::Context->preference('AutoShareWithMana'))) ){
Mana == 2 == let me think about it
=> I am not expecting to reach Koha::SharedContent in that case
So we are sharing data whereas the library did not decide yet!
Test plan:
You need to be familiar you Mana to test this patch.
JD: I did not test this patch
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Call it a typo
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
A lot of code can be removed just by using Koha::Object
It also makes fetching and updating additional field values easier.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This also moves the admin page for additional fields for all tables to a
single common screen, and factors out display/input parsing logic.
Test plan:
1. Create an additional field for a subscription (under Serials -> Add
subscription fields).
2. Apply patch.
3. Visit Additional fields under administration, and verify that
the field created above still shows under the list for the
subscription table.
4. Create at least four fields for aqbasket for each combination of
searchable/not-searchable and with/without an authorized value.
5. Create an order basket, and verify that all fields are visible and
correctly save.
6. Edit the basket, verifying that changes to these additional fields
are saved.
7. Add an order to the basket (contents are irrelevant).
8. Go to advanced search within acquisitions.
9. Verify that only the searchable fields show in the form, and that
their contents may be searched.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Includes:
* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments
* SytemPreferences:
Mana Activation:
- add a value "no, let me think about it", that is the default value.
- as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
- Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)
* Interface :
- On mana-search, rows are now sorted by date of last import, then by number of users
- Windows redesigned to improve the user experience
* New Feature : report a mistake.
- people can now report an invalid data (wrong, obsolete,...)
- if a data is reported as invalid many time, it will appear differently
- Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
- When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists
* API (svc/mana)
- add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
- no hardcoding for resources in the code of api (api needs to be called with a ressourcename)
* New feature : SQL report sharing
- Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
- New feature: share reports with Mana-KB
- New feature: search report in Mana-KB with keywords
- New feature: load reports from Mana-KB
Test plan:
1 - Apply Patch + update database
2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
<!-- URL of the mana KB server -->
<!-- alternative value http://mana-test.koha-community.org to query the test server -->
<mana_config>https://mana-kb.koha-community.org</mana_config>
3 - Check Mana syspref and AutoShareWithMana syspref are not activated
4 - Search the syspref ManaToken and follow the instructions
5 - subscriptions
- Try create a new subscription for a first serial => Mana-KB shouldn't show you anything (except if the base hase been filled)
- Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
- Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
- Activate AutoShareWithMana => Subscriptions
- Create a new subscription for a second serial
- There shouldn't be any Share button
- Create a second subscription => the message should appear, click again on use
6 - SQL Report
- Create a new SQL report, without notes.
- On the table with all report (reports > use saved), there should be the action "Share"
- If you click on share, you have an error message
- Create a new report, with a title and notes longer than 20 characters
- You can share it with mana => you will have a success message
- On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list.
7 - Report mistakes.
- On any table containing Mana-KB search results, you can report a mistake and add a comment.
8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
- add a class SharedContent.pm to communicate with Mana-KB server
- add a link in serials-menu.inc to serials_search.pl to open
a mana-subscription research form
- modify the research form in serials-search.tt to show the right fields
for Mana-KB
- create datatable in mana-subscription-search-result.inc to show
results from a research on Mana-KB
- modify serials-search.pl to manage research on Mana-KB
- add a mana_id to subscription table
- add a share button on serials-toolbar.inc and a modal to ask
the language of the share and to alert if the subscription is
already link to a Mana-KB subscription model
- add function in C4/Serials to get all the info for a subscription
sharing
- modify subscription-detail.pl to manage sharing to Mana-KB
- modify subscription-add.tt and subscription.pl to manage a
import from Mana-KB during a subscription creation
- add 2 script in svc for ajax calling from subscription-add.tt
to communicate with Mana-KB server during a asubscription creation
- add a function in Subscription.pm to have all the info for a Mana-KB research
from a biblionumber
- modify functions used by subscription-add.pl in C4/Serials to manage a
frequency which came from Mana-KB server and not already created on the
koha database, and modify the tests of the said functions
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The idea of output_and_exit_if_error (added by bug 18403) is to make sure
parameters are valid before executing the script.
If not (old or broken URLs), we shortcut everything coming next to display a
generic error ("object does not exist", "you do not have permission to do that", etc.)
This bug report fixes the scripts under serials/*.
Test plan:
Hit the script under the serials directory with an invalid subscriptionid parameter
and confirm you get an error instead of the normal view with empty values.
The goal is not to be exhaustive during the first iteration, but at least to fix
the most common views.
For instance:
/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=XXX
/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=XXX
/cgi-bin/koha/serials/routing.pl?subscriptionid=XXX&op=new
/cgi-bin/koha/serials/subscription-add.pl?op=modify&subscriptionid=XXx
/cgi-bin/koha/serials/subscription-add.pl?op=dup&subscriptionid=XXX
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
In subscription-add.pl, the two params aren't passed to
NewSubscription() but they are to ModSubscription()
== Test plan ==
1. Enable syspref "makePreviousSerialAvailable"
2. Create a minimal subscription with a value in the "Item type" and
"item type for older issues" fields.
3. Edit the subscription
4. You should see that the two fields are empty. This is the bug.
5. Apply this patch
6. Do step 2 and 3
7. You should see that the two fields have the right value
8. Express the joy of a successful and easy sign off.
(this is important, otherwise the sign off spell won't work!)
Signed-off-by: delaye <stephane.delaye@biblibre.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
Check that use strict; use warnings; doesn't exist in the following
files and use Modern::Perl; is written instead.
acqui-search-result.pl
acqui-search.pl
checkexpiration.pl
reorder_members.pl
routing-preview.pl
routing.pl
serials-collection.pl
serials-edit.pl
subscription-add.pl
subscription-bib-search.pl
subscription-renew.pl
viewalerts.pl
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
If a librarian has edit_subscription but not create_subscription :
When trying to edit a subscription, after saving permission is denied.
This is because permissions in serials/subscription-add.pl depends on arg 'op' and on edit this arg starts with 'modify' but changes to 'modsubscription' when saving.
Test plan :
- Create a user with staff access
- Define its permissions on serials : only edit_subscription
- Edit a subscription
- Click 'Next'
- Click 'Test prediction pattern'
- Click 'Save subscription'
=> Without patch you get to page serials/subscription-add.pl with permission denied
=> With patch subscription is saved and you get to subscription details page
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Change parameters to a hashref.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Looks good to me.
Two calls in migration_tools/22_to_30 still in old style.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Most of the time C4::Biblio::GetBiblioData is used to retrieve the title
and/or the author of a bibliographic record.
This patch replaces the easy occurrences of GetBiblioData, the ones
where the 2 joins are needed, but only data from biblio and biblioitems
table are.
Test plan:
It will be hard to test everything, I'd suggest a QAer to review this
patch and confirm that the difference occurrences of GetBiblioData have
been correctly replaced by calling Koha::Biblios->find or
$biblio->bibioitem
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Lari Taskula <lari.taskula@jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
To test:
Load subscription-add.pl
Get an error
Apply patch
Reload
Koha is less sad (page loads okay)
Verify that normal functions work
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
When enabling the makePreviousSerialAvailable syspref, the previously
received serial's itemtype is set as defined in the subscription.
(Please note that the item-level_itypes syspref must be set to specific item.)
It is also made available.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
http://bugs.koha-community.org/show_bug.cgi?id=7767
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch replaces the occurrences of
my @foo = $cgi->param('foo');
with
my @foo = $cgi->multi_param('foo');
perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
From C4::Koha::GetAuthorisedValues
# TODO: the "selected" feature should be replaced by a utility function
# somewhere else, it doesn't belong in here. For starters it makes
# caching much more complicated. Or just let the UI logic handle it, it's
# what it's for.
Indeed, it's not a job for a subroutine, the template should take care of that.
Note that a perf gain could be won with this patch \o/
Test plan:
- Edit an itemtype and check the value of the "Search category" dropdown list
- Edit a patron attribute type and check the value of the "Class" dropdown list
- Detail for a catalogue record, the Status column should be correctly
populated if items are damaged and/or lost
- Item details for a catalogue record, the lost, damaged and withdrawn
value should be correctly displayed
- Edit a patron, the "street type" should be correctly selected
- Create a patron attribute type linked to an authorised value list.
- Edit a patron, set a value for this attribute, edit it again. The
correct value should be selected.
- Search for subscriptions. The 'Location' dropdown list should behave
correctly (select the entry you have choosen before, etc.)
- Edit a subscription, the location dropdown list should select the
correct value.
- Edit and view a suggestion with a 'reason for suggestion' set (you
should have at least 1 OPAC_SUG AV defined)
Followed test plan, works as expected
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Removes warn using Jonathan's suggestion!
To test:
1) Reproduce warns by clicking New Subscription
2) Apply patch
3) Click New Subscription again
4) Confirm warns are gone
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Patch removes the warn that come when clicking "New subscription"
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Warning: This area is a mess, especially with date management.
For the same reasons as other "Remove C4::Dates from*" patches, this one
will deal with the serials module.
Note that this patch add the datepicker on 3 input fields (on
serials/subscription-detail.tt and serials/subscription-renew.tt).
There was also weird behavior when the dates were invalid. Now default
to undefined. But with the datepicker it will reduce the number of
cases even if the user is still allowed to fill invalid dates.
Test plan:
1/ Create a subscription, fill the first issue pub date and the
subscription start date.
You can fill or not the end date.
Play with the numbering pattern and confirm that there are generated as
before this patch.
2/ On the check expiration page, confirm that the dates are correctly
displayed.
3/ Renew the subscription and confirm that the behavior is correct.
4/ Go on the subscription history page and confirm you have now the
datepicker plugin set on the 2 date fields.
QA notes: The startdate, histstartdate and enddate are not used in
the serials-collection template, this patch removes them from the pl
script.
Tested on top of 15166 15168 15171, full browser reload for date pickers.
Note for 4/: It is the link in tab planning on subscription
detail page, near "Manual history" (if manual history is enabled).
Works as advertised.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
In subscription-add.pl, the code for inserting additional_fields is not
the same for updating and inserting.
This patch refactores this code in code to do the same tests.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 10855: FIX: Add additional fields for closed subscriptions
Bug 10855: Fix instance vs static method
This patch fixes the error message.
The 3 modified routines *are* static methods.
Bug 10855: FIX conflicts with bug 7688
Bug 10855: Fix typo addition_fields -> additional_fields
Bug 10855: A partial search should return the subscriptions
If a search on an additional fields is done using a partial string
("foo" and the defined value is "foobar"), the subscription should
appear in the result list.
Test plan:
Try to search a part of the string for an additional field.
Bug 10855: Filtering on additional fields don't work if value is equal to 0
If you tried to filter on an additional field linked to an authorised
value, that did not work if the value was 0.
Bug 10855: Remove the advanced serial search box on the serial home page
Bug 10855: FIX an add field should not be created if the marc field does not exist.
This patch fixes the following:
Create an add fields linked to a nonexistent marc field (does not exist
in serials).
Edit a subscription and save.
Without this patch, an error occured:
Software error:
DBD::mysql::db do failed: Column 'value' cannot be null at
/var/root-koha/bug-10855/Koha/AdditionalField.pm line 107.
Bug 10855: Fix Type table vs tablename
Koha::AdditionalField->all method take "tablename" not "table" in
parameter".
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds the ability to add values for additional fields when
adding/updating a subscription.
Test plan (test the following on adding a new subscription and on
editing an existent one):
- add/edit a subscription.
- verify all additional fields appears into the "Additional fields"
block.
- fill a value for af1 and af3.
- fill others values if you are adding a new subscription.
- save.
- verify values appears on the detail of the subscription page.
- verify the af2 field is automatically filled with the specified
marc field of the notice.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The subscription length is always set to the first/default value
('issues') when editing a subscription.
Even if you selected another value on creating/editing it, the form will
show you the first option.
Test plan:
1/ Add/Edit a subscription, select a subscription length different of
the first value (issues)
2/ Edit the subscription and confirm the value is kept
Bonus: issues, week and months become translatable.
Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
http://bugs.koha-community.org/show_bug.cgi?id=9987
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The GetLetters subroutine should return an arrayref with different
letters for a module.
Test plan:
0/ Delete your notices with module=claimacquisition, claimissues,
serial
1/ Go on the late orders page (acqui/lateorders.pl) and verify you
cannot choose a notice for claiming
2/ Create a notice with module=claimacquisition
3/ Go on the late orders page (acqui/lateorders.pl) and verify you
can choose the notice for claiming
4/ Go on the Claim serials page (serials/claims.pl) and repeat the same
thing with the a "claimissues" notice
5/ Create a new subscription (serials/subscription-add.pl) and verify
you cannot choose a notification for patrons.
6/ Create a notice with module "serial" and verify you can.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Additional tests done:
- copy notice ODUE, on saving you are now prompted to choose
a new CODE for the notice
- edit new notice, try to set code back to ODUE. You are
prompted that the code is already in use.
This will prevent people from accidentally overwriting a letter
with the same letter code.
This patch produces the same dropdown list as the one in the adv search.
With this way, it won't be necessary to install additional templates to
fill the locale list.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The locales list for subscriptions should not be retrieved from the
locales of the system.
This patch retrieves the locales list from the Koha DB (in the same way
as pref language and opaclanguages).
Test plan:
Edit a subscription (or a numbering pattern) and verify the list of
languages is the same as languages available in Koha.
Note: with this patch we loose the saeson translation, it is
normal. See report linked.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors.
New locale is retrieved from installed languages.
I wonder if that list can be restricted to
'enabled' ones (parsing syspref language value).
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and all tests.
Works according to description.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The method of checking the logged in user for superlibrarian privileges
is obtuse ( $userenv && $userenv->{flags} % 2 != 1 ) to say the least.
The codebase is littered with these lines, with no explanation given. It
would be much better if we had one subroutine that returned a boolean
value to tell us if the logged in user is a superlibrarian or not.
Test Plan:
1) Apply this patch
2) Verify superlibrarian behavior remains unchanged
Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>
Serials numbering pattern and frequencies are no longer hard-coded. Now
it's possible to create, edit and delete numbering patterns (and
frequencies). This patch adds two new sql tables
(subscription_numberpatterns and subscription_frequencies)
Numbering patterns behave almost as before, there are still the same
values to configure (addX, everyX, settoX, whenmorethanX). lastvalueX
and innerloopX remain in subscription tables.
There is a new value in numbering patterns: numberingX. For each
"column" (X, Y or Z) you can tell how to format the number. Actually
numberingX can be set to:
- 'dayname' (name of the day) (0-6 or 1-7 depending on which day is the
first of the week)
- 'monthname' (name of the month) (0-11)
- 'season' (name of the season) (0-3) (0 is Spring)
These names are localized by using POSIX::setlocale and POSIX::strftime
and setting a 'locale' value to the subscription. Locale have to be
installed on the system.
Note that season names are not localized using POSIX::strftime (it can't
do this), so names are hardcoded into the code (available languages: en,
fr). This could be fixed in the future by using a Perl localization
framework.
Frequencies can be configured using 3 parameters:
- 'unit': one of 'day', 'week', 'month', 'year'
- 'issuesperunit': integer >= 1, the number of received issues per
'unit'
- 'unitsperissue': integer >= 1, the number of 'unit' between two
issues
One of 'issuesperunit' and 'unitsperissue' must be equal to 1.
Examples:
unit = 'day', issuesperunit=3, unitsperissue=1 => 3 issues per day
unit = 'week', issuesperunit=1, unitsperissue=3 => 1 issue each 3
weeks
Prediction pattern is now computed server-side and is more consistent
with what Koha will do. The publication date is displayed alongside the
serial number.
Irregularities can now be checked one by one, in the prediction pattern
table, or if frequency is 'day-based' (unit is 'day'), there is the
possibility to check all issues for a week day at once.
When an irregularity is found, there is the possibility to keep the
serial number unchanged, or to skip it. It is configured at subscription
creation or modification.
For instance, with a daily subscription you can have:
skip serial number | keep serial number
----------------------+----------------------
2012-01-01 ¦ No 1 | 2012-01-01 ¦ No 1
2012-01-03 ¦ No 3 | 2012-01-03 ¦ No 2
To lighten the subscription modification page, manual history has been
moved in its own page subscription-history.pl which is accessible on
subscription-detail.pl, tab 'Planning'.
Important note: updatedatabase.pl script takes into account existing
subscriptions and create appropriate numbering patterns for them (it
tries to create as few patterns as possible). Frequency is
mapped to the correct entry in subscription_frequencies table.
This patch includes kohastructure.sql and updatedatabase.pl changes
+ sample frequencies data and sample numberpatterns data for fresh
installs (sample data is included in updatedatabase.pl)
=== TEST PLAN: ===
Create a new subscription:
- Go to Serials module and click "New subscription" button
- On the first page, choose a biblio and click next to go to the
second page
- Pick a first issue publication date
- Choose frequency '1/day'
- Choose a subscription length of 15 issues
- Choose a subscription start date
- Choose numbering pattern 'Volume, Number'
- A table appears, fill 'Begins with' cells with '1'
- Click on 'Test prediction pattern' button
The prediction pattern is displayed at the right of the page. You can
see in it the serial number, the publication date and a checkbox to
allow you to choose which serials will not be received (irregularities).
You can see that serial number start from "Vol 1, No 1" continue to "Vol
1, No 12" and then restart with "Vol 2, No 1".
Frequency is '1/day' so you can see that publication date is incremented
by one day line after line.
- Now you can play a little with frequencies and numbering patterns,
change one of them (or both) and click again on 'Test prediction
pattern'
- For example, choose frequency '3/weeks' and click on 'Test
prediction pattern' button'.
There is a little behaviour change compared with current master.
Publication date will not be guessed within the week. Koha can't know
when you will receive issues. So the publication date stay the same
(monday of each week) for 3 consecutive issues and then jump to the next
week.
- Now choose frequency '1/3 months' and numbering pattern 'Seasonal'
- Fill 'Begins with' cells with '2012' for Year and '0' for Season
- Click on 'Test prediction pattern'
- You should have something like 'Spring 2012', 'Summer 2012', ...,
'Winter 2012', 'Spring 2013'
- Note that you can have seasons for south hemisphere by entering '2'
in 'Year/Inner counter'
- 2nd note: if you have some locales installed on your system, you can
type its name in the 'Locale' field (actually it does not work for
seasons name, only for month names and day names)
If you want to modify the numbering pattern you can still do it here:
- Click on 'Show/Hide advanced pattern' link. The advanced pattern
table is shown but all fields are readonly
- Click on 'Modify pattern' button. All readonly fields are now
editable. Note that 'Begins with' and 'Inner counter' line are
repeated here and any modifications in the small table will be
replicated in the big table, and vice versa.
- Pattern name is emptied, if you type a new name, a new pattern will
be created, and if you type the same name as an existing numbering
pattern, this one will be modified (with a confirmation message)
- There is two new lines in this table:
- Label: it's what is displayed in the smaller table headers above
- Numbering: used to format numbers in different ways. can be
'seasons', 'monthname' or 'dayname'. Month name and day name can be
localized using the 'Locale' field. Seasons can't (values for
English and french are hard-coded in Serials.pm)
- You can modify what you want in the table and click on 'Test
prediction pattern' button each time you want to see your
modifications. (Note that checkboxes for irregularities aren't displayed
in this mode, and you can't save the subscription until you have saved
or cancelled your changes).
- To cancel your modifications, just click on 'Cancel modifications'
button.
- To save them, click on 'Save as new pattern'. If the pattern name is
already existing, a confirmation box will ask you if you want to
modify the existing numbering pattern. Otherwise a new pattern will be
created and automatically selected.
Once you have finished modifying numbering pattern, you can click again
on 'Test prediction pattern' to define irregularities, and then click on
'Save subscription'.
Now you can check the serials module still works correctly:
- Check the subscription detail page to confirm that nothing is
missing. Especially the 'Frequency' and 'Number pattern' information.
- Try to receive some issues. Check that the serial number is correctly
generated and if irregularities you have defined are taken into
account (if you have defined some).
- Check that receiving is blocked once you have reached the number of
issues you have defined in subscription length (or once you have
reached the subscription end date)
In serials menu (to the left of almost each page of serials menu) you
have two new links: 'Manage frequencies' and 'Manage numbering
patterns'.
'Manage numbering patterns' lead to a page which list all numbering
patterns and allow you to create, edit or delete them. The interface is
almost the same as numbering pattern modification in subscription-add.pl
'Manage frequencies' lead to a page which list all frequencies and allow
you to create, edit or delete them.
Try to create a new frequency:
- Click on 'Manage frequencies' link in the serials menu and then click
on 'New frequency':
- Fill in the description (mandatory).
- Unit is one of 'day', 'week', 'month', year' or 'None' ('None' is for
an irregular subscription)
- If unit is different from 'None' you have to fill the two following
fields (Issues per unit, and Units per issue)
- Note that at least one of those must be equal to 1
- Issues per unit is the number of received issues by 'unit' and Units
per issue is the number of 'unit' between two issues
- Display order is used to build the drop-down list. Leave empty and it
will be set to 0 (top of the list)
- Then click on 'Save'
- Check that this new frequency appears in the frequencies table and in
the drop-down list in subscription-add.pl
Subscription history has been moved in its own page. To test if it still
works, choose a subscription with manual history enabled (or modify an
existing subscription to turn on manual history).
- On the detail page, tab 'Planning', you should have a link 'Edit history'.
- Click on it
- Modify history and click on Save
- In tab 'Summary' you should have the infos you just entered
And finally, you can check that old subscriptions (by old I mean
subscriptions that existed before the update) are correctly linked to an
existing numbering pattern and an existing frequency. Numbering patterns
should be named 'Backup pattern X' where X is a number.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Great development! Work as described. No koha-qa errors
(with all patches applied). Please QA this fast.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Squashed commits:
-----------------
Bug 7688 follow-up: Small fixes for QA
- # Subroutines::ProhibitExplicitReturnUndef: Got 1 violation(s) in
C4::Serials::GetSubscriptionIrregularities
- Bad template constructions fixed in serials/subscription-add.tt
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
----
Bug 7688 follow-up: Small fixes for QA #2
- "return undef" -> "return"
- ":utf8" -> ":encoding(UTF-8)"
- TAB -> SPACES
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
----
Bug 7688: Translate sample frequencies for french
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
----
Bug 7688: Fix generating next serial when there is no 'Expected' issue
It can happen when the Expected issue is claimed. In this case the
status of the last serial is 'Claimed'
This patch change the API of GetNextSeq and GetSeq
Test plan:
- Create a subscription which starts a long time ago so that serials
automatically appear in late issues
- Receive the first serial
- Go to claims page and claim the 2nd serial.
- Go back to the subscription page and click on 'Serial collection'
- You should have 2 serials, one 'Arrived' and one 'Claimed'.
- Click on Generate Next. This should fail with a software error message
("can't call method output ...")
- Apply this patch and click again on Generate Next. A new issue must be
created with status 'Expected'.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
----
Bug 7688: Followup FIX perldoc
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Test Plan:
1) Enable IndependantBranches
2) Apply this patch
3) Run updatedatabase.pl
4) Verify that the system preference still functions correctly
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This reverts commit 60508cb03d, reversing
changes made to 8579d07f14.
The patches for bug 7688 caused a failure in t/db_dependent/Serials.t:
not ok 8 - test getting history from sub-scription
Conflicts:
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
kohaversion.pl
Serials numbering pattern and frequencies are no more hard-coded. Now
it's possible to create, edit and delete numbering patterns (and
frequencies). This implies new sql tables (subscription_numberpatterns
and subscription_frequencies)
Numbering patterns behave almost as before, there are still the same
values to configure (addX, everyX, settoX, whenmorethanX). lastvalueX
and innerloopX remain in subscription tables.
There is a new value in numbering patterns: numberingX. For each
"column" (X, Y or Z) you can tell how to format the number. Actually
numberingX can be set to:
- 'dayname' (name of the day) (0-6 or 1-7 depending on which day is the
first of the week)
- 'monthname' (name of the month) (0-11)
- 'season' (name of the season) (0-3) (0 is Spring)
These names are localized by using POSIX::setlocale and POSIX::strftime
and setting a 'locale' value to the subscription. Locale have to be
installed on the system.
Note that season names are not localized using POSIX::strftime (it can't
do this), so names are hardcoded into the code (available languages: en,
fr). This could be fixed in the future by using a Perl localization
framework.
Frequencies can be configured using 3 parameters:
- 'unit': one of 'day', 'week', 'month', 'year'
- 'issuesperunit': integer >= 1, the number of received issues per
'unit'
- 'unitsperissue': integer >= 1, the number of 'unit' between two
issues
One of 'issuesperunit' and 'unitsperissue' must be equal to 1.
Examples:
unit = 'day', issuesperunit=3, unitsperissue=1 => 3 issues per day
unit = 'week', issuesperunit=1, unitsperissue=3 => 1 issue each 3
weeks
Prediction pattern is now computed server-side and is more consistent
with what Koha will do. The publication date is displayed alongside the
serial number.
Irregularities can now be checked one by one, in the prediction pattern
table, or if frequency is 'day-based' (unit is 'day'), there is the
possibility to check all issues for a week day at once.
When an irregularity is found, there is the possibility to keep the
serial number unchanged, or to skip it. It is configured at subscription
creation or modification.
For instance, with a daily subscription you can have:
skip serial number | keep serial number
----------------------+----------------------
2012-01-01 ¦ No 1 | 2012-01-01 ¦ No 1
2012-01-03 ¦ No 3 | 2012-01-03 ¦ No 2
To lighten the subscription modification page, manual history has been
moved in its own page subscription-history.pl which is accessible on
subscription-detail.pl, tab 'Planning'.
Important note: updatedatabase.pl script takes into account existing
subscriptions and create appropriate numbering patterns for them (it
tries to create as few patterns as possible). Frequency is
mapped to the correct entry in subscription_frequencies table.
This patch includes kohastructure.sql and updatedatabase.pl changes
+ sample frequencies data and sample numberpatterns data for fresh
installs (sample data is included in updatedatabase.pl)
=== TEST PLAN: ===
Create a new subscription:
- Go to Serials module and click "New subscription" button
- On the first page, choose a biblio and click next to go to the
second page
- Pick a first issue publication date
- Choose frequency '1/day'
- Choose a subscription length of 15 issues
- Choose a subscription start date
- Choose numbering pattern 'Volume, Number'
- A table appears, fill 'Begins with' cells with '1'
- Click on 'Test prediction pattern' button
The prediction pattern is displayed at the right of the page. You can
see in it the serial number, the publication date and a checkbox to
allow you to choose which serials will not be received (irregularities).
You can see that serial number start from "Vol 1, No 1" continue to "Vol
1, No 12" and then restart with "Vol 2, No 1".
Frequency is '1/day' so you can see that publication date is incremented
by one day line after line.
- Now you can play a little with frequencies and numbering patterns,
change one of them (or both) and click again on 'Test prediction
pattern'
- For example, choose frequency '3/weeks' and click on 'Test
prediction pattern' button'.
There is a little behaviour change compared with current master.
Publication date will not be guessed within the week. Koha can't know
when you will receive issues. So the publication date stay the same
(monday of each week) for 3 consecutive issues and then jump to the next
week.
- Now choose frequency '1/3 months' and numbering pattern 'Seasonal'
- Fill 'Begins with' cells with '2012' for Year and '0' for Season
- Click on 'Test prediction pattern'
- You should have something like 'Spring 2012', 'Summer 2012', ...,
'Winter 2012', 'Spring 2013'
- Note that you can have seasons for south hemisphere by entering '2'
in 'Year/Inner counter'
- 2nd note: if you have some locales installed on your system, you can
type its name in the 'Locale' field (actually it does not work for
seasons name, only for month names and day names)
If you want to modify the numbering pattern you can still do it here:
- Click on 'Show/Hide advanced pattern' link. The advanced pattern
table is shown but all fields are readonly
- Click on 'Modify pattern' button. All readonly fields are now
editable. Note that 'Begins with' and 'Inner counter' line are
repeated here and any modifications in the small table will be
replicated in the big table, and vice versa.
- Pattern name is emptied, if you type a new name, a new pattern will
be created, and if you type the same name as an existing numbering
pattern, this one will be modified (with a confirmation message)
- There is two new lines in this table:
- Label: it's what is displayed in the smaller table headers above
- Numbering: used to format numbers in different ways. can be
'seasons', 'monthname' or 'dayname'. Month name and day name can be
localized using the 'Locale' field. Seasons can't (values for
english and french are hard-coded in Serials.pm)
- You can modify what you want in the table and click on 'Test
prediction pattern' button each time you want to see your
modifications. (Note that checkboxes for irregularities aren't displayed
in this mode, and you can't save the subscription until you have saved
or cancelled your changes).
- To cancel your modifications, just click on 'Cancel modifications'
button.
- To save them, click on 'Save as new pattern'. If the pattern name is
already existing, a confirmation box will ask you if you want to
modify the existing numbering pattern. Otherwise a new pattern will be
created and automatically selected.
Once you have finished modifying numbering pattern. You can click again
on 'Test prediction pattern' to define irregularities, and then click on
'Save subscription'.
Now you can check the serials module still works correctly:
- Check the subscription detail page to confirm that nothing is
missing. Especially the 'Frequency' and 'Number pattern' infos
- Try to receive some issues. Check that the serial number is correctly
generated and if irregularities you have defined are taken into
account (if you have defined some).
- Check that receiving is blocked once you have reached the number of
issues you have defined in subscription length (or once you have
reached the subscription end date)
In serials menu (to the left of almost each page of serials menu) you
have two new links: 'Manage frequencies' and 'Manage numbering
patterns'.
'Manage numbering patterns' lead to a page which list all numbering
patterns and allow you to create, edit or delete them. The interface is
almost the same as numbering pattern modification in subscription-add.pl
'Manage frequencies' lead to a page which list all frequencies and allow
you to create, edit or delete them.
Try to create a new frequency:
- Click on 'Manage frequencies' link in the serials menu and then click
on 'New frequency':
- Fill in the description (mandatory).
- Unit is one of 'day', 'week', 'month', year' or 'None' ('None' is for
an irregular subscription)
- If unit is different from 'None' you have to fill the two following
fields (Issues per unit, and Units per issue)
- Note that at least one of those must be equal to 1
- Issues per unit is the number of received issues by 'unit' and Units
per issue is the number of 'unit' between two issues
- Display order is used to build the drop-down list. Leave empty and it
will be set to 0 (top of the list)
- Then click on 'Save'
- Check that this new frequency appears in the frequencies table and in
the drop-down list in subscription-add.pl
Subscription history has been moved in its own page. To test if it still
works, choose a subscription with manual history enabled (or modify an
existing subscription to turn on manual history).
- On the detail page, tab 'Planning', you should have a link 'Edit history'.
- Click on it
- Modify history and click on Save
- In tab 'Summary' you should have the infos you just entered
And finally, you can check that old subscriptions (by old I mean
subscriptions that existed before the update) are correctly linked to an
existing numbering pattern and an existing frequency. Numbering patterns
should be named 'Backup pattern X' where X is a number.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Great development! Work as described. No koha-qa errors
(with all patches applied). Please QA this fast.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This patch fixes the following warnings under Plack:
* Use of uninitialized value $firstissuedate in string eq at \
/home/jcamins/kohaclone/serials/subscription-add.pl line 92.
* Use of uninitialized value $firstissuedate in substr at \
/home/jcamins/kohaclone/serials/subscription-add.pl line 105.
* Use of qw(...) as parentheses is deprecated at \
/home/jcamins/kohaclone/serials/subscription-add.pl line 95.
* Variable "$firstissuedate" is not available at \
/home/jcamins/kohaclone/serials/subscription-add.pl line 338.
To test:
1) Create a subscription. Ensure that setting the first issue's
publication date works.
2) Edit a subscription. Ensure that the first issue's publication
date shows up.
3) Sign off.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No regressions found, all tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
- the dateformat value is send to all templates (from
C4::Auth::get_template_and_user)
- remove all assignment of dateformat in all .pl files
- the DHTMLcalendar_dateformat variable is unused
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed conflicts:
- opac/sco/sco-main.pl
- reports/acquisitions_stats.pl
- tools/cleanborrowers.pl
All tests pass, perlcritic problems appeared in some files
before and after these patches were applied.
Checked sorting in following pages:
- acqui/addorderiso2709.tt - list of staged imports in acq
- acqui/histsearch.tt - sorting of dates in acq search result list
- acqui/invoices.tt - billing date in list of invoices in acq
- acqui/lateorders.tt - list of late orders in acq
- acqui/ordered.tt - ordered titles and estimated costs for a fund
- acqui/parcels.tt - receive shipment page
- acqui/spent.tt - received titles and actual costs for a fund
...
- serials-search.tt - subscription search result list
...
- opac/sco/sco-main.tt - due dates in list of checked out items
- reports/acquisitions-stats.tt - date searches, display of dates
- tools/cleanborrowers.tt
- tools.holidays.tt - different views of dates library is closed,
adding dates
Checked dates display according to system preference everywhere and
searching, entering dates etc. still worked as expected.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
- in various acquisition pages and serials home
- in database : biblioitems.ean
- adds ean and its mapping in default english bibliographic framework
- adds ean mapping in default french bibliographic framework
- ean search is not enabled for MARC21
The required mapping between the ean marc field and the biblioitems.ean
database field will be automatically added on an existing unimarc installation.
However, if you already have records with ean, you will have to
run misc/batchRebuildBiblioTables.pl to populate biblioitems.ean
Signed-off-by: jmbroust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Passed QA at second run. Removed a merge marker only.
I could not reproduce the working behaviour when I found that the tiny follow-up introduced a bug
| being a reserved char in regexp, split '|' is not splitting on '|' ! we must write '\|' !
A new syspref (SubscriptionDuplicateDroppedInput) contains the list of fields to
duplicate when duplicating a subscription. The library will be able to
define that, for example, the internal note should not be duplicated
Test plan:
On the detail subscription page, click Edit > Edit as New (Duplicate):
All the information must be copied from the original subscription.
Fill the syspref SubscriptionDuplicateDroppedInput with a list of fields
you don't want to be duplicated (e.g. location;notes;branchcode).
Repeat the duplicate action. Normally, information for these fields are
not copied.
Signed-off-by: Kristina D.C. Hoeppner <kristina@catalyst.net.nz>