Commit graph

23711 commits

Author SHA1 Message Date
Jonathan Druart
baea0a79d5 Bug 7976: Remove the borrow permission
The borrow permission was used but uselessly.
For instance, at the opac, the flagsrequired parameter was set to
'borrow' but the 'authnotrequired' was set also (which means no auth
required).
At the end, this permission was used at only 1 place: for the basket,
intranet side.
This can be replaced with the catalogue permission (which is used to
search).

Test plan:
1/ Confirm that you are able to show/download/sent the cart (intranet side)
with the catalogue permission.
2/ At the OPAC, you should be able to access the same pages as before
with any other permissions.

Concretely it is quite difficult to test this patch, you should have a
look at the code.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-05 13:43:34 -03:00
83c6817a86 Bug 14276: Keep highlight on the active item in item editor
The highlight only works on even items.
This patch should resolve it.

Test plan:
Edit biblio with multiple items.
Verify that the highlight is visible on the selected item you edit.
And that there is no highlight for a new item.

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-05 12:54:36 -03:00
Bernardo Gonzalez Kriegel
7928cdfbd4 Bug 14173: Paging on 'recent comments' page in OPAC is not displaying correctly
This patch corrects the display of current page on
a multipage recent comments.

To test:
1) Enable OpacShowRecentComments

2) Add multiple comments to multiple records
I used a script to add multiple lines like
"insert into reviews values ($i, 51, $i, 'Comment $i', 1, '2015-06-01 00:00:00')"
to table reviews

3) On OPAC, go to 'Recent comments', verify the bug

4) Apply the patch

5) Reload and check correct display

Can't found missing space near 'by' from description.
Display is correct for me.

Followed test plan, displays as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-05 12:53:49 -03:00
2e23236c9f Bug 10824: OAI-PMH repository/server not handling time in 'until' and 'from'
This patch removes the DATE() function from a query on timestamp, and adds a
sub that strips the UTC designators "T" and "Z" from incoming "from" and
"until" arguments in OAI-PMH requests so that they're more compliant with
MySQL (and probably other databases as well). This means that the date
and time for the 'from' and 'until' arguments will be matched correctly
in the database.

This patch also adds 'T00:00:00Z' to 'from' arguments and 'T23:59:59Z' to
until arguments, when only dates are provided via the OAI parameters.

The zero time isn't necessary, since MySQL treats '2013-09-30' as
'2013-09-30 00:00:00' by default. However, the near midnight time
is needed for 'until'. Otherwise, you'll never be able to retrieve
a record with a date/time matching the 'until' argument.

In summary, this patch adds handling for times as well as dates, which
is necessary so that Koha is closer to meeting the actual OAI-PMH spec.

TEST PLAN:

0) Note down a selection of timestamps from your biblio table

1) Enable your OAI-PMH server through the global system preferences
Web services tab.

2) Craft and submit a similar request to the following in your browser:
KOHAINSTANCE/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc&
from=2013-09-02T13:44:33Z&until=2013-09-05T13:44:33Z

Change the exact dates to accord with your timestamps, but keep the
YYYY-MM-DDTHH:MM:SSZ format.

3) Note the unexpected behaviour. A "from" argument with the timestamp
2013-09-02T13:44:33Z will show records from 2013-09-03 but not records
from 2013-09-02 even though the timestamp in the database will say
"2013-09-02 13:44:33".

Also note that records with a timestamp later than 13:44:33 will show
up for the day 2013-09-05, even though they shouldn't.

4) APPLY THE PATCH

5) Resubmit the links you tried above

6) Note that the applicable records now appear (or do not appear) in
accordance with the precise date/time ranges!

--

Developer Note: We could've not stripped the UTC designators and used
DATE() around the parameters in the SQL queries, but that would have
lost the whole purpose of using times in the "from" arguments, since
they would've been generalized to just the dates.

