Commits on Feb 22, 2016
  1. @dpavlin @brendan1226

    Bug 15818 - OPAC search with utf-8 characters and without results gen…

    …erates encoding error
    
    When searching for something in OPAC which doesn't result in any results but have utf-8
    characters in search string we get following encoding error:
    
    Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl5/5.20/Encode.pm line 215.
    
    This is because we are trying to decode string which is allready correctly
    marked as utf-8.
    
    Test scenario:
    
    1) enter search string with utf-8 characters in opac which doesn't
       return any results
    2) verify that you get application error
    3) apply this patch
    4) re-run query and verify that errror is gone
    
    Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
    Step 0: Define "OPACNoResultsFound" with '{QUERY_KW}'
    Note that I don't get the error (Encode 2.60) but the search terms are
    not display correctly.
    
    Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
    The variable to be decoded comes from already decoded vars (via
    the -utf8 flag from CGI), following the trail in Search.pm.
    
    Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
    dpavlin committed with brendan1226 Feb 15, 2016
Commits on Oct 22, 2015
  1. @dpavlin @tomascohen

    Bug 12194: add more tests for pdf creation

    When run with KEEP_PDF enviroment variable it will keep
    test.pdf for manual inspection. This can be used to verify
    that ttf font configuration is complete like:
    
    KEEP_PDF=1 KOHA_CONF=/etc/koha/sites/srvgit/koha-conf.xml prove t/Creators.t
    
    sample of utf-8 text, font name and type will be on bottom of second page
    
    Followed test plan, works as expected. (See comment#11)
    Signed-off-by: Marc Véron <veron@veron.ch>
    
    Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
    dpavlin committed with tomascohen Jul 28, 2014
Commits on Jun 4, 2015
  1. @dpavlin @tomascohen

    Bug 13815 - plack loose CGI qw(-utf8) flag creating incorrect utf-8 e…

    …ncoding everywhere
    
    This is major problem for plack installations with utf-8 encoding.
    
    In this case, we are overriding CGI->new to setup utf-8 flag and
    get correctly decoded $cgi->params, and reset syspref cache using
    C4::Context->clear_syspref_cache
    
    Test scenario:
    1. under plack try to search with utf-8 charactes
    2. try to find patron with utf-8 characters
    
    Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Mar 10, 2015
Commits on May 4, 2015
  1. @dpavlin @tomascohen

    Bug 13773: add stock number to details and items display

    This patch adds stocknumber (named Inventory number in interface)
    to details table and items display if it exists.
    
    Test scenario:
    1. find item(s) which have inventory number assigned
    2. verify that you don't see inventory number in items display
    3. apply this patch
    4. verify that inventory number is now available
    
    Signed-off-by: Nicole <nicole@bywatersolutions.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Feb 18, 2015
Commits on Mar 30, 2015
  1. @dpavlin @tomascohen

    Bug 10773 - add help for *_description fields

    Signed-off-by: Nick <Nick@quechelibrary.org>
    
    Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Dec 22, 2014
  2. @dpavlin @tomascohen

    Bug 10773 - Add item-level descriptions for Label Printing

    This patch adds new fields ccode_description, homebranch_description,
    holdingbranch_description, location_description and
    permanent_location_description which can be used in the Label Creator
    to display names/descriptions instead of codes
    
    Test Plan:
    
    1) Edit a layout in the Label Creator so that it includes any of these
    fields. I suggest including "homebranch_description" and perhaps
    "ccode_description" if you have them in your item data.
    2) Add items to a batch in the Label Creator.
    3) Export the batch using the layout, and view as PDF
    4) Verify that you see descriptions for fields which you added
    
    Signed-off-by: Nick <Nick@quechelibrary.org>
    
    Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Aug 21, 2013
Commits on Mar 19, 2015
  1. @dpavlin @tomascohen

    Bug 13709 - Patron cards creator utf-8 encoding and ttf fonts broken

    This change is similar to Bug 8375 which introduced ttf fonts for
    labels printing in order to support diacritics and utf-8 encoding,
    but this change was never implemented for patron cards.
    
    Test scenario:
    
    1. make sure that you have <ttf> font mapping in koha-conf.xml
    2. define partron card layout, template, profile and batch
       (with utf-8 chars, probably in patron firstname or surname)
    3. verify that without this patch pdf export file is error message
       Wide character in compress at /usr/share/perl5/PDF/Reuse.pm line 820
    4. apply this patch and verify that generated pdf has correct encoding
    
    Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Feb 13, 2015
