Commit graph

22254 commits

Author SHA1 Message Date
Katrin Fischer
0402e4e636 Bug 10860: Follow-up - fix some template variable issues
Fixing some simple display issues caused by missing/misnamed
variables, probably consequence of the renaming before.

Amended test plan:
- Make sure that if OnSiteCheckoutsForce is set, you can
  still perform onsite checkouts and only those.
- Check the detail page in staff says *currently in local use by*
  for an on-site checked out item
- Check the detail page in OPAC with OPACShowCheckoutName active
  for the same.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-03 10:26:43 -03:00
64eca4693c Bug 10860 [QA Followup] - Rename system preferences
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-03 10:26:41 -03:00
Katrin Fischer
a72cdde31d Bug 10860: Follow-up - staff reading record
- capitalization fix "Checked out"
- display new tabs only when feature is activated
- fixes a qa script complaint about POD in Items.pm

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-03 10:26:37 -03:00
33d285599f Bug 10860 [QA Followup] - Fix misc issues
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-03 10:26:25 -03:00
ca13806073 Bug 10860 - Change "in-house use" to "on-site checkout"
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-03 10:26:22 -03:00
Jonathan Druart
2e72eb8880 Bug 10860: In-House Use
This patch implements the In-House Use feature for Koha.

It adds:
- 2 new sysprefs:
  'In-House Use' to enable/disable this feature
  'In-House Use Forced' to enable/disable the feature for *all* users.
- 2 new columns issues.inhouse_use and old_issues.inhouse_use
- Datatable on the circulation history pages (readingrec) at the OPAC
  and the intranet.

A new checkbox in the Circulation tab. If checked, the issue become a
in-house use (in the statistics and issues tables).
When you check it, the due date changes to the today date.

The syspref "In-House Use Force" allows to force the in-house use to
permit the checkout even if the borrower is debarred or others problems.

In the issue table, a new string (in red) marks the issue as "in-house use".

The circulation history contains 3 tabs : "all", "checkout" and
"in-house use" (OPAC and intranet).

The cronjob script:
If AutomaticItemReturn if off, a library would like not to do a transit
operation manually. This script (to launch each night) do returns
for a specific branches.

Test plan:
1/ Execute the updatedatabase entry
2/ Enable the 'In-House Use' pref.
3/ Checkout a biblio for a patron and check the 'in-house use' checkbox.
4/ Check that the due date is the today date (with 23:59) and is not modifiable.
5/ Click on the check out button and check that the new check out
appears in the table bellow with the "(In-house use)" string.
6/ Go on the circulation history pages (readingrec and opac-readingrec)
and try the 3 tabs. In the last one, your last checkout should appear.
7/ Check in.
8/ Check readingrec pages.
9/ Choose a debarred patron and check that you cannot checkout a biblio
for him.
10/ Switch on the 'In-House Use Forced' pref
11/ You are now allowed to checkout a biblio for the debarred patron.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-03 10:26:19 -03:00
Jonathan Druart
c5a6a4f18a Bug 13011: 0000-00-00 should not be considered as a valid date
When parsing the letter content, the 0000-00-00 should not be replaced,
it's not a valid date.

Test plan:
  prove t/db_dependent/Suggestions.t