I think this is probably the best solution. Admittedly, creating
"form_arg" and "until_arg" hashrefs in the ResumptionToken object
might not be ideal, but I preferred that to copying the
_strip_UTC_designator subroutine into two other objects. Perhaps this
sub could go somewhere else and be imported into those other two objects
but this seemed to be the most sensible decision. I'm open to other
opinions though.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works, find results with correct timestamp
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-05 12:53:10 -03:00
Katrin Fischer
ab0a0af1cb Bug 13619: Acq home: ensure 'manage suggestions' goes to pending suggestions
The link on the start page of Koha goes to the pending suggestions tab
explicitly. The link on the acquisition start page doesn't do that so
when you have your own status it might show another tab first.
Patch links to be the same and explicitly target the pending tab.

To test:
- create a new suggestion
- verify link from the acq start page leads to the pending tab
- verify link from the Koha start page does the same

Signed-off-by: Marjorie <marjorie.barry-vila@ccsr.qc.ca>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-05 12:53:10 -03:00
c2650e20f9 Bug 13656: "Change"/"Set to patron" button for linking a member to an organisation (or child to guarantor) not translatable
Test plan:
1. install and activate an additional language
2. create patron in organization category
3. create professional patron
4. try to add this patron to an organization (Guarantor information section)
5. note that the left button text changed to "Change" - untranslated english string
6. push the "Delete" button, the guarantor patron field is cleared and the left button text changed to "Set to patron" - again original english text
7. apply the patch
7.1. update translation (koha-translate -u language_code)
8. repeat 4-6, note, that button text are still translated in all sitations
9. sign off ;)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no errors
Fixed message capitalization

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-05 12:53:09 -03:00
Jonathan Druart
e604097740 Bug 13662: Fix the serials.receive_serials permissions
There are some issues with serial permissions.
For instance it's not possible to receive serials if the
edit_subscription is not set.
Also the toolbar is empty.

Test plan:
1/ Set the serials => receive_serials permissions to a patron (and only
this one for the serials module).
2/ Verify you cannot create a new subscription, you can search
subscriptions but cannot edit them.
3/ On the serial result list, receive a serial (action > Serial
receive).
You can now change the status and receive it.
4/ On the serial collection, you can edit 1+ serials to reveice it.
5/ Set the serials => edit_subscription permission and confirm there is
no regression.

QA note: I think we should introduce a C4::Serials::can_receive_serials
subroutine, to test the IndependentBranches pref, but I don't want to
add to much processing to check permissions.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-05 12:53:09 -03:00
8e9f89e92b Bug 14299: Today's checkouts not always sorting correctly
Sometimes the today's checkouts do not sort correctly. This is due to a
simple typo in the comparison line where the bad key 'timstamp' is
compared against the correct key 'timestamp'.

Test Plan:
1) Check out a decent number of items in a row ( 5+ )
2) Hopefully you will see they are sorted incorrectly
3) Apply this patch
4) Reload the page
5) Note they are now sorted correctly

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-05 12:53:03 -03:00
fed5e7b6bb Bug 13967: (RM followup) fix merge error
When I merged 13967 into master (with 5010 already on it) I inadvertedly
removed a few lines that add a check for bad OPACBaseURL values.

While I don't agree with that check it should be discussed on a separate
bug anyway.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 15:15:32 -03:00
2e11350fe3 Bug 13967: (QA followup) Make DBIx control transactions on tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 15:12:45 -03:00
d76c9f4850 Bug 14142 - Holds queue viewer only displays first subtitle from marc keyword mappings
Despite the point of the Keyword to MARC Mappings being to simplify the
handling and display of repeated values from multiple subfields, the
holds queue viewer will only display the first value found. What it
should be doing instead is displaying all fields that match the subtitle
keyword.

Test Plan:
1) Apply this patch
2) Define multiple Keyword to MARC mappings for the subtitle keyword
3) Place a hold on a record using those subtitle fields
4) View the hold in the holds queue viewer
5) Note that all the subtitles now appear