Commits on Mar 7, 2015
  1. @dpavlin @tomascohen

    Bug 13789 - facets with accented utf-8 characters generate double enc…

    …oded links
    
    Bug 13425 tried to fix XSS in OPAC, by using url filter in template toolkit
    on whole generated url. This doesn't work and create double encoded strings
    in facets because we are creating url variable by concatenating query_cgi
    (which did pass through uri_escape_utf8 on perl side) and other
    parameters which have to be escaped in template.
    
    Also, code like
    
    [% SET limit_cgi_f = limit_cgi | url %]
    
    doesn't do anything (at least doesn't apply url filter) so it's not needed.
    
    This patch also fixes encoding of hidden fields used in sort by form.
    
    And lastly, it tries to make facet changes for opac and intranet as same as
    possible to simplify future maintencence of this code.
    
    Test scenario:
    1. find results in your opac which contain accented characters
    2. click on them and verify that results are missing
    3. apply this patch
    4. re-run search and click on facets link verifying that there are
       now results
    5. test sort by form and verify that results are ok
    6. verify that facets are still safe from injection by constructing url like
       /cgi-bin/koha/opac-search.pl?q=123&sort_by='"><script>prompt('Happy_Holidays')</script>&limit=123
       and verifying that you DON'T see prompt window in your browser
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Mar 4, 2015
Commits on Jan 13, 2015
  1. @dpavlin @tomascohen

    Bug 11944: decode uri_unescape data

    This data is passed into form so it needs to be correctly marked as
    utf-8 if we want form submit to work correctly
    
    This change fixes sort issues which use form submit.
    
    Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Jul 23, 2014
  2. @dpavlin @tomascohen

    Bug 11944: remove url/uri filter from query_cgi

    We don't need to pass query_cgi through url (or uri) filter since this
    will turn query string (correctly escaped inside code) back into
    two-byte escaped string which CGI( -utf8 ) won't turn back into proper utf-8
    
    Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Jul 23, 2014
Commits on Dec 19, 2014
  1. @dpavlin @tomascohen

    Bug 13470 - pay fines with extended borrower attributes result in app…

    …lication error
    
    Test scenario:
    
    1. ensure that extended patron attributes are turned on in system preferences
    2. find borrower which has fine to pay, and click on pay button
    3. verify application error
    4. apply patch and verify that application error is gone
    
    Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Dec 16, 2014
Commits on Sep 16, 2014
  1. @dpavlin @tomascohen

    Bug 12729 - Overdue items won't show as overdue in red in circulation

    It seems that Firefox date parser doesn't like our dates which are
    formatted in ISO format like "2014-08-06 00:00:00". This results in
    missing red color in overdue dates.
    
    So intead of munching different date formats and JavaScript (and having
    to support different browers) this patch moves check for overdue dates
    back to mysql and just transfers boolean value to JavaScript so it can
    show correct class for date_due.
    
    Test scenario:
    1. find borrower with overdue checkouts
    2. verify that all dates are black (and are in ISO format)
    3. apply this patch
    4. reload page and verify that overdue dates turned red
    
    Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
    Tested with different due dates (hourly and not) and different date formats.
    Passes tests and QA script.
    
    Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Sep 4, 2014
Commits on Sep 14, 2014
  1. @dpavlin @tomascohen

    Bug 12898 - Z39.50 title search doesn't work with multiple words

    This fixes regression introduced by Bug 6536 so that multiple
    words in title search will work.
    
    Test scenario:
    
    1. try z39.50 search with more than one word
    2. verify that no results apper
    3. apply patch and re-run search
    4. verify that there are results
    
    Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Sep 10, 2014
Commits on Aug 7, 2014
  1. @dpavlin @tomascohen

    Bug 8148 - LDAP auth_by_bind doesn't fallback to local auth

    This patch covers LDAP auth_by_bind configuration so that wrong
    LDAP password will return -1 to C4::Auth so we can abort local auth
    and prevent users logging in with stale database passwords.
    
    Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Mar 12, 2014
