Commit graph

24603 commits

Author SHA1 Message Date
Bernardo Gonzalez Kriegel
b5c0f5c3ba Bug 15063: Update MARC21 es-ES frameworks to Update 21 (September 2015)
This patch put in sync es-ES marc21 fields/subfields with
english ones.

To test:
1) Apply the patch
2) Remove all bib/auth frameworks
3) Load all files, check they load without errors

Signed-off-by: Zeno Tajoli <z.tajoli@cineca.it>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-01 17:09:29 -03:00
Bernardo Gonzalez Kriegel
96dc8bbd8e Bug 15092: item type descriptions not showing in OPAC advsearch
Go to OPAC > Advanced Search
Tab 'Item type' only shows itemtype icons,
no descriptions. Descriptions must be shown
always

To test:
1) Go to OPAC > Advanced search
2) Check no descriptions for item types
Also check that, reloading the page, item types
shows in random order
3) Apply the patch
4) Check there are descriptions now
and order is by description

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-01 17:07:11 -03:00
3a90d0f165 Bug 10937: (QA followup) updatedatabase.pl vs. kohastructure.sql field size missmatch
The bug included a discussion about this field size. And it got corrected in
kohastructure.sql to match the authorized values, but the updatedabase.pl entry
was missed on hte fix.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-31 10:29:08 -03:00
fd12390365 Bug 15010: Import patron tool creates 'duplicate' restrictions ( debarments )
If a patron has restrictions and a CSV file of patrons to be overwritten
is uploaded but has no debarred / debarredcomment columns, the a new
restriction will be added that combines all the existing restrictions (
i.e. a new debarment based on the existing borrowers.debarred
and borrowers.debarredcomment fields ).

Test Plan:
1) Create a patron with one or more restrictions
2) Import a CSV file that updates that patron, but with no debarred columns
3) Note a new restrictions is created
4) Delete the new restriction
5) Apply this patch
6) Re-import the CSV file again
7) Note that no new restriction is created
8) Add debarred and debarredcomment columns to the CSV file with a test
   date and description
9) Re-import the CSV file again
10) Note the new restriction is added to the patron

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Daniel Grobani <dgrobani@samuelmerritt.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-30 10:00:20 -03:00
Bernardo Gonzalez Kriegel
b44ac38ce6 Bug 15077: Fix Fast Add framework to pass test
This patch fixes tab location for FA frameworks.
Not all subfields belongs to tab 0.

To test:
1) On current master, with default and fasadd fw loaded,
go to Home > Administration > MARC bibliographic framework test
it fails

2) Apply the patch
3) Delete all fw, reload all, or just default (bib & auth) and
fast add
4) Repeat 1, now test must pass

This is only on master, so no need to database update.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. MARC bibliographic framework test passed Ok.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-30 09:57:44 -03:00
Bernardo Gonzalez Kriegel
c104977582 Bug 15072: (followup) fix spaces and consistency
This patch add a few spaces when required and
adds layout_id on title and breadcrumbs (for patroncards)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-30 09:57:27 -03:00
0ba3676df3 Bug 15072: (followup) Use 'New' on Patron card creator too
This patch makes the change on the patron cards creator tool too.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All patches without errors.
More consistent view.
A few spaces and a little fix in followup

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-30 09:57:27 -03:00
aa6eed42da Bug 15072: (followup) We use 'New' instead of 'Create' on the UI
This patch makes the UI show 'New' instead of 'Create' so it matches
the buttons, and the common practice on the UI.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-30 09:57:26 -03:00
0d8de48bf5 Bug 15072: Breadcrumbs and titles inconsistent in Label creator
This patch makes the page title and breadcrumbs more consistent.
It does so by removing some text (Manage...) and using Edit (id) and Create
on building both the breadcrumbs and titles.

To test:
- Traverse all the Label creator options
=> FAIL: the texts are not consistent and don't match what we use in the patron card creator.
- Apply the patch
=> SUCCESS: Terminology is consistent, titles and breadcrumbs show the same information
- Sign off :-D

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-30 09:57:22 -03:00
Bernardo Gonzalez Kriegel
9b9b966cb1 Bug 15053: Fix fr-FR, ru-RU and uk-UK sample creator data
Fixes other sample creators data