Signed-off-by:Heather Braum <hbraum@nekls.org>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 11:14:58 -03:00
Dobrica Pavlinusic
3cd086b6b6 Bug 13815 - plack loose CGI qw(-utf8) flag creating incorrect utf-8 encoding 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>
2015-06-04 11:13:46 -03:00
f327ebe540 Bug 14267: How active is active?
git grep on function active in additem.tt:
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt:function active(n
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt:active([%
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt:function a
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serial-issues-full.tt:
t/Cache.t:      unless ( $cache->is_cache_active() && defined $cache );
t/Cache.t:          unless ( $cache->is_cache_active() );
Conclusion: active in additem seems to be quite inactive.

Test plan:
Add, edit or delete items and verify that you did not miss active :)

NOTE: The active function has a loop which is always run.
      Inside that loop 'ong' would always be defined as some number
       concatenated with XX.
      Both sides of the if/else reference document.getElementById(ong),
       but there is only one occurence of XX in the file: the concatenation!
      Similarly, the 'link' logic does not correspond to any of the
       id= or name= strings in the file.
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt
       is the only file with "id=\"link" that matches the logic.
      This is likely a cut-and-paste remnant made useless by datatable upgrades
       and HTML/CSS class changes.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 11:08:14 -03:00
Katrin Fischer
5bbea3ea2c Bug 14269: OPAC: Some template improvements for the full serial history page
- Fix filter labels:
  Library : -> Library:
  Subscription : -> Subscription:
- Make '(All)' entry in filter pull downs translatable
- Show branch name instead of branchcode in table and filter

To test:
- Verify changes as described above
- Verify filters still work as expected

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 11:06:18 -03:00
e178435ca7 Bug 14024: DBRev 3.21.00.005
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:52:39 -03:00
Marc Véron
42a5ef1680 Bug 14024 - add reports to action logs
See QA comment #5

- new reports log their Id instead of 0
- format info: <name> | <sql>

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:46:20 -03:00
Marc Véron
49c364f94b Bug 14024 - add reports to action logs
This patch sets adds the possibility to log new, update and delete actions for saved reports.

To test:
-Apply patch
-Run updatedatabase.pl
-Enable system preference ReportsLog
-Create, duplicate, edit and delete saved reports
-Go to Home > Tools > Logs
-Verify that you can select "Reports" in Modules list
-Verify that your actions were logged

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:46:20 -03:00
Marc Véron
22c5c4b468 Bug 14313: OPAC - Adding a comment makes result browser disappear
To reproduce:

- Allow commenting in OPAC (Syspref reviewson)
- Log in to OPAC
- Do a search with many results
- Click on a biblio in result list
- Verify that you can browse the results in detail view ("Browse results")
- Repeat teh search above
- Click on the same biblio as above
- Add a comment (Tab "Comments")
- Close commenting window
- Click on "Next" in result browser

Result: The next biblio is displayed, but result browser has disappeared.

To test:

- Apply patch
- Try to reproduce issue above, verify that result browser does no longer disappear

AMended to remove whitespace chars. / MV

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug & solution checked, works well. No koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:41:45 -03:00
Jonathan Druart
2fa99fc7a0 Bug 13967: Add a couple of tests for SysPref and Object
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
2015-06-04 10:39:16 -03:00
6882949b1b Bug 13967 - System preferences need a package
System preferences should have a package based on Koha::Object to remove
the need for direct manipulation via SQL.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/sysprefs.t

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:39:11 -03:00
Mark Tompsett
8e726e3ee1 Bug 14111 - More t/Auth_with_shibboleth.t silencing
TEST PLAN
---------
1) Apply first patch
2) prove t/Auth_with_shibboleth.t
   -- failed?!
3) apply this patch
4) prove t/Auth_with_shibboleth.t
   -- success. *whew*
5) koha-qa test tools.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>

Test remarks: Expected outcome as per test plan. No anomaly noted.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:12:03 -03:00
Mark Tompsett
85a057bc5e Bug 14111: Silence warnings in t/Auth_with_shibboleth.t
Poorly capturing warnings_exist test cases generated noise.
This patch fixes that.

TEST PLAN
---------
1) $ prove t/Auth_with_shibboleth.t
   -- There are messages about lines 132 and 133. Noise.
2) Apply patch
3) $ prove t/Auth_with_shibboleth.t
   -- No messages. YAY!
4) koha qa test tools

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>