should not return the following error:
0000-00-00 seems to be a date but an error occurs on generating it (The
'month' parameter ("0") to DateTime::new did not pass the 'an integer
between 1 and 12' callback

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds another check for 0000-00-00.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-01 09:19:07 -03:00
a4a2159aad Bug 13169: C4::Templates::themelanguage fails if the DB is not populated
With the aim to remove hardcoded themes the C4::Templates::themelanguage
got dependent on the DB being populated. This patch reintroduced the
hardcoded defaults as a last resort.

To test:
- Do a fresh install, clean your browser's cache, empty DB
- Open the staff interface
=> FAIL: A "Software error" screen shows "Template process failed: file error..."
- Apply the patch
- Reload
=> SUCCESS: The webinstaller prompts for login correctly.
- Sign off :-D

Regards

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>
2014-11-01 09:11:07 -03:00
d4a7fa8580 Bug 13163: NORMARC DOM config missing <id> entry
This patch fixes the biblio-koha-indexdefs.xml for NORMARC, so
it includes the <id> element.

Because of how our DOM files work, the resulting biblio-zebra-indexdefs.xsl
for NORMARC picked the whole MARC record as ID, so every time the record
was edited, the id wouldn't match and a new record was created.

To test:
- Have a MARCXML record
- run:
  $ xsltproc etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl the_record | less
=> FAIL: verify the z:id property on the <z:record> line contains all subfields concatenated
- Apply the patch
- re-run the xsltproc line
=> SUCCESS: z:id contains the 999$c number
- Sign off :-D

Regards

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

Known bug with DOM: Without <z:id> indexing biblionumber Zebra hasn't it record
unique ID, and so fails to identify existing records. Works as described. 999$c
is linked to biblionumber in default Normarc framework.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>

I have applied the patch to my production server, and at least one customer has
confirmed that it fixes the problem with multiple copies of records in search
results.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, fix matches what we have for the other MARC flavours.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 16:45:04 -03:00
Jonathan Druart
a0d1d9d198 Bug 11714: A fund is a top-level fund if it does not have any parent
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 16:41:53 -03:00
32bd54a7ca Bug 11714 - GetBudgetHierarchy needs optimization
The method C4::Budgets::GetBudgetHierarchy() retreives from database budgets in an array containing a tree of budgets (parent -> children -> children, ...).
The code generating this tree with the SQL results needs optimization because when a lot of budgets exists, it can run during several minutes.

This patch rewites the code using a recurive method.

Test plan :
- Create a active budget "MyBudget" with 1000
- Click "Add found" on this budget
- Create a found "Parent" with 1000, set you has owner
- Click "Add child found" on found "Parent"
- Create a found "Child" with 100, set you has owner
- Click "Add child found" on found "Child"
- Create a found "Grand-child" with 10, set you has owner
|
- Create a new acquisition basket
- Add a new order with "Child budget"
- Select "Child" found and set all costs to 2
- Save order
- Add a new order with "Grand-Child budget"
- Select "Child" found and set all costs to 2
- Save order
- Close basket
- Perform the receive of the two orders
|
- Go to founds of "MyBudget"
=> You see a table with 3 founds
- in "Fund filters", select no library and uncheck "Show my funds only" and click on "Go"
=> You see a table with "Parent" found
- Click on small arrow left of the fund code of "Parent"
=> You see a new line with "Child" found
- Click on small arrow left of the fund code of "Child"
=> You see a new line with "Grand-Child" found
|
=> You see in "Grand-Child" row "Base-level spent" = 2 and "Total sublevels spent" = 2
=> You see in "Child" row "Base-level spent" = 2 and "Total sublevels spent" = 4
This confirms the founds are used in a hierarchie.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 16:41:46 -03:00
3c1536ffeb Bug 12958 [Alt. label follow-up] Set a fund owner to a fund hierarchy
This alternate follow-up modifies the text of the label to
(hopefully) make it more clear. The markup has been revised someone to
make it more standard, and a warning has been added about overwriting
existing data.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

Looks good.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 16:19:14 -03:00
Jonathan Druart
5e2cc5c958 Bug 12958: Set a fund owner to a fund hierarchy
This patch adds the ability to set an owner to a fund hierarchy
On editing a fund, if it has children, a new checkbox appears "Set this
owner to all children funds".
If checked, all the fund hierarchy will herit to this owner.
This will facilitate the fund owner modifications.

Test plan:
- Verify that the new checkbox only appears if the fund has at least a child.
- Create a consistent fund hierarchy, something like:
    fund1
      fund11
        fund111
      fund12
    fund2
      fund21
- Try to modify a fund owner without checking the checkbox. Verify the
  children have not been modified.
- Try to modify a fund owner with checking the checkbox. Verify all fund
  hierarchy has been modified.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

It works as announced.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 16:18:49 -03:00
Jonathan Druart
2a838cabce Bug 12956: Users are not linked to a fund
When creating a fund, if you add some users, they are not linked to the
fund.
Note that it works if you link them when editing the fund.

Test plan:
- Try to link users to a fund on creating it.
- On editing, you should see the linked user list.

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>
2014-10-31 16:06:10 -03:00
Jonathan Druart
e988b5ada3 Bug 12955: The "show my funds only" should be take into account
The "Show my funds only" is not take into account if the checkbox is not
checked.
So there is no way to show all funds.
This has been introduced by bug 11578.

The default is not "only mine". The default is "show all funds".

Test plan:
- Create fund where you are the owner and others where you are not.
- Go on the fund list view and verify the checkbox "show my funds only"
  is take into account.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.

Note: In order to test this make sure you have funds owned by
another staff user.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 16:05:23 -03:00
4dc30d48ad Bug 13065 - Receive shipment error message incorrectly styled
If there is an error during the receive shipment process the error
message is incorrectly styled. This patch fixes it.

To test you can trigger the error by accessing the page with incorrect
or missing parameters:

/cgi-bin/koha/acqui/parcels.pl?op=confirm

This should trigger the message. Apply the patch and confirm that the
error is now styled consistently with others in the staff client.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small template change, works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 15:45:46 -03:00
1d17e36e36 Bug 643 [Template follow-up] Allow override of 'debarred' status
This minor followup makes two changes:

- Replaced instances of "Debarment" with "Restriction"
- Moved the override button into the block where the "View restrictions"
  button is, making the section slightly more compact.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Some small template changes, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 15:15:55 -03:00
Mark Tompsett
85489f7bdf Bug 643: QA Followup - server-side verification of permissions
Only allow $force_allow=1 if the logged in user has permissions.

TEST PLAN
---------
Attempt to intentionally override the checkout by passing an
appropriately handcrafted URL.
-- Regardless of the force_allow value, it should be not allowed
   for those lacking the force_checkout permission.

NOTE: I didn't test this. I figured Marc Veron could do that. :)
      (Sorry, couldn't easily get git bz to work with the accent)

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>
2014-10-31 15:15:49 -03:00
Marc Véron
bc9d12e68f Bug 643: Followup: Display override button only if issuing staff member has force_checkout permission
To test:
Apply first patch
Apply this patch
Log in as superlibrarian
Go to Home > Patrons > Set permissions for issuing staff member
Disable circulate - force_checkout
Log in as issuing staff member
Try to checkout to a debarred patron
=> should not be possible
Log in again as superlibrarian
Enable circulate - force_checkout for issuing staff member
Log in as issuing staff_member
Try to checkout to a debarred person
=> You should get the button 'Override debarment temporarily'

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
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>
2014-10-31 15:15:39 -03:00
Pasi Kallinen
b1dc52395b Bug 643: Allow override of 'debarred' status
Add a button to temporarily override patron debarment.

To test:
1) Go to patron check out page
2) If patron has been debarred (eg. due to having fees),
   there is no way to check out to that patron.