To test:
1 ) Apply the patch
2) Remove sample creator date
delete from creator_layouts; delete from creator_templates; delete from printers_profile
3) Load fr-FR/2-Optionel/sample_labels.sql
or ru-RU/optional/print_labels.sql
or uk-UA/optional/print_labels.sql

Without the patch this files can't be loaded
Test all of them

In case of ru and uk I removed a patron card layout

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-30 09:56:57 -03:00
912e136296 Bug 15053: sample_creator_data.sql now fails during a fresh install
ERROR 1136 (21S01) at line 6: Column count doesn't match value count at row 1

Test Plan:
1) Start fresh install
2) Install all test data
3) Note the SQL error
4) Apply this patch
5) Repeat steps 1 and 2
6) Note no error

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All fixed files loads without problem.
No errors found
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-30 09:56:40 -03:00
Katrin Fischer
05d3770427 Bug 11881: QA follow-up - rename class
A suggestion for renaming the class to be a bit more "content" then "appearance".
Strictly optional.

.ItemSummary {
    display: block; # block - line breaks, inline - all one line
}

.LabelCallNumber {
    display: inline; # inline - display, none - don't display
}

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 14:13:36 -03:00
genevieve
5adb2268f0 Bug 11881: Small improvements for Items available for reference
As said on comment #31, Items available for reference weren't displayed like Items avaible for loan. Now, they are, I wrapped them in CommasWithLinebreaks class and LabelCallNumber class

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 14:13:22 -03:00
simith
feb89b4532 Bug 11881: Small improvements for the availability informations in the search results list on the OPAC
This patch contains small modifications to the template of OPAC search results.
Theses modifications affect the "Availability" line :
* Add a linebreak after each location.
* Add the text "Call Number:" before call numbers.

To test:

I) Apply the patch

II) Include the following test in the OPACUserCSS preference:

.searchresults .CommasWithLinebreaks {
    display: block; # block - line breaks, inline - all one line
}

.searchresults .LabelCallNumber {
    display: inline; # inline - display, none - don't display
}

III) Do a search on the OPAC

IV) Validate : check the format of availability informations for each search result (Breakline or "Call Number:" text).