Test remarks: Expected outcome as per test plan. No anomaly noted.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:12:03 -03:00
Winona Salesky
cfacda2bb4 Bug 13382 - RDA: 700/710/711 display in XSLT
Test Plan:
1) Apply this patch
2) Ensure you are using the default XSLT setting for the staff and opac record details
3) Find or create a record with MARC tags 700,710,711
4) Perform an opac search that would show the record in the search results.
5) Click title to review record.
6) Note the fields updates 700,710,711 to show subfields a, b, c, d, e, f, g, h, i, k, l, m, n, o, p, r, s, t, u, x. Multiple fields are separated by span class=separator |. Adds Related and Contained Works as new headings.
7) Repeat steps 4 - 6 for the staff interface

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:10:14 -03:00
Robin Sheat
511587395f Bug 14312: dependency updates
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:09:33 -03:00
Jonathan Druart
ece2b02a57 Bug 14263: Fix export of item search results when translated
This csv does not use the correct way to display headers.
They should be put in a separate file to get a correct display.
Without this patch, the first line of the generated file contains the
headers + data

Test plan:
1/ choose a language and update + translate the templates
for instance:
  cd misc/translate;
  ./translate update es-ES; ./translate install es-ES
2/ Go to the item search form using this language
3/ Launch a search and select CSV to display the results.
The CSV headers should be correct

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Seen the bug. Works as described.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:08:40 -03:00
Jonathan Druart
0fa0297d7d Bug 12320: Remove deprecated construct to delete cookie showColumns
$.cookie('foo', null);
is deprecated and should be replaced with
  $.removeCookie('foo');

This patch replaces the occurrences for the "showColumns" cookie.

Before this patch, there was a bug on the batchmod tools.
To reproduce the issue:
1/ Go on the Batch item modification tool
2/ Fill the textarea with barcodes and submit
3/ Click on some column names (to create the cookie)
4/ Click on 'Show all columns" (to set the cookie to null)
5/ Don't submit and repeat steps 1 & 2
6/ You should see a js error:
  Error: Syntax error, unrecognized expression: :nth-child
    ...break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecogni...

Test plan:
Confirm the issue has gone away and there is no regression on the column
selection

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No js error, no regressions, no errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:07:26 -03:00
Jonathan Druart
04f5e7d4e7 Bug 12320: Remove deprecated construct to delete cookie holdfor
$.cookie('foo', null);
is deprecated and should be replaced with
  $.removeCookie('foo');

This patch replaces the occurrences for the "holdfor" cookie.

Test plan:
1/ Search for a patron
2/ On the patron detail page, click on "search to hold"
3/ Search for records
4/ On the results page, click on "Place hold" > "Forget PATRON"
5/ Reload the page.
6/ The "Place hold" button should not contain the patron anymore

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described, no errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:07:26 -03:00
61d9cb28dc Bug 5010: DBRev 3.21.00.004
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:05:48 -03:00
Jonathan Druart
3b4c4a4861 Bug 5010: Fix - replace tab with spaces
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No errors.

Tested what I can, not plack/shibboleth/cas

Perhaps this can pass and we can fix any problem later (for 3.22)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:00:04 -03:00
Mark Tompsett
1651cf70d1 Bug 5010: Fix OPACBaseURL to include protocol
First, it is strongly recommended to set the OPACBaseURL. But
this patch allows the inclusion of the protocol and not just
a site.

Next, C4/Auth now puts OPACBaseURL into the template parameters
regardless of OPAC or Staff clients.  t/db_dependent/Auth.t was
tweaked to add a check for confirming that get_template_and_user
adds OPACBaseURL to both OPAC and Staff templates.

In the staff client, once the OPACBaseURL is set, you get a nice
OPAC View link when viewing a biblio's detail. It should reflect
the protocol used now.

Hard coded 'http://' strings were removed from the
sample_notices.sql files. This is what required also updating
the letters table in the updatedatabase.pl script.

The explanation text in the sysprefs.sql needed updating too to
reflect the inclusion of the protocol. And this was the other
update done in the updatedatabase.pl script. The opac.pref file
was similarly changed as well.

catalogue/detail.pl had no need to pass a custom OpacUrl value,
since C4/Auth passes the required OPACBaseURL, so it and the
corresponding template were modified.