3) Apply patch
4) A debarred patron check out page now has a button for
   "Override debarment temporarily" - clicking on it
   should allow checking out to that patron.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Rebased because patch did not apply

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with/without force_checkout and superlibrarian permission.
Also checked crafting a URL is no longer working.
No regressions found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 15:15:31 -03:00
simith
b61ebfd0fa Bug 11876 [Unit test] Add a diff view to staged MARC Records
Unit test added

http://bugs.koha-community.org/show_bug.cgi?id=11876
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 14:25:18 -03:00
Jonathan Druart
46d3e94e66 Bug 11876: (qa-followup) some minor changes
- GetImportBiblios: prepare the query is useless here
- use Modern::Perl
- Remove useless indentation level in pl file and redirect to 404 if
  required params are not given.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 14:25:13 -03:00
2d9eb6202f Bug 11876 [Follow-up] Add a diff view to staged MARC Records
This follow up makes some corrections to the previously added files and
adds some functionality to the diff: A Javascript diff plugin highlights
the differences between the records in the two columns.

Corrections made: Converted tab indentation to spaces, corrected GPL
statement.

File organization: Moved showdiffmarc.pl and .tt to /tools/ to match the
location of the page with which it functions,
tools/manage-marc-import.pl. Corrected permissions on showdiffmarc.pl
accordingly.