Sponsored-by: CCSR ( http://www.ccsr.qc.ca )

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 14:13:07 -03:00
357bb7e1e3 Bug 15082: t/db_dependent/Search.t shouldn't mock the DB connection
This patch makes the t/db_dependent/Search.t tests use a real DB instead of
mocking the DB handler (which is not actually used and generates unnecesary
warnings when running the tests).

It does so by grabbing the DB configuration data using C4::Context->config()
and passing it (writing %ENV) to rewrite-config.PL, all is done in zebra_config.pl
which is only used on the Search.t file.

To test:
- Run
  $ prove t/db_dependent/Search.t
=> FAIL: Warnings are raised about DB being mocked and DBIC not recognising 'Mock'
         as a valid DB driver.
- Apply the patch
- Run
  $ prove r/db_dependent/Search.t
=> SUCCESS: Same tests results, no warning about DBIC driver.
- Sign off :-D

Disclamer: As of writing this patch, the Search.t tests pass. The patch is not dealing
with tests results, but how they use the DB.

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test pass before & after, a 'little' less noisy
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 14:10:23 -03:00
a636f2223c Bug 14931: (qa followu-up) small improvements
- Avoid 1 call to dt_from_string in some cases
- Do not use $_

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 12:00:42 -03:00
Marc Véron
f461de794b Bug 14931: (Follow-up) Validate date entry in contracts
Go to Home > Acquisitions, search for an active vendor and view the vendor
- Click on 'Contracts' at the left
  (admin/aqcontract.pl)
- Create and edit contracts and verify that it works OK.
  (Note: there is no help for this page, see Bug 14929)

Amended for comment #7  25.10.2015 / mv

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 12:00:36 -03:00
Marc Véron
e4cc11ee13 Bug 14931: Remove C4::Dates from files admin/aq*.pl
This patch removes C4::Dates from:

- admin/aqbudgets.pl
- admin/aqplan.pl
- admin/aqcontract.pl

To test:

- Apply patch

- Go to Home > Adminstration > Budgets > All funds
  (admin/aqbudgets.pl)
- Verify that everything displays as before

- Edit one of the funds and click on 'Planning - Plan by months'
  (admin/aqplan.pl)
- Verify that planning works as before

- Go to Home > Acquisitions, search for an active vendor and view the vendor
- Click on 'Contracts' at the left
  (admin/aqcontract.pl)
- Create and edit contracts and verify that it works OK.
  (Note: there is no help for this page, see Bug 14929)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Tested with dateformat syspref
Dates in planning by months not needed to be on iso format, aqplan.pl
uses instead Date::Calc

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 12:00:28 -03:00
Marc Véron
a97d3e9513 Bug 14977: Followup to fix issue with NewsChannels.t
The problem was that get_opac_new returns dates already syspref-formatted.

To test:
- Apply patch
- Verify that t/db_dependent/NewsChannels.t does not fail.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 11:58:52 -03:00
Marc Véron
4307591f22 Bug 14977: Remove C4::Dates from files t/db_dependent/*.t
This patch removes C4::Dates from following files:

-  t/db_dependent/Budgets.t
-  t/db_dependent/Holds.t
-  t/db_dependent/Koha_template_plugin_KohaDates.t
-  t/db_dependent/Log.t
-  t/db_dependent/NewsChannels.t

To test:
- First run all tests above
- Apply patch
- Then run tests again. The results should be the same.
  (Note: I get 2 fails with NewsChannels.t, they are the same with
   and without patch).

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

NewsChanell pass for me before patch, no after.
Followup follows :)
Rest of tests pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 11:58:44 -03:00
Marc Véron
b70e1cd053 Bug 14903: (followup)Remove C4::Dates from circ/circulation.pl
Follow up to fix QA issues from comment #15
...and amended for comment #18

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 11:57:49 -03:00
Marc Véron
421fae24f1 Bug 14903: Remove C4::Dates from circ/circulation.pl (and more)
Patch to remove deprectated C4::Dates from:
- circ/circulation.pl
- C4/Circulation.pm
- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt

To test:
- Apply patch
- Go to the checkout site (Home > Circulation > Checkouts)
- Verify that data displays properly (including for users with a card
  that expires in the  near future, see syspref 'NotifyBorrowerDeparture')
- Search for regressions
- prove -v t/db_dependent/Circulation.t

(Amended following comment #9 / #11  25.10.2015 /mv)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 11:57:15 -03:00
201935cb62 Bug 14100: (QA followup) add missing mocked sysprefs
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 10:52:08 -03:00
d9426ddfc5 Bug 14100: Fix Search.t tests
So, this one is VERY weird, let me try to explain what I have
understood.

Bisecting using run prove t/db_dependent/Search.t, I have found that the
following commit make the test fail:
  commit 0f63f89f66
    Bug 14100: Generic solution for language overlay - Item types
The error is
  DBI bind_columns: invalid number of arguments: got handle + 0, expected handle + between 1 and -1
  Usage: $h->bind_columns(\$var1 [, \$var2, ...]) at /usr/lib/i386-linux-gnu/perl5/5.20/DBI.pm line 2065.

Note that the interface (admin/itemtypes.pl) which calls the same
subroutine with the same parameter (style => 'array') works great.

The problem comes from the change in C4::Search::searchResults, if I
only apply the change done to this subroutine on 0f63f89f^1, I reproduce
the issue.

Looking closely at how %itemtypes is built, we could actually call
GetItemTypes with the style => 'hash' to get exactly what we want.
The following piece prove it for you:
    use Test::More;
    use C4::Koha;
    my $i = GetItemTypes;
    my $j = GetItemTypes(style => 'array');
    my %itemtypes;
    for my $itemtype ( @$j ) {
        $itemtypes{ $itemtype->{itemtype} } = $itemtype;
    }
    is_deeply( \%itemtypes, $i);

So changing the code accordingly and just forget this last hour...

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 08:47:33 -03:00
4c103508b2 Bug 14100: Fix t/db_dependent/Items.t
prove t/db_dependent/Items.t
Undefined subroutine &C4::Languages::getlanguage called at C4/Items.pm line 1304.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 08:47:33 -03:00
93d6de4bf0 Bug 14100: Fix test xt/author/valid_templates complaining on opac-topissues.tt
undef error - Undefined subroutine &C4::Languages::getlanguage called at C4/Koha.pm line 250.

Test plan:
    prove xt/author/valid-templates.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-29 08:47:33 -03:00
03891d2edc Bug 14722: CSV is only available for biblio records
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-10-27 17:01:34 -03:00
d3c9dac7ac Bug 14722: Add POD for some options
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-10-27 17:01:34 -03:00
b99901136c Bug 14722: rename the script
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-10-27 17:01:34 -03:00
38f92df4e5 Bug 14722: Refactor the export tool
Why a refactoring was need for this script?
The export tool (tools/export.pl) can be called from the command line
and some parts of code were unnecessarity complicated (just look at the
code, you will understand).

Worse still, the script does not provide the same options for both
interface. For instance you cannot export records given a range of
biblionumbers, authids, callnumbers, etc. from the commandline.

What does this patch?
1/ Important: The script tools/export.pl does not work anymore if called from
the command line (should be in the release notes).
2/ The code used to generated a file (csv, iso2709 or xml) has been moved to a new
module (Koha::Exporter::Record) and tests have been provided.
3/ No change is done on the web interface
4/ Some new options have been added to the commandline script
(misc/export.pl):
    - starting_authid
    - ending_authid
    - authtype
    - starting_biblionumber
    - ending_biblionumber
    - itemtype
    - starting_callnumber
    - ending_callnumber
    - start_accession
    - end_accession
5/ There is a change in the behavior if an error occurs:
Can't call method "as_usmarc" on an undefined value at Koha/Exporter/Record.pm line 114.
record (number 5530) is invalid and therefore not exported because its reopening generates warnings above at Koha/Exporter/Record.pm line 117.

Before this patch, they were not displayed (using the command line).

What does not do this patch?
It does not provide the 'clean', 'timestamp' and 'deleted_barcodes' options to
the web interface (same as before).

What about the perfs?
With a DB with ~800 biblios (MARC21)
Before: perl tools/export.pl 14.79s user 0.83s system 71% cpu 21.905 total
After:  perl misc/export.pl  17.19s user 0.84s system 75% cpu 24.018 total

With a DB with ~6400 biblios (UNIMARC)
Before: perl tools/export.pl 26.55s user 0.76s system 76% cpu 35.498 total
After:  perl misc/export.pl  26.78s user 0.84s system 80% cpu 34.494 total

How to test this patch?
Test plan:
A. Web interface:
1/ On the current master, export some records, biblios and authorities (with
the 3 differents exports) playing with the different filters (item type,
libraries, callnumber, accession date, don't export items, remove
non-local items, don't export fields, etc.).
2/ Apply this patch, export again the same records, and compare the
generated files. They must be identical!
3/ Confirm that the export features on the checkout list
(circ/circulation.pl) works as before this patch.

B. The command line
1/ On the current master, export some records, biblios and authorities (with
the 2 differents exports) playing with the different options (date,
deleted_barcodes, clean).
2/ Apply this patch, export again the same records, and compare the
generated files. They must be identical!

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 17:01:28 -03:00
babdd2f7f4 Bug 14722: Add Koha::Biblioitem[s]
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:59:52 -03:00
Eivin Giske Skaaren
356299b943 Bug 14190: Scale search boxes in staff head
In this simple patch the width gets controlled by CSS and it becomes
easy to set it in just one place.

The exact width may need to be discussed but I thought 30em made it look ok on my screen.
With this patch we get the wider search boxes with a very small change and another bug may
be created if needed to do a bigger refactor and remove stuff not needed in the html and
perhaps do this in a modern/responsive way. (Preferrably a UX/GUI developer will do this)

To test:

Apply the patch and reload the staff client. Now the search box is a bit wider and the border
etc has changed with it.

Some places with more than one search box like "Serials" will not be affected.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:43:23 -03:00
Katrin Fischer
4b5e92c51c Bug 12428: QA Follow-up: Wrap borrower's title in a span to make it possible to hide
I think showing the title with the user name is quite unusual for
Koha. Wrapping the title in a span with a unique class makes it
possible to hide it.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:26:42 -03:00
Mark Tompsett
9da25ce34c Bug 14248: Regression tests
TEST PLAN
---------
1) apply patch
2) prove -v t/db_dependent/NewsChannels.t
3) run koha qa test tools.

Signed-off-by: Martin Persson <xarragon@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:26:33 -03:00
Martin Persson
1f15b585d4 Bug 14248: Optionally display authorship for news
Test plan:

* Apply dependant patches 14246 and 14247.
* Apply current patch.
* Log into the Staff client, go to
 'Administration' -> 'Global Preferences' -> 'Tools',
  a new section titled 'News' should appear with a single option named 'NewsAuthorDisplay'.
  Available values should be 'Not at all', 'OPAC only', 'Staff client only' and
  Both OPAC and staff client'. By default the value should be 'Not at all'
  (to mimic existing behaviour, important!).

* Change the value to something different and save the changes.
* Go to 'Tools' -> 'News' and add some news items (at least 2).
* Use the MySQL command line tool to edit the opac_news table,
  removing the user id from one of the news items:
  $ mysql -u kohaadmin -p -D koha
  > SELECT `idnew`, `title`, `borrowernumber` FROM `opac_news`;
  * Make a mental note of one of the 'newid' numbers to change.
  > UPDATE `opac_news` SET `borrowernumber` = NULL WHERE `idnew` = <your-id-here>;
  * Now one of the news items will have no user id, and no author should be shown for it.
* Go to OPAC and Staff client and make sure the display modes works as intended.
  * Repeat for all values, making sure that the settings works as intended.
  * The changed news item should have no author info shown at any time.
  * The unchanged news item should show your own user name if the
    settings match the section where it is displayed.

Sponsored-By: Halland County Library

Tested on top of Bugs 1246 and 1247, works as advertised.
Note: Some whitespaces changed / removed in koha-news.tt to pass qa tools.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:26:22 -03:00
269deb2e33 Bug 14247: DBRev 3.21.00.046
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:20:33 -03:00
Martin Persson
c7082e4fee Bug 14247: Rename sysprefs atomic update file
This trivial patch changes the name of the SQL update
file to match the guidelines on the wiki.

Sponsored-by: Halland County Library
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:20:33 -03:00
Martin Persson
ed0ac0cf2d Bug 14247: Add system preference for news display
Test plan:

* Apply dependant patch 14246 (if not done already).
* Apply current patch.
* Log into the Staff client, go to 'Administration' -> 'Global Preferences' -> 'Tools', a new section titled 'News' should appear with a single option named 'NewsAuthorDisplay'. Available values should be 'Not at all', 'OPAC only', 'Staff client only' and 'Both OPAC and staff client'. By default the value should be 'Not at all' (to mimic existing behaviour, important!).
* Change the value to something different and save the changes.
* Use the mysql command line client to connect to the Koha database:
  $ mysql -u kohaadmin -p -D koha
* Enter the following query:
  SELECT * FROM systempreferences WHERE variable = 'NewsAuthorDisplay';
* Check to make sure that the 'value' column has changed to reflect the choice you made in the above step.

Separate SQL testing (clean installation of Koha):
* Koha$ mysql -u root < create_koha_test_db.sql
* Koha$ mysql -u koha_test -D koha_test < installer/data/mysql/kohastructure.sql
* Koha$ mysql -u koha_test -D koha_test < installer/data/mysql/sysprefs.sql

Testing the update script works the same way:
* Koha$ echo "DELETE FROM systempreferences WHERE variable = 'NewsAuthorDisplay';" | mysql -u koha_test -D koha_test
* Koha$ mysql -u koha_test -D koha_test < installer/data/mysql/atomicupdate/add_news_prefs.sql

Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:20:33 -03:00
c5094de789 Bug 14246: DBRev 3.21.00.045
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 16:20:27 -03:00
Mark Tompsett
4d719fb20f Bug 14246: Adding Koha::Schema::Result differences
Ran misc/devel/update_dbix_class_files.pl as shown on
wiki/Database_updates#updatedatabase.pl
However, only git added Borrower and Opacnews, since
those were the two affected by this patch.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 15:57:10 -03:00
Indranil Das Gupta
b0f9b34a54 Bug 14246: (fix) correct ALTER TABLE mysql syntax
Address bug 14246 comment 13 remark - correcting MySQL ALTER TABLE
syntax.

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 15:56:39 -03:00
Martin Persson
4d7e251c88 Bug 14246: Update NewsChannel tests
This commit adds the new 'borrowernumber' field to the existing
test framework to make it pass. It does not include new tests.

Sponsored-by: Halland County Library

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 15:56:24 -03:00
Martin Persson
b3721f71ea Bug 14246: Add borrowernumber, altered SQL
As suggested by kind reviewers, an AFTER statement was added to the atomic
upgrade script to ensure that the final field order is consistent is both
fresh and upgraded databases.

Also:
* UPDATE action changed to CASCADE to improve robustness.

Test plan:
* Apply first patch in this set.
* Apply this patch.
* Perform a database upgrade.
* Use mysql client to inspect field order.
  It should be identical to the kohastructure.sql order.

Sponsored-by: Halland County Library

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 15:56:24 -03:00
Martin Persson
34818c05d5 Bug 14246: Add borrowernumber to koha_news
This patch adds a new column to koha_news that links a
borrowernumber to each item. This allows Koha to display the
author for each entry which makes it suitable as a simple CMS.

Changes (from rejected patch):
* Added missing kohastructure.sql changes.
* Turned the atomic update file into a SQL file and changed name
  in accordance with wiki guidelines.
* Changed SQL syntax and naming to be consistent with existing code.
* Attached test plan to commit message.

Test plan:

* You need at least one news item, log in and add one from
  'Administration' -> 'Tools' -> 'News'.
* Apply the patch.
* Apply database upgrade (directly or indirectly).
* Go back to Staff interface and post a new news item.
* Use the mysql command line client to connect to the Koha installation's database:
  mysql -u kohaadmin -p -D koha (change username and database to values
  appropiate for your system).
* Execute the following query: SELECT title, borrowernumber FROM opac_news;
* Inspect the results, the 'borrowernumber' column should be NULL for all news items
  created before the patch was applied, and non-NULL for the new item created AFTER
  the patch was applied.

Optional: Remove database changes via:
  ALTER TABLE opac_news DROP FOREIGN KEY borrowernumber_fk;
  ALTER TABLE opac_news DROP COLUMN borrowernumber;

Sponsored-By: Halland County Library

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

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 15:56:24 -03:00
7bde40a2d5 Bug 10933: (followup of the followup) fix the previous patch to work with master
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 13:06:01 -03:00
dca6b23302 Bug 14100: (RM followup) DBIx update
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:52:22 -03:00
7d0ec7be45 Bug 14100: (QA followup) fix wrong comment in kohastructure.sql
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:50:32 -03:00
7dd5352b3c Bug 14100: DBRev 3.21.00.044
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:45:36 -03:00
22068e3950 Bug 14100: Fix 3 occurrences more
- opac-suggestions.pl
- opac-readingrecord.pl
- opac-reserve.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:34:07 -03:00
d58f2cfaf6 Bug 14100: Fix some missing occurrences
This patch fixes:
- reports/bor_issues_top.pl
- sort order
- adv search and search results
- opac-topissues.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:34:07 -03:00