Both the MARC21 and NORMARC intranet details files had 'http://'
hard coded in them. This was removed.

Both the bootstrap and prog theme opac-detail template had a
protocol parameter that was used. The logic for the parameter
was not removed, because it is used extensively in one template.
Perhaps it should be used to simplify the other. However, the
calculated current_url parameter had references to the protocol
removed, because of the changes to OPACBaseURL.

opac/opac-shareshelf.pl had a hard coded 'http://' which was
removed.

t/db_dependent/Auth_with_cas.t had 'http://' added to the value
set for OPACBaseURL.

In virtualshelves/sendshelf.pl explicit code which sent the
OPACBaseURL preference was removed, since C4/Auth sends it all
the time now.

C4::Context::set_preference was tweaked to ensure that
OPACBaseURL would always start with http.
t/db_dependent/Context.t was tweaked to specifically test this.

The Shibboleth authentication needs OPACBaseURL set, and that
it be https protocol. The _get_uri routine was tweaked to always
pass back https:// as the protocol on the OPACBaseURL.
t/Auth_with_shibboleth.t was tweaked to specifically test the
changes.

TEST PLAN
---------
This is not an easy patch to test. Difficulties include:
- configuring Koha to run under https
    (tweaking apache2 isn't so hard, just tricky)
- configuring Koha to run OPAC and Staff with Plak
    (since code with comments about plak were sliced out)
- configuring Koha to use CAS
    (may be requires for the CAS test)

 1) Apply patch
 2) Make sure OPACBaseURL is set without the protocol included.

UPDATEDATABASE
 3) back up your DB
 4) ./installer/data/mysql/updatedatabase.pl
    -- It should run without errors.
 5) Look up the OPACBaseURL system preference in the staff
    client
    -- It should have http:// prepended.
 6) Run the mysqlclient from your koha git directory
      USE koha_library;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
    -- There should be no prepended http:// on the
       <<OPACBaseURL>>.
 7) restore your DB
 8) Make sure OPACBaseURL is set with the protocol included,
    preferably https.
    -- Using https requires a bunch of apache2 tweaks.

AUTH
 9) Call up staff client.
10) Call up OPAC.
    -- C4/Auth.pm doesn't barf.
11) Call up Plack staff client
12) Call up Plack OPAC.
    -- C4/Auth.pm doesn't barf.
13) prove -v t/db_dependent/Auth.t

CONTEXT
14) Home -> Koha administration -> Global System Preferences
         -> OPAC
15) Modify and save OPACBaseURL to not have http:// or https://
    on it.
    -- It should be modified to include http://
16) Modify and save another system preference.
    -- It should save normally
17) prove -v t/db_dependent/Context.t

CATALOGUE/DETAIL (tt & pl)
18) Confirm the OPACBaseURL is set
19) Navigate to any biblio details in the staff client
    -- There should be a "OPAC view" link which has the
       correct http:// or https:// in it.

SQL (sample notices and sysprefs)
20) Run the mysqlclient from your koha git directory
      USE koha_library;
      DELETE FROM letter;
      source installer/data/mysql/de-DE/mandatory/sample_notices.sql;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
      DELETE FROM letter;
      source installer/data/mysql/en/mandatory/sample_notices.sql;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
      DELETE FROM letter;
      source installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
      DELETE FROM letter;
      source installer/data/mysql/es-ES/mandatory/sample_notices.sql;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
      DELETE FROM letter;
      source installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
      DELETE FROM letter;
      source installer/data/mysql/it-IT/necessari/notices.sql;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
      DELETE FROM letter;
      source installer/data/mysql/pl-PL/mandatory/sample_notices.sql;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
      DELETE FROM letter;
      source installer/data/mysql/ru-RU/mandatory/sample_notices.sql;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
      DELETE FROM letter;
      source installer/data/mysql/uk-UA/mandatory/sample_notices.sql;
      SELECT content FROM letter WHERE content LIKE "%<<OPACBaseURL>>%";
    -- Each of the selects should should lines that have
       <<OPACBaseURL>> starting them, but no hard-coded http://
      DELETE FROM systempreferences;
      source installer/data/mysql/sysprefs.sql;
      SELECT * FROM systempreferences WHERE variable='OPACBaseURL';
    -- The explanation should reflect the new explanation.
      QUIT