Updates to the template: Added standard includes inclucing header menu
and breadcrumbs; converted custom layout to YUI Grid standard.

To test, follow the test plan previously defined:

- Stage a MARC record batch which contains at least one record match for
  something already in your catalog.
- Locate the staged MARC record batch in Tools -> Manage staged records
  and click to view the contents.
- Find the record which matched an existing record and click the "View"
  link in the Diff column.
- The compare screen should include the header menu and breadcrumbs. The
  differences between your staged file and the existing record should be
  higlighted.
- You should be able to return to the MARC batch you were previously
  viewing by following the link in the breadcrumbs or the link at the
  bottom of the page.
- Confirm that the "About" page includes information about the new
  JavaScript plugin on the Licenses tab.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 14:25:11 -03:00
mbeaulieu
838412c068 Bug 11876 - Ommited files in last patch
I forgot to include these files in the last patch

	new file:   tools/showdiffmarc.pl
	new file:   koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 14:25:08 -03:00
mbeaulieu
38742e0722 Bug 11876 - Add a diff view for staged MARC records.
New patch should apply correctly.

	modified:   C4/ImportBatch.pm
	modified:   koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Bug 11876 - Diff column is now displayed.

If a match is found, a 'View' link appears in the Diff column.

Old patch was not implementing datatables, and therefore was not compatible with this version of Koha.
	modified:   koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
	modified:   tools/batch_records_ajax.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

These patches have some issues but I'm going to submit a follow-up which
I think will address them all and offer some improvements as well.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 14:24:58 -03:00
Katrin Fischer
f8d06e1daf Bug 11517: Braille and combination swapped in XSLT result lists
http://www.loc.gov/marc/bibliographic/bd007f.html

- Catalog a record:
  * 007 - choose 'Tactile material'
  * Pos. 1 - choose b = Braille or C = combination
  * Reindex!
  * Verify the result list shows the format correctly.

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

Problem exist, fixed with this patch.
No koha-qa errors

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 14:18:10 -03:00
Admin User Koha
de8d5f3ae9 Bug 12995 - script update_totalissues.pl stops on corrupted record - UT
This patch adds an unit test on C4::Biblio::UpdateTotalIssues method
call on non existing record

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I can't comment on the correctness of the test other than to say it ran
successfully.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Improves CLI script, works as described.

Note: A small improvement would be to output the problematic biblionumber.
2014-10-31 14:14:24 -03:00
Admin User Koha
ccf4061324 Bug 12995 - script update_totalissues.pl stops on corrupted record
When running update_totalissues.pl cronjob, it will stop on a corrupted
record.

This patch changes UpdateTotalIssues so that it return 1 if processing
record has succeded. Also, if mapping with biblioitems.totalissues does
not exist, the method has nothing to do so it stops and returns 1.

When processing a corrupted record, script now alerts about the error on
this biblionumber (if script is verbose) and process next record.
A total number of records with error will be printed at the end of the
script.

Test plan :
- Create a dabase with a few biblios and some issues
- Modify first biblio record (use direct sql update) : set empty value
  in biblioitems.marcxml
- Launch script : misc/cronjobs/update_totalissues.pl --use-stats --commit=1000 -v

=> Without patch : the script stops at first record
=> With patch : the script prints error for first record and processes
   all records

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I was able to confirm the problem before the patch and successfully
follow the test plan.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2014-10-31 14:14:24 -03:00
65e0fba94b Bug 13164: Incorrect ISSN visualization on the normal view if invalid/cancelled ISSN present
Currently, 022$z (and 011$z for UNIMARC) occurences are not shown, but the XSLT
logic used introduces punctuation characters for those $z occurences.

This patch adds a check for the existence of subfield a, and only loops
on $a subfields.

To test:
- Create/have a record with 022$z (or 011$z on UNIMARC) but no 022$a (no 011$a on UNIMARC).
- Open the detail page for the record (on both OPAC and staff).
=> FAIL: the ISSN label and ';' and '.' characters incorrectly shown.
- Repeat mixing with 022$a occurences to notice the bug.
- Apply the patch, reload
=> SUCCES: ISSN label shows only on the presence of a $a, and $z are skipped.
           no matter how many ISSN fields you add.
