Bug 8368: fix email lists from OPAC when using non-English templates
This patch ports to list sending by email, the technique used in sending
cart, i.e. (1) format email in HTML, and (2) transform it into Text with
TT filter html2text.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes a very annoying translation bug successfully.
Also passes all tests and QA script.
To test:
- Add a few records to a shelf, ideally use some with diacritics.
- Send shelf from English templates, verify email is ok
- Send shelf from translated templates (de-DE or similar) - verify
email content is broken.
- Apply patches, update po files and reinstall the language.
- Send shelf from English templates again, verify there is no
regression.
- Send shelf form translates templates - verify this email is now
also working correctly.
Patch also changes the name of the file attachement from shelf.iso2709
to list.iso2709.
Jonathan Druart [Mon, 9 Sep 2013 12:12:05 +0000 (14:12 +0200)]
Bug 10843: fix crash that can occur when confirming hold if ReservesMaxPickUpDelay is undefined
Test plan:
1) set an empty string for the ReservesMaxPickUpDelay pref
2) place a hold on an item
3) check in the item
4) click on "Print and confirm"
5) an error occurs
> The 'days' parameter (undef) to DateTime::Duration::new was an 'undef'
6) apply the patch
7) repeat steps 1 to 4
8) the error does not occur anymore.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
An empty string didn't do it for me, I had to set the
variable for the systempreference to NULL. I am not sure
if this can happen when editing from the interface, but
this change should not have any ill side effects and it has
unit tests!
Owen Leonard [Wed, 11 Sep 2013 15:51:54 +0000 (11:51 -0400)]
Bug 10850 - give quick spine label template page its own ID
Out of three conditional cases for display of the <body> tag one lacked
a unique ID. This patch copies the unique ID from the other cases to the
one lacking.
This patch also corrects the case of an "onload" attribute which should
follow XHTML style rules.
To test, the patch for Bug 9618 must be applied. Set the
SpineLabelAutoPrint system preference to "[don't] automatically pop up a
print dialog." Submit a barcode on the quick spine label creator and
view source. The <body> tag should have an ID attribute.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 17 Jul 2013 13:02:43 +0000 (15:02 +0200)]
Bug 10038: fix doubled 'default' entry when creating a new authority type
Test plan:
- Create a new authority type
- Click MARC structure
- Verify the pull down has only 1 entry for Default
- Go on the authority type home (admin/authtypes.pl)
- Click on the "MARC structure" link for the default type
- Verify the pull down has only 1 entry for Default
This patch adds a sort (on the authtypecode) for these 2 lists.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. No koha-qa errors.
When creating a new framework it would be better to have Default
on top, but one is way better than two :)
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Agreed, one is better than two :)
All tests and QA script pass.
Jonathan Druart [Mon, 23 Sep 2013 15:07:09 +0000 (17:07 +0200)]
Bug 10935: fix breakage of CSV acq exports when using a non-English translation
To reproduce:
- cd misc/translator
- ./translate update LANG
- ./translate install LANG
- go to the Koha mainpage and change the language.
- go to acqui/basketgroup.pl?booksellerid=XX and try to export a
basketgroup.
The headers is followed by the first basketgroup information. There is
no carriage return.
It looks like it is caused by a routine used by the translator script
(TmplTokenizer::string_canon).
To test this patch:
- apply it
- cd misc/translator
- ./translate -f update LANG
- translate headers in your po file
- ./translate -f install LANG
- go to acqui/basketgroup.pl?booksellerid=XX and try to export a
basketgroup.
- verify that the csv looks good now.
- same thing for basket.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good idea and seems to work - just fixing a small glitch
with the first entry of the list in a follow-up.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Fri, 13 Sep 2013 14:28:39 +0000 (16:28 +0200)]
Bug 10884: circulation table: fix odd behavior on checkboxes
Test plan:
Play with renew, check in and export checkboxes.
The expected behavior is: the renew and check in cb should work as radio
button, without affecting the export cb.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template changes only.
Amended test plan:
* Create a CSV profile under Tools > CSV profiles
* Add CSV profile to system preference ExportWithCsvProfile
1) Check export checkbox
2) Check check in for same item
3) Switch to Renew
The export checkbox should not get unchecked when switching
between renew and check in.
Owen Leonard [Mon, 7 Oct 2013 19:12:03 +0000 (15:12 -0400)]
Bug 10309: (follow-up) Add changes from Bug 8712, "and" labels in advanced search
This patch adds the changes from Bug 8712 to the new theme. Some HTML
markup errors have also been corrected. From Bug 8712:
"The "and" label not only improves the accessibility but also gives the
user an idea that the operation between multiple search fields is a
boolean "AND" by default."
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
"and" looks well on advanced search. No errors
Owen Leonard [Mon, 7 Oct 2013 18:45:06 +0000 (14:45 -0400)]
Bug 10309: (follow-up) Update for Bug 10856, improve shelf browser
This patch updates this theme with the changes made in Bug 10856.
Because of the way JavaScript is loaded in the new theme, the JS in the
shelfbrowser include had to be moved to the opac-detail template.
Test plan from that bug:
- On a detail biblio page, click on a "Browse shelf" link.
- Play with the next and previous links.
- Deactivate Javascript (using NoScript for example) and check that you
get the same behavior (but the page is reloaded).
- Launch the unit tests: prove t/db_dependent/ShelfBrowser.t
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No errors
Disabled JavaScript on Firefox (about:config, javascript.enable -> false)
Browse shelf works by reloading.
Unit test report success.
Owen Leonard [Mon, 7 Oct 2013 14:39:19 +0000 (10:39 -0400)]
Bug 10309: (Follow-up) Applying changes from Bug 10349
This patch applies the changes from Bug 10349, Don't show empty
Descriptions/Title notes tabs in OPAC and staff.
"The descriptions/title notes tab appears on the detail page in both
staff client and OPAC even if there are no notes. This is probably a
relic of the pre-T:T days when it wasn't possible to use || in an IF.
This patch adds a check for the various variables which might trigger
the display of the tab.
To test, apply the patch and view records in the OPAC and staff client
which do and do not have title notes attached (whether that be in the
MARC record or in the biblio.notes column). In the OPAC Syndetics
content should also be tested if possible. The descriptions/title notes
tab should only appear if there is content."
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No errors
Tested on OPAC, records without notes don't show title notes tab.
Owen Leonard [Mon, 7 Oct 2013 14:33:03 +0000 (10:33 -0400)]
Bug 10309: (follow-up) Updates for Bug 6594, Schema.org structured data
This patch adds the changes from Bug 6594:
"To support schema.org processors, such as Google, Bing, and Yandex,
structure our data so that it has machine-readable attributes. This pass
declares the CreativeWork sub-types as well as Product for the main
bibliographic record details, and uses the Offer type for holdings
information per the W3C Schema Bib Extend community group discussions."
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested against linter.structured-data.org, microdata present
No errors.
Owen Leonard [Wed, 22 May 2013 13:37:31 +0000 (09:37 -0400)]
Bug 10309 - New OPAC theme based on Bootstrap
The goal of this theme is to provide a fully-responsive OPAC which
offers a high level of functionality across multiple devices with varied
viewport sizes. Its style is based on the CCSR theme, with elements of
the Bootstrap framework providing default styling of buttons, menus,
modals, etc.
The Bootstrap grid is used everywhere, but Bootstrap's default
responsive breakpoints have been expanded to allow for better
flexibility for our needs.
All non-translation-depended files are in the root directory of this new
theme:
css, images, itemtypeimg, js, less, and lib. Languages.pm has been
modified to ignore the new directories when parsing the theme language
directories.
This theme introduces the use of LESS (http://lesscss.org/) to build
CSS. Three LESS files can be found in the "less" directory: mixins.less,
opac.less, and responsive.less. These three files are compiled into one
CSS file for production: opac.css. "Base" theme styles are found in
opac.less. A few "mixins" (http://lesscss.org/#-mixins) are found in
mixins.less. Any CSS which is conditional on specific media queries is
found in responsive.less.
At the template level some general sturctural changes have been made.
For the most part JavaScript is now at the end of each template as is
recommended for performance reasons. JavaScript formerly in
doc-head-close.inc is now in opac-bottom.inc.
In order to be able to maintain this structure and accommodate
page-specific scripts at the same time the use of BLOCK and PROCESS are
added. By default opac-bottom.inc will PROCESS a "jsinclude" block:
[% PROCESS jsinclude %]
Each page template in the theme must contain this block, even if it is
empty:
[% BLOCK jsinclude %][% END %]
Pages which require that page-specific JavaScript be inserted can add it
to the jsinclude block and it will appear correctly at the bottom of the
rendered page.
The same is true for page-specific CSS. Each page contains a cssinclude
block:
[% BLOCK cssinclude %][% END %]
...which is processed in doc-head-close.inc:
[% PROCESS cssinclude %]
Using these methods helps us maintain a strict separation of CSS links
and blocks (at the top of each page) and JavaScript (at the bottom). A
few exceptions are made for some JavaScript which must be processed
sooner: respond.js (https://github.com/scottjehl/Respond, conditionally
applied to Internet Explorer versions < 9 to allow for layout
responsiveness), the _() function required for JS translatability, and
Modernizr (http://modernizr.com/, a script which detects browser
features and allows us to conditionally load JavaScript based on
available features--or lack thereof).
Another new JavaScript dependency in this theme is enquire.js
(http://wicky.nillia.ms/enquire.js/), which lets us trigger JavaScript
events based on viewport size.
I have made an effort to re-indent the templates in a sane way,
eliminating trailing spaces and tabs. However, I have not wrapped lines
at a specific line length. In order to improve template legibility I
have also tried to insert comments indicating the origin of closing tags
like <div> or template directives like [% END %]:
</div> <!-- / .container-fluid -->
[% END # / IF ( OpacBrowseResults && busc ) %]
TESTING
Proper testing of this theme is no easy task: Every template has been
touched. Each page should work reasonable well at a variety of screen
dimensions. Pages should be tested under many conditions which are
controlled by toggling OPAC system preferences on and off. A variety of
devices, platforms, and browsers should be tested.
This corrects a failing test and follows a recommendation
by the maintainer of DBIx::Class. This patch also
adds a couple new directories for t/00-testcritic.t to
check.
Galen Charlton [Mon, 14 Oct 2013 22:31:37 +0000 (22:31 +0000)]
Bug 10565: (follow-up) add new user permission for patron list management
This patch adds a new user permission for patron list management,
tools => manage_patron_lists.
This closes a security issue with the original patch series where
patron lists and their contents could be retrieved and modified
without requiring authentication of any sort.
Kyle M Hall [Wed, 10 Jul 2013 13:38:40 +0000 (09:38 -0400)]
Bug 10565: Add a "Patron List" feature for storing and manipulating collections of patrons
The patron lists feature is somewhat similar to the record lists feature
in that it allows a librarian to create a list of patrons for later
retrieval and manipluation. These lists can then be used with the batch
patron modification tool.
Test Plan:
0) Apply the patch for Bug 8798
1) Apply this patch
2) Run updatedatabase.pl
3) Access the patron lists feature from Koha's Tools menu.
4) Create a new list via the "New patron list" button.
5) For this list, click the "Edit" button, and change the list name.
6) For this list, click the "Add patrons" button, and search for and
add some patrons to your list.
7) For this list select some patrons to remove them.
8) Try both adding some new patrons, and removing some old patrons
as a single action.
9) Click the "Patrons" link on the Koha toolbar
10) Search the patrons, or browse by letter to get patron results
11) Check the checkboxes next to one or more patrons, and add the
selected patrons to your existing list.
12) Change the "Selected patrons" pulldown to "All resultant patrons"
and add them to your list.
13) Check the checkboxes next to one or more patrons, and add the
selected patrons to a new list.
14) Try manipulating a list of patrons using the batch patron
modification tool.
15) Go back to the Patron Lists feature and delete your lists.
16) Run 'prove t/db_dependent/PatronLists.t'
Galen Charlton [Mon, 14 Oct 2013 20:57:24 +0000 (20:57 +0000)]
bug 8798: (follow-up) pass DB connection params to DBIC schema updater explicitly
This patch changes update_dbix_class_files.pl so that the connection
parameters to the reference database must be passed explicitly via
command-line switches, rather than grabbing them from the current Koha
context.
The purpose of this is to intentionally put up a roadblock to reduce
the chance that a developer (or release manager) accidentally updates
the schema files to include local testing cruft such as temporary
tables.
Usage is now as follows:
[1] Create an empty database
[2] Load the schema creation script into it, e.g.,
mysql -u dbic -pdbic dbic < installer/data/mysql/kohastructure.sql
Kyle M Hall [Thu, 29 Aug 2013 16:23:39 +0000 (12:23 -0400)]
Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable patronimages
4) Verify patron images are still displaying correctly
5) Test deleting a patron image
6) Test adding a patron image from moremember.pl
7) Test adding a patron image from tools/picture-upload.pl
Kyle M Hall [Fri, 21 Sep 2012 16:16:04 +0000 (12:16 -0400)]
Bug 8798: (follow-up) rename schema class updater script
updateDatabase.pl is a bit too close to updatedatabase.pl in installer
and may cause some confusion. I would suggest update_dbix_class_files.pl
as a unambiguous and descriptive name for this file.
Elliott Davis [Sun, 2 Sep 2012 13:45:40 +0000 (08:45 -0500)]
Bug 8798: DBIx::Class base classes for all Koha tables
* Added base class files for all tables in koha using
DBIx::Class::Schema::Loader.
* Added a (very basic) test file for C4::Context
* Also added dependencies in required files.
To Test:
[1] Install patch
[2] Make sure you can still connect to Koha
[3] You may optionally run this test script:
use Koha::Database;
use Data::Dumper;
my $db = Koha::Database->new();
my $schema = $db->schema();
print Dumper($schema->resultset("Borrower"));
If you run this file you should get a DBIx dump of the borrowers table.
Kyle M Hall [Wed, 4 Sep 2013 16:14:07 +0000 (12:14 -0400)]
Bug 10820: display item status as lost if item is both lost and on loan
In the OPAC, if an items is both lost and checked out, it will show as
lost on the search results, and checkout out in the record details. The
lost status should take precedence over the checked out status, as the
checked out status may lead a patron to believe the book may return
soon.
Test Plan:
1) Check an item out to a patron
2) Set it to lost ( requires itemlost to be revealed in the framework
for the items editor ).
3) Rebuild your zebra indexes
4) Run a search where that item is in the results list
5) Note the item is marked as lost
6) View the record details
7) Note the item is listed as "checked out"
8) Apply this patch
9) Repeat steps 4-6, note the item is now listed as lost
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Fridolyn SOMERS [Tue, 6 Aug 2013 10:13:34 +0000 (12:13 +0200)]
Bug 10689: make public note appear in subscriptions search
In a serials module, when searching subscriptions, the results table as
a "Notes" column.
In TT code, you see that it tries to display public note
"subscription.notes" and internal note "subscription.internalnotes".
The internal note is displayed well but not the public note.
You can see the 2 notes in serial details in summary tab.
The problem commes from the SQL query. A join is perform on subscription
and biblio, both containing a "notes" column.
This patch solves the problem by using a alias in query for both columns
(biblio.notes is acutally not used in template but could be).
Test plan :
- Edit a subscription
- Add public and internal notes. For example : "too busy" and "on holiday"
- Perform a subscription search that returns this subscription
=> "Notes" column contains both notes. For example : "too busy (on holiday)"
- Test with only public note
- Test with only internal note
Works as described.
Signed-off-by:Mathieu Saby <mathieu.saby@uhb.fr> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Works as described, fixes a bug as the templates show that
the intention was to display both notes in the column.
Jonathan Druart [Tue, 10 Sep 2013 13:24:07 +0000 (15:24 +0200)]
Bug 10854: add ability to export serial claims using CSV profile.
Test plan:
- Create a CSV profile (or use the default one) with a type 'sql'.
- Go to serials/claims.pl, select the wanted CSV profile and click on
the "Export selected items data".
- Verify the CSV file is correctly generated.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors
On top of 10853 (solving merge conflict)
Need to do homework to test. Add subscription and serial claim
notice.
1) Create a new CSV profile, type SQL, copy sample fields
2) Go to claims, select vendor
3) Go to Export selected items with created profile
4) CSV (in my case I use | as separator) download successfully
5) All fields present, file correct
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as advertised, keeps existing format by porting it to
a SQL profile.
Jonathan Druart [Tue, 10 Sep 2013 13:20:09 +0000 (15:20 +0200)]
Bug 10853: Add DB field export_format.type ('marc' or 'sql').
This patch:
- adds a new column 'type' to the export_format table.
- renames the field name export_format.marcfields with
export_format.content.
Test plan:
- Check that existing profiles have the type "marc" selected by default
- Create a new profile with a type "sql"
- Save and verify the profile is correctly displayed when you select it.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. koha-qa reports Small tabs errors,
corrected in followup
Test:
1) go to Tools > CSV profiles, Create profile, current
2) Apply patch, run updatedatabase
3) Go to Tools > CSV profiles, new option present
old profile with type MARC
4) Create new profile MARC, save and show correct
5) Create new profile SQL, save and show correct
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass with all 3 patches applied.
Works as described. Functionality for SQL profiles will be
added by another patch. For now it's possible to add/edit/delete
them.
Existing CSV profiles can still be exported correctly.
Galen Charlton [Fri, 11 Oct 2013 01:46:47 +0000 (01:46 +0000)]
Bug 10240: (follow-up) don't display patrons as lost or gone-no-address incorrectly
Because borrowers.lost and borrowers.gonenoaddress are nullable, when
downloading patron information for an offline patron sync, convert null
values to zero.
To test:
[1] Set borrowers.lost to NULL for a patron.
[2] Do an offline sync, then disconnect network access (or
stop the webserver) and enter the offline interface.
[3] Try checking out to the test patron. A warning will
(incorrectly) disply stating that the patron's card is lost.
[4] Apply the patch.
[5] Do steps 2 and 3 again. This time, there will be lost card
warning.
Bug 10240: (follow-up) correctly record fines and fix label
At some point in rebasing I managed to remove the part of the code
that saved fine payments. This patch re-adds that feature. This patch
also corrects the label on the check out tab to not mention partial
names for checkouts when offline, and partial name searches are not
supported in offline circ.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10240: (follow-up) warn when patron's card is expired
This patch improves the alert messages to be slightly better English
and warns the librarian if a patron's card has expired. Like all alerts,
this is non-fatal since in the case of network failure there is no
particular reason to expect that the offline database is current.
To test this particular patch you can try checking something out to an
expired patron, otherwise test plan remains the same as above.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Logging out/setting the library does not work while using offline
mode, so it makes no sense to present those options to the user.
Much better is some sort of explanatory message informing them that
those two links don't work.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Fix the following two issues:
1) After paying a fine when offline the fine amount becomes NaN.
2) For previous checkouts for a patron, the title and barcode
fields have the wrong infomation in them (i.e. they have been swapped)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10240: (follow-up) don't delete transactions if auth fails
When uploading transactions, we were not checking that authentication
had succeeded before deleting the transactions from the local database.
That was bad. With this patch, we check. That is good.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Address the following issues:
1/ Address minor qa issues with the templates:
FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline-mf.tt
FAIL forbidden patterns
forbidden pattern: intranet-tmpl should certainly
replaced with [% interface %] (line 24)
[etc.]
OK tt_valid
OK valid_template
FAIL koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
FAIL forbidden patterns
forbidden pattern: intranet-tmpl should certainly
replaced with [% interface %] (line 509)
[etc.]
FAIL tt_valid
lines 5, 5
2/ Run perltidy on new scripts
3/ download.pl returns data.finished = 1 if number of returned
data < 5000 (avoids 1 ajax call)
4/ Replace qq{} around sql queries with q{}
Also, a race condition existed that resulted in pending transactions
only getting deleted from the local database in certain circumstances
(fast connections under Chrome, mostly). This patch fixes that so that
successfully-uploaded transactions are always deleted.
This patch also addresses Jonathan's suggestion:
3/ add a message on check in (currently the input becomes empty but the
user is not informed).
... and Magnus's suggestion about moving the Synchronize link to the
right on the homepage.
Also, this addresses the further issues Jonathan noted:
- The tab of checkouts always shows "*0* Checkouts"
- If I am not well-educated, I click on the "Check out" link on the
offline home page, I enter a barcode, click on "Check out" and I get a
js error (without user message): "TypeError: curpatron is undefined"
(with chromium I get: Numeric transaction modes are deprecated in
IDBDatabase.transaction. Use "readonly" or "readwrite").
- There is a "border-right" css rule on the h5.patron-title. It is
display when there is no patron selected) [really minor!].
- tables are displayed even if there is no data
- The "Clear screen" link (X) points to an old script:
circ/offline-circulation.pl
- There is a warning when clicking on the "Synchronize" link when the
user is offline, but not for the "Pending offline circulation actions"
link.
- Still exists:
> The "Checked in item." message text never disappear (even if I go on the
> offline home page (circ/offline.pl#offline-home)).
Finally, this patch adds a link to the Pending offline operations page
on the synchronize page for easier navigation.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10240: Offline circulation using HTML5 and IndexedDB
This patch adds an HTML5-based offline mode to Koha's existing
circulation module, allowing librarians to check out items using a
basically familiar interface. The feature will be implemented using
the Application Cache and IndexedDB features of the HTML5 specification,
both of which are fully supported on Firefox 10+ and Chrome 23+, with
limited support going back to Firefox 4 and Chrome 11. The basic
workflow enabled by this patch is as follows:
Part 1: While connected to the Internet
1. Enable offline functionality by turning on the
"AllowOfflineCirculation" system preference.
2. Sync the offline circulation database on the computer that will be
used for offline circulation by following the "Offline circulation
interface" link on the Circulation home page, choosing "Synchronize (must be online)",
and clicking the "Download records" button. This process may take a while.
3. Bookmark /cgi-bin/koha/circ/offline.pl (the page you are currently
on) for easy access when offline.
Part 2: While disconnected from the Internet
4. Navigate to /cgi-bin/koha/circ/offline.pl using the bookmark you
created while online.
5. Start checking books in by scanning the barcode of an item that has
been returned into the box in the "Check in" tab.
6. Scan the barcodes of any additional items that have been returned.
7. Start checking out books to a patron by scanning the patron's barcode
in the box in the "Check out" tab.
8. Set a due date (the "Remember for session" box will be checked by
default, since circulation rules are not computed during offline
transactions and therefore a due date must be specified by the
librarian).
9. Scan an item barcode (if you did not set a due date, it will prompt
you) to check the item out to the patron.
10. If a patron has a fine you can see the total amount (current to when
the offline module was synced), and record a payment. Unlike when in
online mode, there will be no breakdown of what item(s) fines are
for, and you will only be able to record the payment amount and not
associate it with a particular item.
Part 3: While connected to the Internet
11. Click the "Synchronize" link and choose "Upload transactions" to
upload the transactions recorded during the offline circulation
session.
12. Navigate to /cgi-bin/koha/offline_circ/list.pl (there will be a
link from the Offline circulation page) and review the
transactions, as described in the documentation for the Firefox
Offline circulation plugin:
http://wiki.koha-community.org/wiki/Offline_circulation_firefox_plugin
RM note: the IndexedDB jQuery plugin bundled with this patch is
copyright 2012 by Parashuram Narasimhan and other contributors and is
licensed under the MIT license. The home page for the plugin is
http://nparashuram.com/jquery-indexeddb/.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works very well, no koha-qa errors
Test with Firefox 24.0
1) did some checkouts pre sync
2) synchronize database (Download)
3) go offline
4) Proceed to checkin some items from patron
5) Proceed to checkout items to patrons, setting date
6) Proceed to checkout to expired patron, warning appears
7) go online
8) Upload records
9) go to review transacctions and proceed
10) verified on patrons that checkin/out are done
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Chris Hall [Fri, 22 Mar 2013 02:34:17 +0000 (15:34 +1300)]
bug 10365: change routing slips to use date published rather than planned date
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 17 Jul 2013 12:38:55 +0000 (14:38 +0200)]
Bug 10602: Set default value for authority fields via the framework
This patch allows to define default values in the authorities framework.
Some code already existed but the feature did not work.
Test plan:
1/ Choose a framework, field and subfields.
2/ Define a default value.
3/ Create a new authority and check that the subfield is
automatically filled with the default value.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. koha-qa reports some tabs, fixed in followup
Test
1) Apply patch, run updatedatabase.pl
2) Edit auth framework, put default value someware, save
3) Add new auth, default value present
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Verified database update is done correctly.
Controlfields 0xx
- Edited an existing field (001)
- Set a default value for subfield @
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
new authority using this authority type
Fields
- Edited an existing field (100)
- Set a default value for subfield e
- Edited subfield again, checking default was saved correctly
- Verified the default shows up correctly when creating a
new authority using this authority type
Mirko Tietgen [Fri, 14 Dec 2012 17:01:37 +0000 (18:01 +0100)]
Bug 9295: Introduce operator equal/ notequal to OAI set mapping instead of hardcoded 'equal' value.
In OAI set mappings, the value "is equal to" is hardcoded. This
enhancement changes it to a dropdown menu to choose between "is equal
to" and "not equal to".
To test:
* define a set
* define a mapping for said set with "is equal to"
* run /misc/migration_tools/build_oai_sets.pl -r -v
* confirm that you have correct entries in SQL: select * from
oai_sets_biblios;
* change mapping to 'not equal to', save
* run /misc/migration_tools/build_oai_sets.pl -r -v
* confirm that you have correct entries in SQL: select * from
oai_sets_biblios;
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: Fix bug id in updatedb.pl
Galen Charlton [Thu, 10 Oct 2013 22:46:18 +0000 (22:46 +0000)]
Bug 9282: (follow-up) remove log noise caused by authorities/ysearch.pl
This patch (which is incidental to the main patches for bug 9282),
improves the AJAX authority search code by fixing incorrect contruction
of the parameters to SearchAuthorities() that led to errors like this
in the Apache log when doing auto-completion searches on "main entry"
and "anywhere" in the authority finder:
ysearch.pl: Use of uninitialized value $i in string eq ...
In the process, this patch also removes a use of the now-deprecated
Perl smartmatch operator.
To test:
[1] Verify that the main test plan for bug 9282 still works.
Fridolyn SOMERS [Thu, 13 Dec 2012 13:38:11 +0000 (14:38 +0100)]
Bug 9282: improve auto-completion for authority record finder
This patch adjusts the auto-completion on the authority record
finder (accessed from the bib editor) so that if you do
start typing in the "Main entry ($a only)" input field, it will
return only the $a of the main heading for matching authority
records.
This fixes a problem where typing "shakes", choosing
"Shakespeare, William, 1564-1616" from the auto-completion
result list, then hitting the search button fails to bring
up results, as the dates come from the $d of the 100 field
(in MARC21).
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised.
Tested with an authority where I added my search term in $b.
The modified authority came up in main entry, not in mainmainentry.
That was the desired result.
Galen Charlton [Thu, 10 Oct 2013 21:57:29 +0000 (21:57 +0000)]
bug 5202: (follow-up) tweak display of merge action link on staged batch page
This patch adds a vertical bar between the link to display the
matching authority record and the link to initiate a record
merge; prior to this patch, the two links ran together.
The link on the merge reference had been wrong, and framework types
were not indicated when you were merging records of two types. This
patch fixes those problems.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
When rebasing the patch for this, I accidentally moved the line
setting the mergereference when merging from breeding to *before*
I checked whether we were merging from breeding. Needless to say,
this caused problems. This patch fixes that, and:
* Makes the error translatable.
* Adds a missing authtypesloop argument for the template.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Due to massively incorrect data in the default authority frameworks,
we were getting warnings about undefined values and spaces from checking
which tab subfields/fields were displayed in. This patch eliminates those
warnings.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 5202: merge authorities from the authority file and reservoir
This patch gives Koha the ability to merge authority records using the
same interface used by bibliographic records, though slightly different
methods for selecting which records to merge. The two ways to select
records are as follows:
1) Records can be selected from authority search results by clicking
the "Merge" link for two records.
2) Authority records can be merged from the reservoir by clicking the
merge-related links in the Manage staged MARC batch screen.
To test:
1) Apply patch.
2) Do a search for an authority record that will turn up multiple
identical records (or at least two records that you don't mind
merging).
3) Click the "Merge" link for the first record.
4) Click the "Merge" link for the second record.
5) Choose which fields from which record you want to appear in the
resulting record.
6) Confirm that those are the fields that exist in the resulting record.
7) Stage an authority record (for example, an authority record you
saved from your catalog.
8) Search for a record to merge with it using the "Search for a record
to merge in a new window" link.
9) Merge these records, confirming that the resulting record (after
going through the entire merging process) matches your expectations.
10) Set up a matching rule for authorities, and export an authority from
your catalog that will match based on that rule. For MARC21, the
following is a good choice for a rule:
Matching rule code: AUTHPER
Description: Personal name main entry
Match threshold: 999
Record type: Authority record
[Match point 1:]
Search index: mainmainentry
Score: 1000
Tag: 100
Subfields: a
11) Stage the record you just exported, choosing the matching rule you
just created.
12) Merge the record using the "Merge" link, confirming that the
resulting record (after going through the entire merging process)
matches your expectations.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.
Mathieu Saby [Mon, 9 Jan 2012 07:58:20 +0000 (08:58 +0100)]
Bug 7421: support indexing UNIMARC authority records using the DOM Filter
I took as a base the patch of F. Demians, but made a lot of changes,
so I think it is more logical to create a new patch as the behavior is
not the same as previous patch.
I tried to define DOM config files as a "miror" of record.abs, so the
behavior be the same.
If it is OK, we will be able to improve indexing later, for example
suppressing warns, managing indicators or subdivisions, etc.
I made some little changes to record.abs :
- comments
- 216 was indexed in Conference-name as well as Trademark. I suppose
that "Conference-name" is an error, so I indexed only in Trademark
- index 2 new notes : 340 / 356
The only difference between record.abs and DOM is that DOM config files
does not index complete fields, but subfields.
Ex :
melm 200 ===> <kohaidx:index_subfields tag="200" subfields="abcdfgjxyz">
I took all the subfields from the UNIMARC Authorities manual. The only
subfields not indexed are numeric subfields : $7, $8 for language of
record, and $0,2,3,5,6 for 4XX/5XX/7XX
To test :
- index a set of bib and auth records with GRS-1
- make some searches on different kind of authorities
- index the same records with DOM
- make the same searches
- You are not supposed to see differences
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
As I am not a UNIMARC user it's hard for me to test this, but
while testing other authority related patches I noticed that I couldn't
index the UNIMARC authorities of the sample base. The files are obviously
missing and reindex_zebra.pl notes this. With this patch applied,
indexing works and authorities are searchable in my installation.
Galen Charlton [Thu, 10 Oct 2013 20:59:11 +0000 (20:59 +0000)]
Bug 7421: add regression tests for UNIMARC authorities DOM indexing
This patch enhances t/db_dependent/Search.t to test indexing and
searching of authority records. It supplies a sample authority file
for MARC21 (consisting of the record for William Shakespeare from the
Library of Congress) and a sample UNIMARC authority file supplied
by Henri-Damien Laurent.
It also adds tests for both MARC21 and UNIMARC authorities.
When the main patch for bug 7421 is applied, t/db_dependent/Search.t
should pass.
Janusz Kaczmarek [Thu, 14 Mar 2013 15:25:40 +0000 (17:25 +0200)]
Bug 10335: display translated forms of headings in UNIMARC authorities correctly
To reproduce and test:
To reproduce:
1) Create an authority record with main heading (100) in Latin script
(e.g. Oppenheimer, Aharon -- subfields $a and $b) and parallel form
(700) in Hebrew (אופנהיימר, אהרן -- subfields $a and $b).
Mark it correctly in $8 with freheb (or engheb if you like);
2) Reindex and search;
3) You will see:
Oppenheimer Aharon
freheb: אופנהיימר
Whereas you would rather like to see (mind language and lack of $b above):
Oppenheimer, Aharon
Hebrew: אופנהיימר, אהרן
The patch corrects the issue and should not harm those who (improperly)
put only one triple in $8
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors.
Same result on OPAC and STAFF
Turns out that test plan is wrong,
you neet to fill tag 200ab, not 100ab, for main heading.
I filled 100a with some example data from UNIMARC auth manual.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Took me a bit to figure it out, works according to test plan.
In UNIMARC DOM indexing, "item" index was working only for subfields
of 995 field mapped with specific indexes, and also in index (ex :
$a, $b...). It was not working for the other subfields (ex : $g),
because a comment from record.abs was integrated in DOM config files.
This patch removes the comment.
To test, in a DOM UNIMARC environment :
1) In a item, write some value "Test10037" in 995$g
2) Search for this value in simple search, this way : item=Test10037
=> you should have no results
3) Apply the patch. if necessary, copy the modified
etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml and
etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl into
the /etc/... directory in your main Koha directory
4) Reindex Zebra biblios
5) Do the same search as 2) => you should have one result
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors.
Test
NOTE: default UNIMARC framework don't have 995g,
so I must add it first.
1) Added test string to 995b on some record
2) Reindex and search as indicated, no results
3) cp files to destination
4) reindex
5) search and result ok !
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Thu, 10 Oct 2013 18:50:13 +0000 (18:50 +0000)]
Bug 10037: regression test for searching UNIMARC item index in DOM mode
This patch adds a regression test that verifies that searching the
UNIMARC 'item' index for a value that is indexed by virtue of being
included in the fallback index definition for the 995 field works for
both GRS-1 and DOM.
The main patch will allow t/db_dependent/Search.t to pass.
This patch adds a few basic search and indexing tests for UNIMARC,
using sample data provied by Frédéric Demians. The new tests
by no means completely cover the possibilities, but should be
considered a starting point for future tests.
To test:
[1] Verify that prove -v t/db_dependent/Search.t passes.
Galen Charlton [Thu, 10 Oct 2013 17:58:30 +0000 (17:58 +0000)]
Bug 8252: (follow-up) make it easier to add UNIMARC indexing tests
This patch refactors t/db_dependent/Search.t so that it can be
subsequently modified to add tests for indexing and searching
UNIMARC records without duplicating the setup code.
This patch also moves the MARC21 records from t/db_dependent/data/zebraexport
to t/db_dependent/data/marc21/zebraexport so that UNIMARC sample
data can be slotted in t/db_dependent/data/unimarc/zebraexport.
To test:
[1] Verify that prove -v t/db_dependent/Search.t passes.
Galen Charlton [Thu, 10 Oct 2013 17:28:51 +0000 (17:28 +0000)]
bug 8252: (follow-up) add search tests on music number
There was some churn in previous patches about the desired
name of the music publisher number index, so this patch
adds tests to confirm that both the old and new names
work as CCL keywords.
Galen Charlton [Thu, 10 Oct 2013 17:18:43 +0000 (17:18 +0000)]
bug 8252: (follow-up) test both GRS1 and DOM indexing
This patch expands t/db_dependent/Search.t to run
the same tests using both the GRS-1 and DOM indexing
modes. It also adds hooks in zebra_config.pl to make
it easier to stage test cases for non-MARC21 Zebra
indexing.
Note that in DOM mode one of the tests is currently a
TODO, as relevance ranking for wegihted queries differs
between GRS-1 and DOM.
To test:
[1] Verify that prove -v t/db_dependent/Search.t passes.
This patch fixes biblio-zebra-indexdefs.xsl files.
It was generated from biblio-koha-indexdefs.xsm with the new
koha-indexdefs-to-zebra.xsl amended by F. Démians's patch.
To test :
- Take a DOM UNIMARC Koha
- Apply all the patchs of 8252 bug, including this one
- Copy src/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl
to your etc/zebradb/marc_defs/unimarc/biblios/ located in your
installation directory
- Run rebuid_zebra -b -x -r -v
- make advanced searches on staff interface and opac, on coded fields
indexes (Audience, Literary genre, Biography, Illustration, Content,
Video Types, Serial Type, Periodicity, Regularity, Picture)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Ok for me. This patch put in sync indexes XSL definition with
authoritative XML definition. Subsequently, it won't be difficult to
amend DOM UNIMARC indexes defintion if necessary. And, as it is, I don't
see any regression, whereas I can see huge improvements. Thanks Mathieu!
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>