21) restore your DB
22) Make sure OPACBaseURL is set with the protocol included,
    preferably https.
    -- Using https requires a bunch of apache2 tweaks.

SLIM2INTRANETDETAIL
23) Set 'XSLTDetailsDisplay' system preference to default.
24) Set 'marcflavour' system preference to MARC21.
25) View any biblio's details.
    -- the URL beside 'OPAC View' should have the appropriate
       http:// or https://
26) Set 'marcflavour' system preference to NORMARC.
27) View any biblio's details.
    -- the URL beside 'OPAC View' should have the appropriate
       http:// or https://

OPAC-DETAIL
28) Set 'opacthemes' to bootstrap.
29) Set 'SocialNetworks' to enabled.
30) In OPAC, view any biblio's details.
    -- the Share links should have the appropriate protocol on
       the OPACBaseURL.
31) Set 'opacthemes' to prog.
32) In OPAC, view any biblio's details.
    -- the Share links should have the appropriate protocol on
       the OPACBaseURL.

AUTH_WITH_CAS
33) prove -v t/db_dependent/Auth_with_cas.t

OPAC-SHARESHELF
34) Set 'OpacAllowSharingPrivateLists' to allow.
35) In OPAC, 'Save to Lists' a search result.
36) Save it to a new private list.
37) Click the Lists button, and select the new list.
38) Click the Share button.

AUTH_WITH_SHIBBOLETH
39) prove -v t/Auth_with_shibboleth.t
    -- needs to be tests on Debian, because I can't get
       the Test::DBIx::Class installed in Ubuntu. :(

Rebased again on kohadevbox...

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 10:00:04 -03:00
Mark Tompsett
8f12796633 Bug 14325: Test calls C4::Context::set_userenv
This is a case of works by accident. This patch corrects the
set_userenv call.

TEST PLAN
---------
1) prove t/db_dependent/Borrower_Discharge.t
   -- works
2) git grep :set_userenv
   -- only this one file.
3) Confirm the the C4/Context.pm has a set_userenv
   which shifts the first parameter, as intended for
   a -> call and not a :: call.
4) apply patch
5) prove t/db_dependent/Borrower_Discharge.t
   -- still works
6) git grep :set_userenv
   -- nothing now.
7) run koha qa test tools

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 09:59:11 -03:00
b59b991977 Bug 14283: Required Devel::Cover should be Wheezy's
There's no special requirement for such a recent version of the
Devel::Cover package.

We have just deprecated Squeeze, so Wheezy's version should be ok.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-04 09:58:43 -03:00
e46d55409c Bug 14285: DBRev 3.21.00.003
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 15:44:00 -03:00
Bernardo Gonzalez Kriegel
e365e6e535 Bug 14285: Bengali locale needs to be re-defined
This patch renames translation files for Bengali
language, from ben-* to bn-IN-*.
Also adds India as region

To test:
1) Apply the patch
2) Run updatedatabase
3) Install Bengali language
cd misc/translator
perl translate install bn-IN
enable

Check correct description

4) Create and install a fake Bengali variant
cd misc/translator
perl translate create bn-XX
perl translate install bn-XX
enable both variants

Check correct rendering of region

Results comply with expected test plan outcome. Signed off for bn-IN
Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 15:22:27 -03:00
Nicole C. Engard
959e6b7ae4 Bug 14291: Fix OpacExportOptions text
This patch removes the instruction to separate values by | in the
OpacExportOptions preference.

To test:

Go to system preferences
Find OpacExportOptions
Confirm text is right

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Test output compliant with expected test plan outcome.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Changed "List" to "Select" and removed a space before the : at the end.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:51:58 -03:00
Zeno Tajoli
c7a67ea4f3 Bug 14047: Order z39.50 biblioservers in cataloguing
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Bug 14047: Sort z39.50 servers in Acquisition

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Bug 14047: [QA Follow-up] Move result_class back into attributes