Commits on Jul 29, 2014
  1. @dpavlin @tomascohen

    Bug 12649: Add Croatian language

    Test scenario:
    1. apply the patch
    2. run updatedatabase.pl
    3. install Croatian language
       cd misc/translator
       perl translate install hr-HR
    4. go to Global system preferences > I18N/L10N preferences
       check that Hrvatski(hr-HR) is available
    
    Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
    Works, no koha-qa errors.
    Also tested translating to de-DE and on advanced search opac/staff
    is listed translated.
    
    Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
    Note: This also makes the language show up in the language pull
    down in advanced search. Because the entry is the last in the file,
    it will show last in the list. I am noting this here, the list
    is not really consistently sorted right now and there is work under
    way to change the way we handle this.
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Jul 24, 2014
Commits on Jul 18, 2014
  1. @dpavlin @tomascohen

    Bug 12593: search facets die with regex error if biblio has square br…

    …ackets in fields
    
    It's quite common to have [something] within facet data, and it produces following error:
    
    Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE
    
    This problem was intoduced in Bug 12151 but is trivial to fix.
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    Good catch.
    
    To test:
    - Created a bibliographic record, linked to an authority record (personal name). Did a search that returned the author as a facet.
    - Added a [ symbol to the author name.
    - Repeated the search
    => FAIL: "Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE"
    - Apply the patch
    - Retry the search
    => SUCCESS: No error, bracket shows correctly.
    
    Passes koha-qa.pl too.
    
    Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    dpavlin committed with tomascohen Jul 17, 2014
Commits on May 5, 2014
  1. @dpavlin @gmcharlt

    Bug 8375: Use TrueType fonts in PDF::Reuse

    Since built-in PDF fonts suport just Latin-1 encoding, we have
    to switch to TrueType fonts to correctly encode all UTF-8 characters
    (which we should be getting from database anyway).
    
    This approach also nicely sidesteps our encoding cludges, but
    requires paths to TrueType fonts which are included in koha-conf.xml
    under new <ttf> section. Without this directive in kona-conf.xml
    code will still use Latin-1 built-in pdf fonts.
    
    Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
    Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
    Signed-off-by: Galen Charlton <gmc@esilibrary.com>
    dpavlin committed with gmcharlt Jul 19, 2012
Commits on Apr 21, 2014
  1. @dpavlin @gmcharlt

    Bug 7844: Plack intranet tooling for developers

    koha.psgi example and plackup.sh script to run any Koha site
    intranet or opac interface under Plack with optional multi-process
    Starman server
    
      plackup.sh site-name [intranet]
    
    site-name is used to find config /etc/koha/sites/site-name/koha-conf.xml
    
    All configuration is specified in koha.psgi, which you are welcome to edit
    and tune according to your development needs (enable memcache, enable/disable
    debugging modules for plack and so on).
    
    For deployment of opac or intranet you would probably want to take a look
    in plackup.sh and enable starman as web server (which is pre-forking server
    written in perl) and put some web server in front of it to serve static web
    files (e.g. ngnix, apache)
    
    When you are happy with it, rename koha.psgi and plackup.sh it to site name
    and save it for safe-keeping.
    
    This commit message is included in patch as README.plack because it includes
    useful information for people using plack for first time.
    
    Test scenario:
    1. install plack and dependencies, as documented at
       http://wiki.koha-community.org/wiki/Plack
    
    2. start ./plackup.sh sitename i[ntranet]
    
    3. open intranet page http://localhost:5001/ and verify that it redirects
       to http://localhost:5001/cgi-bin/koha/mainpage.pl
    
    4. start ./plackup.sh sitename
    
    5. open OPAC http://localhost:5000/ and verify that it redirects to
       http://localhost:5000/cgi-bin/koha/opac-main.pl
    
    6. next step is to take a look into koha.psgi and enable additional
       debug modules, save file and reload page (plackup will reload
       code automatically)
    
    Signed-off-by: Magnus Enger <magnus@enger.priv.no>
    Works as advertised. As I have explained in a comment on the bug
    this looks like a very good starting point, and we can argue about
    the details and add more options over time. Very happy to sign
    this off! (My earlier concern about / not working has now been
    taken care of, thanks Dobrica!)
    
    Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
    Signed-off-by: Galen Charlton <gmc@esilibrary.com>
    dpavlin committed with gmcharlt Apr 11, 2012
Commits on Nov 14, 2013
  1. @dpavlin @gmcharlt

    Bug 10670: ensure koha-start-zebra sets problem permissions for logs

    If koha-common is started when Zebra log files are owned by root
    it will fail to start without any useful message (since Zebra can't
    write errors in log files because it lacks permissions to do so).
    
    This patch creates empty log files and ensure they have correct
    permissions.
    
    I can't pin-point why log files gets owned root, but I suspect it
    has something to do with Zebra crashing and logrotate, but this is
    just theory. We have seen this behaviour since koha 3.1 every
    few months, and every time it happends we have root owned logs and
    crashed Zebra so this patch will at least help sites which have
    some kind of automatic koha-common start if it's not running.
    
    Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
    Signed-off-by: Galen Charlton <gmc@esilibrary.com>
    dpavlin committed with gmcharlt Aug 1, 2013
  2. @dpavlin @gmcharlt

    Bug 11216: fix bug where editing patron creates indefinite manual res…

    …triction
    
    Editing partron data results in unintended adding of indefinite manual
    restriction to it. Reason for it is hidden field add_debarment which
    is wrongly initialized to 1 instead of 0. Also JavaScript code seems
    to want to toggle checkbox, and since this field is hidden correct
    approach would be to change its value to 1.
    
    Test scenario:
    
    1. edit patron data
    2. verify that debarrment is wrongly added
    3. remove debarrment
    3. apply this patch
    4. edit patron again
    5. verify that debarrment wasn't added
    6. intentionally add debarrment and verify that it's saved
    7. add debarment, enter something in comment but press cancel
       and verify that debarment isn't added
    
    Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
    
    This fixes this blocker, however, with or without the patch, the date
    is not saved correctly. I will file a new bug for that
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Galen Charlton <gmc@esilibrary.com>
    dpavlin committed with gmcharlt Nov 8, 2013
Commits on Apr 1, 2013
  1. @dpavlin @jcamins

    Bug 6554 - make Koha internally utf-8 clean

    In current implementation (mostly commented out in this patch)
    uses heuristic to guess which strings need decoding from utf-8
    to binary representation and doesn't support utf-8 characters
    in templates and has problems with utf-8 data from database.
    
    With this changes, Koha perl code always uses utf-8 encoding
    correctly. All incomming data from database is allready
    correctly marked as utf-8, and decoding of utf8 is required
    only from Zebra and XSLT transfers which don't set utf-8 flag
    correctly.
    
    For output, standard perl :encoding(utf8) handler is used
    so it also removes various "wide character" warnings as side-effect.
    
    Test scenario:
    1. make sure that you have utf-8 characters in your biblio
       records, patrons, categories etc.
    2. try to search records on intranet and opac which contain
       utf-8 characters
    3. install language which has utf-8 characters, e.g. uk-UA
       dpavlin@koha-dev:/srv/koha/misc/translator(bug_6554) $
       PERL5LIB=/srv/koha/ perl translate install uk-UA
    4. switch language to uk-UA and verify that templates
       display correctly
    5. test search and Z39.50 search and verify that caracters
       are correct
    
    Signed-off-by: Owen Leonard <oleonard@myacpl.org>
    
    I followed the test plan, adding utf-8 characters to library names,
    patron categories, titles, and authorized values. I tried the uk-UA
    translation and everything looked good.
    
    When performing Z39.50 searches for titles containing utf-8 characters I
    got results which were still occasionally contaminated with dummy
    characters [?] but I assume this is Z39.50's fault not the patch's.
    
    Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
    Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
    Already signed, add mine.
    Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
    dpavlin committed with jcamins Jun 10, 2012
Commits on Mar 22, 2013
  1. @dpavlin @jcamins

    Bug 8378 - followup - update notices to use <<items.fine>>

    Didn't break on well-formed notices, and fixed those with problems
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
    dpavlin committed with jcamins Mar 20, 2013
  2. @dpavlin @jcamins

    Bug 8378 - followup - sample_notices.sql updated to <<items.fine>>

    Trivial string substitution.
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
    dpavlin committed with jcamins Mar 20, 2013
  3. @dpavlin @jcamins

    Bug 8378 - show all items columns and new items.fine

    This allows users to select any columns from items and adds new
    items.fine field introduced by previous patch to user interface.
    
    Note: This works as expected. items.fine appears as an option and gets inserted in the notice template as expected.
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
    dpavlin committed with jcamins Mar 19, 2013
  4. @dpavlin @jcamins

    Bug 8378 - <fine> in overdues changed to <<items.fine>>

    This patch reintroduces fines in overdue_notices.pl with minimal
    changes to exsiting code.
    
    It DOES changes template syntax, it used to be <fine>USD</fine> but
    currency was not recalculated and used only to select format, so
    now we are using active system currency because values are in it
    anyway.
    
    Example notify template:
    
    <item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>,
    Barcode: <<items.barcode>> Fine: <<items.fine>> </item>
    
    If your active currency doesn't have valid ISO code this code will
    fallback to sprintf with two decimal digits, and you can insert
    currency symbol in template itself (currency field is not editable
    through web interface, so this fallback might be useful for existing
    installations).
    
    Test scenario:
    1. configure fine amount under "Circulation and fines rules"
       for patron category and item type
    2. checkout item with correct type to partron in correct
       category with due date set to yesterday
    3. verify that overdue notice uses new <<items.fine>> tag
    4. run ./misc/cronjobs/fines.pl to calculate fines
    5. run ./misc/cronjobs/overdue_notices.pl -n
       and verify that fine amount is included
    
    Notes: Tested using the default ODUE notice, changing:
    <fines>USD</fines>
    for
    <<items.fine>>
    
    Everything worked as expected with finesmode=production set.
    
    Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
    dpavlin committed with jcamins Mar 19, 2013
Commits on Feb 20, 2013
  1. @dpavlin @jcamins

    Bug 9662 - ISSN search field not passed to Z3950Search

    Seems like simple omission when passing $pars hash to
    Z3950Search function.
    
    Test scenario:
    
    1. select any Z39.50 search form and enter valid ISSN
    2. verify that you don't get any results from remote servers
    3. apply this patch and re-check that results are now availble
    Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
    Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
    dpavlin committed with jcamins Feb 19, 2013
Commits on Jan 8, 2013
  1. @dpavlin @jcamins

    Bug 9346 - acqui/neworderempty.pl ignores exchange rates and destroys…

    … user data on page load
    
    This restores behaviour of new order form before Bug 5335 merge
    
    Test scenario:
    
    1. load Receipt summary for existing customer
    2. take note of Unit cost and Order cost
    3. open existing order line and verify that Replacement cost,
       Budgeted cost and Total are not re-calculated on page load
    4. change currency and verify that costs are updated
       (change currency to system default and all values should become
       same as vendor price)
    5. change Quantity, get alert "You can't add a new item, please create a new order line"
       and verify that Total still reflects correct value
    
    Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
    Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
    Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
    dpavlin committed with jcamins Jan 3, 2013
Commits on Nov 8, 2012
  1. @dpavlin @jcamins

    Bug 8919 - ExtendedPatronAttributes not populated from LDAP

    Current code is overly complex and assumes that
    C4::Members::AttributeTypes::GetAttributeTypes
    returns array of attribute codes which is not true.
    
    Instead it return array of hashes so none of extended attributes
    will be replicated from LDAP.
    
    This code correctly extracts extended attributes from borrower data
    provides simpler code which fills same structure.
    
    It also skips empty values (" ") which are result of mapping without
    any default value. This is needed to make unique extended patron values
    work. If not handled it would insert empty value for first user and
    fail for all others on uniqueness constraint.
    
    Test scenario:
    
    1. define Patron attribute types in administration
    2. define mapping from LDAP fields to attributes in koha-conf.xml
    3. login as new user with LDAP fields and verify that extended
       attributes are replicated from LDAP
    
    Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
    Passed-QA-by: Paul Poulain <paul.poulain@biblibre.com>
    Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
    dpavlin committed with jcamins Oct 15, 2012
Commits on Oct 24, 2012
  1. @dpavlin @PaulPoulain

    Bug 8953 - opac-userupdate encoding issues

    This script has various encoding problems:
    
    1. parametars from CGI are not encoded in utf-8, so when they are
       compared with utf-8 strings from database every field with
       utf-8 characters will be reported in e-mail as changed
    2. when sending e-mail, wide characters are passed to Mail::Sendmail
       which results in software error if edited field has utf-8 characters
       (because of first point, this happend if ANY fields has utf-8 chars)
    3. when declaring encoding for outgoing e-mail utf-8 is more correct
       than just utf8
    
    Test scenario:
    
    1. open opac-userupdate and edit user which has utf-8 characters in
       at least one field (firstname and surname are common examples)
    2. edit one of other fields and add utf-8 character to it
    3. verify that e-mail with changes arrived with just edited field
    
    Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
    Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
    dpavlin committed with PaulPoulain Oct 22, 2012
Commits on Sep 19, 2012
  1. @dpavlin @PaulPoulain

    Bug 6448 - carp on invalid barcode

    This is consistent with implementation of other barcode types
    which all carp instead of die on invalid barcodes.
    dpavlin committed with PaulPoulain Aug 4, 2012
Commits on Aug 2, 2012
  1. @dpavlin @PaulPoulain

    Bug 6448 [2/3] Barcodes::EAN13 autoBarcode

    Implement auto-incrementing EAN-13 barcodes
    
    To make this work, C4::Barcodes::next was modified to call process_tail with
    new incremented value so that process_tail can generate correct checksum.
    Since process_tail is currenlty not used by any barcodes, this change is safe.
    
    C4::Barcodes is used by addbiblio.pl when adding multiple records, while value_builder
    is used in all other cases.
    
    Test scenario:
    
    1. prove t/Barcodes_EAN13.t
    
    2. KOHA_CONF=/etc/koha/sites/fer/koha-conf.xml prove t/db_dependent/Barcodes.t
       this will check C4::Barcode implementataion
    
    3. in systempreference change autoBarcode to incremental EAN-13 barcode
    
    4. edit two items of any biblio assigning barcodes and verify that numbers
       are increasing. Have in mind that last digit is check digit, and it
       doesn't increment, but is calculated from barcode itself. Example with
       checksum in brackets: 000000086275[2], 000000086276[9], 000000086277[6]
    
    5. Add Item and verify that it gets assigned next barcode
    
    6. Add & Duplicate item and verify barcode increase
    
    7. Add Multiple Copies and verify that barcode increase for each copy
    
    Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
    Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
    dpavlin committed with PaulPoulain Mar 28, 2012
  2. @dpavlin @PaulPoulain

    Bug 6448 [1/3] EAN-13/UPC-A itemBarcodeInputFilter

    This filter which check validity of EAN-13 barcode and padd it with zeros
    up to full 13 digit number. This will also expand 12 digit UPC-A barcodes
    to EAN-13 automatically which is useful for older barcode readers which tend
    to ignore first zero in EAN-13 if they have just UPC-A support.
    
    It should be noted that EAN-13 or UPC-A product codes printed on books are not
    good choice for barcodes in Koha since each item has to have unique barcode.
    
    Test scenario:
    
    1. prove t/Circulation_barcodedecode.t
       this checks expansion of 12 digit UPC-A to 13 digit EAN-13 and zero padding
    
    2. in systempreferences search for itemBarcodeInputFilter and select EAN-13
    
    3. edit one item and assign it valid EAN-13 barcode, eg. 0000000695152, check it out
    
    4. test checkin with just 695152 to test leading zero expansion
    
    Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
    dpavlin committed with PaulPoulain Mar 28, 2012
  3. @dpavlin @PaulPoulain

    Bug 6448 [3/3] EAN-13 barcode labels

    Current implementation doesn't scale barcodes because low-price
    CCD barcode readers are very sensitive about size
    
    Test scenario:
    
    1. in Tools > Labels create or edit Layout and select EAN13 as barcode
       type
    
    2. export one of existing batches using EAN13 layout and verify that
       generated pdf file contains barcodes
    
    3. print pdf file and test it with barcode reader
    
    Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
    dpavlin committed with PaulPoulain Jun 4, 2011
Commits on Jul 24, 2012
  1. @dpavlin @PaulPoulain

    Bug 8442 - labels creator fixes for plack

    - remove all exit(1) and replace them with __END__ which benefits CGI
    - insert correct =cut markers at end of POD (required for CGI::Compile
      under plack to correctly parse source code and exeute it)
    - scope variables with our which are used inside sub for plack
    
    Signed-off-by: Mirko Tietgen <5p4m@gmx.de>
    Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
    dpavlin committed with PaulPoulain Jul 19, 2012
  2. @dpavlin @PaulPoulain

    Bug 8439 - Printing basketgroup does not work on plack

    scope $input CGI object with our for plack
    
    Signed-off-by: Mirko Tietgen <5p4m@gmx.de>
    Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
    dpavlin committed with PaulPoulain Jul 16, 2012