- Sign off :-D

Regards
To+

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

Works as described on an UNIMARC DB. Mimics what's done for ISBN field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 14:13:31 -03:00
7b7a45269a Bug 13141: (QA Followup) Update number of unit tests
While updating the number of unit tests from 12 to 13,
the number of tests to skip due to a outdated version
of DBD::Mock was missed.

This patch retains the test number change, and corrects
the number of tests.

TEST PLAN
---------
1) prove -v t/db_dependent/ReportsGuided.t
   -- on an UBUNTU git (lacks DBD::Mock >= 1.45)
2) prove -v t/db_dependent/ReportsGuided.t
   -- on a DEBIAN git (has DBD::Mock >= 1.45)
3) compare results.
   -- skipped tests should be 8 (2 individual tests + 6 in the loop)
      under Ubuntu.
   -- non-skipped tests should align.
   -- everything should be 13 tests.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 13:15:06 -03:00
Mark Tompsett
82c65678bf Bug 13141: Add ability for biblio_framework to be a dropdown in Guided Reports
By tweaking the GetReservedAuthorisedValues function in
C4::Reports::Guided, biblio_framework can be added as a dropdown
list into the guided reports parameters.

The change in C4/Reports/Guided.pm required a test, which is
found in t/db_dependent/ReportsGuided.t

Code was then added to reports/guided_reports.pl to build the
appropriate hash to trigger the proper dropdown list.

TEST PLAN
---------
1) Apply patch
2) prove -v t/db_dependent/ReportsGuided.t
   -- all should pass, this confirms that both
      C4/Reports/Guided.pm and this test file work.
3) Log into staff client
4) Reports
5) Create from SQL
6) Enter appropriate information like:
Report name: Test 13141
-- no need to change Report group or Report is public or Notes or Type
SQL:
SELECT CONCAT('<a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=',
     biblio.biblionumber,'\">',biblio.biblionumber,'</a>') AS
     BiblioNumbers, title, author, frameworkcode
FROM biblio
WHERE frameworkcode=<<Enter the frameworkcode|biblio_framework>>

7) Save report
8) Run report
   -- The parameter entry page should have a drop down of
      framework codes.
9) Select a framework code, and click Run the report
   -- The displayed SQL should have a "frameworkcode=" portion
      matching the selected framework.
10) Run the koha qa test tool.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan followed successfully.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 13:14:59 -03:00
Chris Cormack
0f41f12621 Bug 13174 : XSLT fails if, and only if you have an author, linked to an authority
And only in MARC21

To test:

Only for MARC21 with XSLT on for detail

1/ Find a record that has an authority linked author in it
2/ View the detail page in the opac
3/ Notice bibliographic data is missing
4/ Apply patch
5/ Refresh notice bibliographic data is back

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Works as describe, the details are back!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 12:15:16 -03:00
Robin Sheat
a8532787f8 Bug 13173 - remove some operations that are no longer needed
Build was failing because some files that it expected had vanished.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 12:11:03 -03:00
Chris Cormack
86c251c6db Bug 13172 t/Koha_Email.t was database dependent
To test
1/ Stop your database server
2/ run t/Koha_Email.t
3/ Notice the errors
4/ Apply patch
5/ run t/Koha_Email.t again
6/ No errors