No need to put this into a separate call.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Note that we strictly speaking do not need the hashref inflator here,
because TT understands hash.column as well as object.property.

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:29:43 -03:00
Marc Véron
3b3f82de37 Bug 11929: patron modification error shows borrowernumber
If an error occurs in patron batch modification, a message similar to the following is displayed:
Can not update patron with borrowernumber 7055

It would be useful to have the cardnumber as well.

This patch adds the card number to the lists of errors.

It is not easy to trigger an error (see comments).
For testing, I tweaked the sub ModMember in C4/Members.pm to always return false.

TEST PLAN
---------
1) Log in as a superlibrarian and create a test user
2) Change the cardnumber to a number differing from the
   borrower number.
3) Home -> Tools -> Batch patron modification
4) Type in the cardnumber of that test user
5) Check the Library checkbox.
6) Click Save
   -- nice error, but it is borrower number instead of
      the card number which was entered.
7) Apply the patch
8) Repeat steps 3-6
   -- nice error, but it is now more informative.
9) run koha qa test tools.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:28:04 -03:00
Jonathan Druart
5a58caad50 Bug 11603: Change the output filenames
The output filename is notices_all_<date>.[html|csv|ods] if no
letter_code parameter is given.
If 1 is given: notices_<letter_code>_<date>.[html|csv|ods]
If 1+ are given:
noties_<letter_code1>_..._<letter_codeN>_<date>.[html|csv|ods]

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:25:24 -03:00
Jonathan Druart
aecf9179a6 Bug 11603: (follow-up) pod
The filenames will change

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:25:24 -03:00
Katrin Fischer
1a3364519c Bug 11603: Some minor documentation changes
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:25:24 -03:00
b0140ece44 Bug 11603: Add --send|--nosend, fix stuf
Fix --html without --letter_code
Fix --ods which was producing a 2 lines ods file

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:25:15 -03:00
Jonathan Druart
30ed77dae6 Bug 11603: Fix encoding issues (bug 11944 is now pushed)
Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  No more encoding issue with html file, no problem with csv|ods

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:25:02 -03:00
Jonathan Druart
5e4633a3cc Bug 11603: If a letter code is given, filenames should contain it
If you choose to generate print notices for a specific letter code, the
generated files should be distinct.

The use case is: you want to process print notice for letter codes:
overdue1, overdue2 and overdue3.

The cronjobs will be:

perl misc/cronjobs/gather_print_notices.pl
/tmp --letter_code=overdue1 --csv --ods --html --delimiter=";"

perl misc/cronjobs/gather_print_notices.pl
/tmp --letter_code=overdue2 --csv --ods --html --delimiter=";"

perl misc/cronjobs/gather_print_notices.pl
/tmp --letter_code=overdue3 --csv --ods --html --delimiter=";"

without this patch, the 2 first files will be erased.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:25:02 -03:00
Jonathan Druart
9234b66038 Bug 11603: Gather print notices - add a ods parameter
This patch adds:
- the ability to generate an ods file

From now you are able to generate a ods file for print notices.

You would like to generate a csv file and not a html file.

Test plan:
- same as previous patch but test the following parameters:
 perl misc/cronjobs/gather_print_notices.pl /tmp/test --ods
 --letter_code=OVERDUE -d=:
you should get an error because csv2ods is not installed.
Follow the installation instructions and try again the command.

A ods file should be generated in your /tmp/test directory.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:25:02 -03:00
Jonathan Druart
66ba71752a Bug 11603: Gather print notices - add a csv parameter
This patch adds:
- the ability to generate a csv file instead of a html file.
- a letter_code parameter.

From now you are able to generate a csv file for print notices.

Imagine a template notice defined as:
cardnumber:patron:email:item
<<borrowers.cardnumber>>:<<borrowers.firstname>> <borrowers.surname>>:<<borrowers.email>>:<<items.barcode>>

You would like to generate a csv file and not a html file.

Test plan:
- define your ODUE notice for the print template as:

cardnumber:patron:email:item
<<borrowers.cardnumber>>:<<borrowers.firstname>> <<borrowers.surname>>:<<borrowers.email>>:<item><<items.barcode>></item>

- define overdues rules for a patron category
- check 2 items out using a due date in order to generate the overdue
  notices
- check these 2 items in
- launch the overdue_notices script
- the message_queue table should now contain 2 new entries
- launch the gather_print_notices cronjob with the following parameters:
 perl misc/cronjobs/gather_print_notices.pl /tmp/test --csv
 --letter_code=OVERDUE --letter_code=CHECKIN
you should get an error

 perl misc/cronjobs/gather_print_notices.pl /tmp/test --csv
you should get an error

 perl misc/cronjobs/gather_print_notices.pl /tmp/test --csv
 --letter_code=OVERDUE -d=:
 will produce 1 csv file in your /tmp/test directory
- verify the csv file is correct and contain only 1 csv header column.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
QA note: Keep in mind that you can use all placeholders for the
csv that you can use for the normal templates. If you normally
get the item information from <item></item> you need to use that.
If you can use <<item.barcode>> directly, you can also do so
in the csv.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:25:02 -03:00
Jonathan Druart
9f88fe0069 Bug 11603: Preparation step, cleaning up
This patch refactores and adds some good practices:
- use Modern::Perl
- use Pod::Usage
- add POD

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:25:01 -03:00
Bernardo Gonzalez Kriegel
154eb5f6f5 Bug 14279: Remove CGI::scrolling_list from issues_avg_stats.pl
This patch removes scrolling_lists from this file

To test
1) Go to Reports > Average loan time
2) Check dropdowns Patron category, Item type, Sort1/2 and Into application
will be changed
3) Apply the patch
4) Reload and check for regression

Followed test plan. Works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:21:58 -03:00
06ef68046e Bug 14265 - Use $.trim instead of trim() in admin/categorie.tt
This patch replaces trim() with $.trim() in admin/categorie.tt, as
$.trim() is more cross-platform (ie it is supported in "< IE9").

_TEST PLAN_

Before applying patch:

0) Use IE 8 or use Document Mode 8 in a newer IE using F12 Developer Tools
1) Go to Administration > Patron categories
2) Click "Edit" next to a category
3) Click "Save" at the bottom
4) Note the form doesn't submit (you can also notice the error in the
console log)

Apply the patch:

5) Hold down shift + refresh the page
6) Click "Save" at the bottom"
7) Note that the form does submit and there are no errors reported

Signed-off-by: Indranil Das Gupta <indradg@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
No regression found using iceweasel.
I did not know the staff interface was IE compatible.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:16:21 -03:00
Jonathan Druart
c7a8e4dd25 Bug 14266: Trim the email address in the pl script
The original concern of bug 14266 was to provide a compatibility for
<IE9.
But actually we don't need to trim the email address template side.
It will even better to trim it in the perl script, so that the email
will be trimed even if JS is disabled.

Test plan:
1/ Share a list and does not provide any email address
2/ Submit
=> The form is not submited, no alert/message is displayed (same as
before this patch).
3/ Share a list and provide an email address with spaces before and
after
4/ Submit
=> You should receive the email

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>
Test output compliant with expected test plan outcome.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:15:58 -03:00
e1ac8b4310 Bug 14266: Replace trim() with $.trim() in opac-shareshelf.tt
This patch replaces trim() with $.trim() which is supported
in versions of IE older than IE9.

Revised test plan
=================

Before applying patch:

0) Use IE 8 or Document Mode 8 in a newer IE using F12 Developer Tools
1) Set OpacAllowSharingPrivateLists to "Allow" in Global System Preferences
2) Create a private list in the OPAC
3) Add a record to the private list
4) Click "Share" or "Share list" on one of the list screens
5) Type in an email address and click "Send"
6) Note the error in the console log
7) The page should submit

Apply the patch:

7) Hold shift + refresh the browser to update any Javascript cache
8) Try to "Share" the list again
9) Note that the form submit after clicking "Send" and
that there are no errors in the console log

http://bugs.koha-community.org/show_bug.cgi?id=14266

Signed-off-by: Indranil Das Gupta <indradg@gmail.com>
Remarks: Works as per revised test plan
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-01 14:15:47 -03:00