(Don't forget to restart your db server after)

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

Verified that it fixes a package build.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tests pass now without database connection.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-31 12:10:32 -03:00
Rafal Kopaczka
5e5f0ee283 Bug 13105: Columns misplaced in member search result
When staff member, without manage_patron_lists permissions, search for
patrons on result page, he gets table with additional column in head
table.
Test plan:
Log in as staff member without manage_patron_lists permissions, search
for any patron.
Check that table with results is fine now.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes problem by adding a permission check to the template.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 01:27:08 -03:00
394d16001d Bug 3186 [QA Followup] - Don't return undef, just return
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 01:23:12 -03:00
Olli-Antti Kivilahti
0303889746 Bug 3186 - invalid or uninstalled SMSSendDriver (or bad number format) causes process_message_queue to fail
This patch wraps the SMS::Send Driver initialization and sending process into an eval block
  and gracefully causes the sending to fail, instead of crashing the process and preventing
  emails and good sms' from being sent.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 01:23:04 -03:00
6d4c5a9e56 Bug 7162: Update DBIx
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 01:05:11 -03:00
1a527de76c Bug 7162: DBRev 3.17.00.043
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 01:02:36 -03:00
eff8d1ab36 Bug 7162: (RM followup) fix the number of tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:47:13 -03:00
Jonathan Druart
a5b861b6de Bug 7162: (follow-up) Add unit tests for DelOrder
The unit tests did not take into account the new DB field.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Also all Acquisition related
patches.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:44:20 -03:00
Julian Maurice
cb866e3b1a Bug 7162: Remove "(Y)" and "(N)" from buttons text
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:44:18 -03:00
Julian Maurice
59bcdb0b25 Bug 7162: Factorize code for order cancellation (QA fixes)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:44:16 -03:00
Julian Maurice
1f8c4453cb Bug 7162: Add unit tests for DelOrder
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:44:14 -03:00
Julian Maurice
d3b2c85df8 Bug 7162; Factorize code for order cancellation (QA fixes)
* Remove tab characters in acqui/addorder.pl
* Remove FIXME in acqui/cancelorder.pl
* Fix typos: "canceled" -> "cancelled", "occured" -> "occurred"
* Replace "Click here" link by "OK"
* Add a column to aqorders to store cancellation reason instead of
  having it in aqorders.notes, to avoid having untranslatable strings in
    database

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:44:11 -03:00
Julian Maurice
d8b9a08a11 Bug 7162 [Follow-up] Fix referrer URL when coming from parcel.pl
Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:44:09 -03:00
Julian Maurice
c4aaca9496 Bug 7162: Factorize code for order cancellation
Some code was duplicated, all is now in cancelorder.pl
Added possibility to provide a reason for cancellation (or other things,
this is saved in aqorders.notes)

Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:44:04 -03:00
d3edcf726f Bug 13161 - Report name should be mandatory when editing saved reports
When Bug 2969 made report name required for SQL reports, it did so only
for new reports. This patch makes the same requirement true when editing
existing reports.

Other changes:

- Removed unused "type" setting from edit screen (already removed from
  creation form).
- Added form field size attribute to report name field to match creation
  form.
- Moved SQL textarea into its own fieldset and marked it as required,
  matching the report creation form.

To test, apply the patch and edit an existing saved SQL report. You
should be prevented from saving your report with either the report name
or SQL field blank. Test with JavaScript enable and disabled.

Confirm that after entering valid data your report runs correctly.
Compare the new SQL report form with the update SQL report form. They
should be structured the same.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script. Works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:39:30 -03:00
Mark Tompsett
32bb90604b Bug 12916 - Use of uninitialized values $max and $min in C4/Tags.pm
When the stratify_tags function is called without any tags, the
$min and $max variables are left undefined, which triggers a
warning message about uninitialized values in the subtraction.

TEST PLAN
---------
1) prove -v t/db_dependent/Tags.t
   -- should succeed, but there is no test for empty tags.
2) Make sure that you have no tags
3) In Opac, go to 'Tag cloud'
4) Check the opac error log file
   (e.g. ~/koha-dev/var/log/koha-opac-error_log) for entries
   regarding uninitialized values $max and $min in C4/Tags.pm
5) apply this patch
6) prove -v t/db_dependent/Tags.t
   -- should still succeed, though no tests are added.
7) Reload page 'Tag cloud'
   -- Result: No additional warnings in opac error log file.

Signed-off-by: Chris <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
New and old tests pass. Works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:31:36 -03:00
Mark Tompsett
34d02c375f Bug 12916 - Missing Test to demonstrate warnings.
Modifying C4/Tags.pm should have tests.

TEST PLAN
---------
1) Apply this test patch only.
2) prove -v t/db_dependent/Tags.t
   -- should see two warnings.
3) Apply the first patch.
4) prove -v t/db_dependent/Tags.t
   -- no warnings.

Signed-off-by: Chris <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-30 00:31:26 -03:00