koha.git
19 months agoBug 30944: Fix cancel recalls actions
Aleisha Amohia [Thu, 11 Aug 2022 05:29:04 +0000 (17:29 +1200)]
Bug 30944: Fix cancel recalls actions

This patch fixes the 'cancel selected recalls' button on the biblio
details Recalls page, and ensures a correct cancellation reason is
logged when cancelling a recall in transit.

To test:
1) Ensure UseRecalls is enabled and relevant recalls circulation rules
are set
2) Check out Item A to Patron B
3) Log into OPAC as Patron A
4) Search for Item A and place a recall
5) Go back to the staff interface and search for Item A. When viewing
the biblio record, go to the recalls tab.
6) Check the checkbox for your recall, and click the button to cancel
selected recalls.
7) Confirm your recall is successfully removed and you're redirected to
the correct recalls page for this biblio.
8) Go back to the OPAC and place a recall again. This time set the
pickup location to a different library, one that you're not logged in at
9) Back in the staff interface, check in Item A and confirm the recall
and transfer
10) Go to Circulation -> Recalls to pull. Your recall should show here.
Click the button to cancel the recall and revert the transfer
11) Confirm the recall has been cancelled
12) Go to Reports and create a new SQL report with the following SQL:
select * from branchtransfers b join items i on
b.itemnumber=i.itemnumber where i.barcode = <<barcode>>
13) Run the report and paste the barcode of Item A in the field
14) Confirm there are two rows returned - the transfer triggered when
the recall was confirmed, with a reason of 'Recall' and a cancellation
reason of 'RecallCancellation, and the transfer sending the item back
home when the recall was cancelled, with a reason of
'RecallCancellation'.

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29196: (Bug 27068 follow-up) - Remove unnecessary check
Kyle Hall [Wed, 13 Oct 2021 16:20:33 +0000 (12:20 -0400)]
Bug 29196: (Bug 27068 follow-up) - Remove unnecessary check

The introduction of _checkHoldPolicy has made this check superfluous.
Test plan stolen/updated from 27068

To test:
 1) In library groups add a root group and check it as hold group.
 2) Add two libraries to the group
 3) In circulation and fines rules, in 'Default checkout, hold and return
 policy', in Hold pickup library match change the value to 'From patron's hold group'
 4) Place a hold from a patron whose home library is from the group
 4.5) perl misc/cronjobs/holds/build_holdsqueue.pl
 5) Go to /cgi-bin/koha/circ/view_holdsqueue.pl
 6) Select the holding branch of the item with a hold
 7) observe no results
 8) Apply Patch
 9) Repeat 5-6
10) The item should come up on the holds queue results
11) Place a hold on an item where 1 record has 2 copies, 1 in the hold group, 1 not.
12) Run the HoldQueue for the library not in the group and make sure the hold isn't showing.
13) Turn on transportation cost matrix and set costs for the libraries within the group.
14) Place a hold for a patron where multiple copies are on the bib.
15) Check both branch's hold queue for the item, it should only show on the lower cost branch's list if both copies are available.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31603: Add search option for plugin page
Owen Leonard [Thu, 22 Sep 2022 14:44:50 +0000 (14:44 +0000)]
Bug 31603: Add search option for plugin page

This patch converts the table of plugins to a DataTable so that
it will have dynamic sorting, export options, and the quick search
field at the top of the table.

To test you should have more than one plugin installed.

- Apply the patch and go to Administration -> Manage plugins.
- The table should be styled as a DataTable, with the first column
  sorted by default.
- At the top of the table you should see the number of entries,
  a quick search form, and an export button.
- Confirm that the quick search form works to filter plugins by
  name, description, author, etc.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31566: 'Patrons selected' counter doubles on 'Select all'
Owen Leonard [Fri, 23 Sep 2022 15:22:34 +0000 (15:22 +0000)]
Bug 31566: 'Patrons selected' counter doubles on 'Select all'

This patch refines the JavaScript which is run when the "Select all"
or "Clear all" controls are clicked. The script now checks to see
whether the checkbox is checked before triggering the change function.

To test, apply the patch and perform a patron search in the staff
interface which will return multiple results.

- After the patron search results are displayed, test the "Select
  all" control. The visible search results should all be checked,
  and the "Patrons selected" counter at the top should be
  incremented correctly.
- Clicking the "Select all" control again should have no effect.
  The "Patrons selected" counter should not increment again.
- Test the "Clear all" control to confirm that checkboxes are
  unchecked and the counter updates correctly.
- Test with multiple pages of patron search results to confirm
  that the controls work correctly on any page of results..

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31559: Compiled CSS
Tomas Cohen Arazi [Mon, 3 Oct 2022 15:39:35 +0000 (12:39 -0300)]
Bug 31559: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31559: Staff results page doesn't always use up full available screen width
Owen Leonard [Mon, 26 Sep 2022 14:07:06 +0000 (14:07 +0000)]
Bug 31559: Staff results page doesn't always use up full available screen width

This patch adds an explicit "width: 100%" to tables which are contained
within a #searchresults <div>. The change affects staff interface
catalog search results and these other pages with the same markup:

- Advanced MARC editor search results
- Holds to pull
- Patron search results

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client)

- Test the catalog search results and other affected pages to confirm
  that the tables affected take up the full width of the page.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30309: Convert lists tabs in the staff interface to Bootstrap
Owen Leonard [Fri, 9 Sep 2022 12:52:15 +0000 (12:52 +0000)]
Bug 30309: Convert lists tabs in the staff interface to Bootstrap

This patch updates the staff interface lists page to use Bootstrap tabs
instead of jQueryUI.

To test, apply the patch and go to Lists.

- Test that the public and private tabs work correctly.
- Test that other lists functionality still works as expected.
- Confirm that adding the "public" URL parameter works to trigger the
  "Public lists" tab by default:

  /cgi-bin/koha/virtualshelves/shelves.pl?public=1

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31402: Update tools sidebar to match tools start page
Owen Leonard [Mon, 26 Sep 2022 15:26:51 +0000 (15:26 +0000)]
Bug 31402: Update tools sidebar to match tools start page

This patch updates the tools sidebar so that it better matches the tools
home page:

- Sidebar menu should say Tags instead of Tag moderation
- Barcode image generator and Quick spine label creator links
  reversed.
- Upload any file -> Uploads
- Cash management section is added to sidebar using brief text

This patch does not make changes to the way plugins are displayed in the
sidebar. In order for the sidebar to correctly display according to the
presence of tool plugins I think some kind of global variable would need
to be set.

Signed-off-by: Anke Bruns <anke.bruns@gwdg.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31625: (follow-up) Markup comments
Owen Leonard [Mon, 26 Sep 2022 15:02:25 +0000 (15:02 +0000)]
Bug 31625: (follow-up) Markup comments

This patch adds comments to the templates to highlight the markup
structure.

This patch should have no effect on the pages' appearance or
functionality.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31625: Reindent tools home and tools sidebar
Owen Leonard [Mon, 26 Sep 2022 14:53:56 +0000 (14:53 +0000)]
Bug 31625: Reindent tools home and tools sidebar

This patch performs general template cleanup to the tools-home and
tools-menu templates: Make indentation consistent, replace tabs with
spaces, fix invalid HTML.

To test, apply the patch and go to Tools. The page should look correct,
with no visible changes from before the patch.

Go to any tools page which shows the left-hand sidebar, e.g. Patron
lists, Batch item deletion, Inventory, etc. The menu should look
correct.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30304: (follow-up) Add markup comments
Owen Leonard [Thu, 8 Sep 2022 15:43:23 +0000 (15:43 +0000)]
Bug 30304: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30304: Reindent lists template in the staff interface
Owen Leonard [Thu, 8 Sep 2022 15:32:27 +0000 (15:32 +0000)]
Bug 30304: Reindent lists template in the staff interface

This patch performs general template cleanup to the lists template:
Make indentation consistent, replace tabs with spaces, and trim trailing
whitespace.

To test, apply the patch and test all aspects of the lists pages,
including:

- Viewing the list of public and private lists.
- List of lists DataTable controls: Paging, filtering, sorting.
- Add, edit and delete lists.
- View list contents.
- Remove titles from a list.
- Place hold from a list.
- Add items to a list.

Use your preferred method for checking the differences between files
while ignoring whitespace. I use diff with the  "-w" flag. The only
changes you see should be split lines.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23538: (follow-up) Workaround to fix Patron.t
Marcel de Rooy [Mon, 3 Oct 2022 08:03:50 +0000 (08:03 +0000)]
Bug 23538: (follow-up) Workaround to fix Patron.t

See comment36 and comment37. This needs more attention but
serves as a quick fix only.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31663: Item transfers are not correctly displayed on item details page
Nick Clemens [Fri, 30 Sep 2022 11:31:25 +0000 (11:31 +0000)]
Bug 31663: Item transfers are not correctly displayed on item details page

To test:
1 - Set an item in transit and confirm the transfer
2 - View details page for biblio
3 - Item shows 'Available'
4 - Apply patch
5 - Restart_all, reload page
6 - Item appears in transit

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30517: Translation breaks editing parent type circulation rule fix
Shi Yao Wang [Tue, 19 Apr 2022 15:52:42 +0000 (11:52 -0400)]
Bug 30517: Translation breaks editing parent type circulation rule fix

Test plan:
1. Install another language in the staff interface
   1. in commandline: `cd misc/translator/; ./translate install xx-XX`
   2. Check the box of the language in the 'language' system preference
and save
   3. Refresh and you should be able to choose languages
2. Create an item type with a parent
   1. Go to Administration > Item types
   2. Create a new item type or modify an existing one, assigning a parent type (I created a 'Children's books' type and assigned 'Books' as its parent)
3. Create a circulation rule for the parent type (I created All/Books, with 10 checkouts allowed)
4. Create a circulation rule for All/All (I created All/All with 30 checkouts allowed)
5. In English, click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)'
6. Modify the number of checkouts allowed (e.g. 99)
--> The All/Books rule is modified
7. Switch the interface to the other language
8. Click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row stays on 'All'
9. Modify the number of checkouts allowed (e.g. 88)
--> The All/All rule is modified
10. Apply the patch, translate again and refresh the page
11. Do step 8-9 again and notice it now behaves as it should

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 23063: Use Price formatting on amounts in item table in cataloguing
Katrin Fischer [Tue, 20 Sep 2022 20:49:22 +0000 (20:49 +0000)]
Bug 23063: Use Price formatting on amounts in item table in cataloguing

Koha can use CurrencyFormat for displaying price amounts and should do
so consistently everywhere. Without this patch price and replacement cost
will always display as xx.xx independent of CurrencyFormat setting in
the table above the edit items form. This patch fixes the table display.

To test:
* Apply patch
* Search or create a record with multiple items
* Fill in some price and replacement costs
* Try different settings of the CurrencyFormat system preference
* The display in the item table above the edit/add form should display
  according to the system preference
* Verify sorting works

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31593: Remove Test::DBIx::Class from Context.t
Marcel de Rooy [Wed, 21 Sep 2022 13:54:54 +0000 (13:54 +0000)]
Bug 31593: Remove Test::DBIx::Class from Context.t

No need to keep it.
Fixing a test description too.

Test plan:
Run t/db_dependent/Context.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 22115: (QA follow-up) prevent wrap on price columns
Nick Clemens [Mon, 3 Oct 2022 11:38:13 +0000 (11:38 +0000)]
Bug 22115: (QA follow-up) prevent wrap on price columns

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 22115: Format prices in table of checkouts according to CurrencyFormat setting
Katrin Fischer [Tue, 20 Sep 2022 21:20:57 +0000 (21:20 +0000)]
Bug 22115: Format prices in table of checkouts according to CurrencyFormat setting

In the patron account in the staff interface, all amounts in the
checkouts table should be formatted according to the CurrencyFormat
system preference setting.

To test:
* Edit some items, setting the replacement cost
* Make sure one of the item type is set to charge a rental charge
* Check out items
* Verify the checkouts table displays on both checkouts and details
  tabs correctly
* Try different settings of CurrencyFormat and verify all amounts
  display correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29389: Add holding branch to the holds queue report
Nick Clemens [Tue, 2 Nov 2021 11:57:21 +0000 (11:57 +0000)]
Bug 29389: Add holding branch to the holds queue report

This patch adds the holding branch to the hold queue report.
It is added as hidden by default, when running per branch it is not needed

To test:
 1 - Place some holds in your system
 2 - perl misc/cronjobs/holds/build_holdsqueue.pl
 3 - View the holds queue
 4 - Note there is no 'Current library' column
 5 - Apply patch
 6 - Reload
 7 - Note the column is not there
 8 - Click column setting gear
 9 - Check the column and confirm it appears
10 - Confirm the filter works

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31594: Use count of results for displaying number shown
Nick Clemens [Wed, 21 Sep 2022 14:14:32 +0000 (14:14 +0000)]
Bug 31594: Use count of results for displaying number shown

To test:
1 - Create a report with a number of results that is not a multiple of 20
    SELECT barcode FROM items
2 - Run the report
3 - Go to the final page
4 - Note report says 20 shown, but there are less
5 - Apply patch
6 - Reload and confirm correct number of shown is shown :-)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30280: Add Unit tests
Frank Hansen [Thu, 1 Sep 2022 13:57:13 +0000 (13:57 +0000)]
Bug 30280: Add Unit tests

Sponsored-by: Lund University Library, Sweden
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30280: (follow-up) Removing tab character in Heading.pm
Frank Hansen [Wed, 16 Mar 2022 08:20:40 +0000 (08:20 +0000)]
Bug 30280: (follow-up) Removing tab character in Heading.pm

Sponsored-by: Lund University Library, Sweden
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30280: Add support for subject headings from different thesaurus when using Elast...
Frank Hansen [Tue, 15 Mar 2022 15:50:18 +0000 (15:50 +0000)]
Bug 30280: Add support for subject headings from different thesaurus when using Elasticsearch

This patch allows subject headings from different thesaurus to co-exist in Koha.

Test plan:
1. Enable Elasticsearch as the search engine (SearchEngine system preference =
Elasticsearch) and reindex (koha-elasticsearch --rebuild -d -b -a kohadev).
2. Load sample authority records attached to the bug (in this case the
authorities.mrc file was saved in the koha directory - adjust file location as
appropriate):
   misc/migration_tools/bulkmarcimport.pl -v -a -file authorities.mrc -insert
-c=MARC21
3. Load the sample bibliographic record attached to the bug:
   misc/migration_tools/bulkmarcimport.pl -v -b -file biblios.mrc -insert
-c=MARC21
4. Search for ISBN 0704328623 and verify that the subject terms are not linked
to any authority records (if you hover over the link terms, all links should
look like ../cgi-bin/koha/catalogue/search.pl?q=su:"subjectterm" - none should
have any ?q=an:XXX (where XXX = authority record ids) in the link).
5. Apply the patches.
6. Reset the Elasticsearch mappings (Administration > Catalog > Search engine
configuration (Elasticsearch)).
7. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev
8. Link bibliographic records to authority records:
misc/link_bibs_to_authorities.pl -v -l
9. Repeat the search in step 4 (or refresh the record details page) and verify
that the first three Feminism headings[1] are linked to an authority record
(should have ?q=an:XXX (where XXX = different authority record IDs for the
various feminism authority records linked to a specific thesaurus)).
10. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev

[1] Links for subject terms for step 9 in order are (the authority ids may be
different depending on how ou are testing):

    Subject(s:) Feminism | feminism | Feminism | Feminism | Idéhistoria |
Litteratur

    http://127.0.0.1:8081/cgi-bin/koha/catalogue/search.pl?q=an:1709
    http://127.0.0.1:8081/cgi-bin/koha/catalogue/search.pl?q=an:1710
    http://127.0.0.1:8081/cgi-bin/koha/catalogue/search.pl?q=an:1708
    http://127.0.0.1:8081/cgi-bin/koha/catalogue/search.pl?q=su:"Feminism"
    http://127.0.0.1:8081/cgi-bin/koha/catalogue/search.pl?q=su:"Idéhistoria"
    http://127.0.0.1:8081/cgi-bin/koha/catalogue/search.pl?q=su:"Litteratur"

    MARC info:

    650 #7 - SUBJECT ADDED ENTRY--TOPICAL TERM
      a Topical term or geographic name entry element Feminism
      0 Authority record control number or standard number
https://id.kb.se/term/sao/Feminism
      2 Source of heading or term sao
    650 #7 - SUBJECT ADDED ENTRY--TOPICAL TERM
      a Topical term or geographic name entry element feminism
      2 Source of heading or term bnb
    650 #0 - SUBJECT ADDED ENTRY--TOPICAL TERM
      a Topical term or geographic name entry element Feminism
    650 #4 - SUBJECT ADDED ENTRY--TOPICAL TERM
      a Topical term or geographic name entry element Feminism
    650 #4 - SUBJECT ADDED ENTRY--TOPICAL TERM
      a Topical term or geographic name entry element Idéhistoria
    650 #4 - SUBJECT ADDED ENTRY--TOPICAL TERM
      a Topical term or geographic name entry element Litteratur

   Note: The fourth Feminism term has second indicator 4 which means "Source
not specified". So this term is only a local term and does not belong to any
specific thesaurus and thus not linked. To specify a source of a term, the
second indicator must be set as 7. The source of heading is then specified in
subfield 2.

Sponsored-by: Lund University Library, Sweden
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30280: Elasticsearch - Add 040f to Subject-heading-thesaurus-conventions (new...
Frank Hansen [Tue, 15 Mar 2022 15:47:47 +0000 (15:47 +0000)]
Bug 30280: Elasticsearch - Add 040f to Subject-heading-thesaurus-conventions (new) authority mapping index field (MARC21)

This patch adds 040 $f to a new field Subject-heading-thesaurus-conventions authority index mapping.

To test:
1) Apply patch
2) Reindex using rebuild_elasticsearch.pl -r

If you don't have access to a terminal (in a sandbox for example)
2a) Go to Administration > Search engine configuration, click "Reset mappings" and confirm
2b) Then reindex

Sponsored-by: Lund University Library, Sweden
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31475: Clean new lines and re-add some missing - for separating prefs
Katrin Fischer [Mon, 26 Sep 2022 21:23:54 +0000 (21:23 +0000)]
Bug 31475: Clean new lines and re-add some missing - for separating prefs

Without this patch suggestion and OPACViewOthersSuggestions appeared
grouped with other preferences. This patch restores them as separate
entries under the new Suggestions heading.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31475: Added 'Suggestions' section to preferences
Isobel Graham [Mon, 12 Sep 2022 16:50:08 +0000 (17:50 +0100)]
Bug 31475: Added 'Suggestions' section to preferences

Confirm all suggestion preferences are now grouped.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 28512: Add branchcode as class to spinelabel element
Lucas Gass [Thu, 25 Aug 2022 17:15:29 +0000 (17:15 +0000)]
Bug 28512: Add branchcode as class to spinelabel element

To test:
-Apply patch and generate a quick spine label.
-Inscept the page and notice that the #spinelabel element should contain a new class which corresponds with that the of the logged in branch.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31528: (QA follow-up) Exclude .stylelintrc.json in Makefile.t
Tomas Cohen Arazi [Mon, 3 Oct 2022 12:54:34 +0000 (09:54 -0300)]
Bug 31528: (QA follow-up) Exclude .stylelintrc.json in Makefile.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29071: DBRev 22.06.00.057
Tomas Cohen Arazi [Mon, 3 Oct 2022 11:49:22 +0000 (08:49 -0300)]
Bug 29071: DBRev 22.06.00.057

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30571: DBRev 22.06.00.056
Tomas Cohen Arazi [Mon, 3 Oct 2022 11:47:47 +0000 (08:47 -0300)]
Bug 30571: DBRev 22.06.00.056

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29071: (QA follow-up) Fix typo acual in syspref description
Katrin Fischer [Sat, 1 Oct 2022 21:43:33 +0000 (21:43 +0000)]
Bug 29071: (QA follow-up) Fix typo acual in syspref description

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29071: Add HoldsQueueSplitNumbering syspref for any libraries that may not have it
Nick Clemens [Wed, 21 Sep 2022 20:26:24 +0000 (20:26 +0000)]
Bug 29071: Add HoldsQueueSplitNumbering syspref for any libraries that may not have it

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 29071: Add HoldsSplitQueueNumbering to installer data
Nick Clemens [Tue, 21 Sep 2021 10:49:58 +0000 (10:49 +0000)]
Bug 29071: Add HoldsSplitQueueNumbering to installer data

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31482: Label creator does not call barcodedecode
Kyle Hall [Mon, 29 Aug 2022 13:26:44 +0000 (09:26 -0400)]
Bug 31482: Label creator does not call barcodedecode

The label creator can accept a list of either itemnumbers or item barcodes.
In the case that the list of composed of barcodes, those barcodes should be
passed though barcodedecode before the lookup is performed.

Test Plan:
1) Apply this patch
2) Download and install the Barcode Transformer plugin
   https://github.com/bywatersolutions/koha-plugin-barcode-transformer/releases/
3) Go to the plugin configuration page, set the configuration to the example configuration from the same page
4) On the "New label batch" page of the Label creator,,
   type in some valid barcodes, but prefix them with X and postfix them with Y, e.g. X123456Y
5) Submit the form
6) Note the items are added to the label batch!

JK: Remove unnecessary if $number check, barcodedecode already does this

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31463: (QA follow-up) Remove obsolete comment
Marcel de Rooy [Fri, 30 Sep 2022 09:29:58 +0000 (09:29 +0000)]
Bug 31463: (QA follow-up) Remove obsolete comment

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31463: Add order status to opac-detail.pl
Nick Clemens [Thu, 25 Aug 2022 13:12:19 +0000 (13:12 +0000)]
Bug 31463: Add order status to opac-detail.pl

This adds a check for the preference OPACAcquisitionDetails and fetches
the active orders for the item if necessary

Additionally, we simply the check for biblio orders to use object methods
and remove code that stored order information in the item_info

To test:
1 - Enable preference: OPACAcquisitionDetails
2 - Create a basket with items created on order, add an order for a biblio, close the basket
3 - Create a second basket as above, add an order with multiple copies, leave basket open
4 - View biblio on opac
5 - You should see 1 item marked on order, and "1 items on order" below items table
6 - Close second basket
7 - Reload opac view, now 3 on order and in message
8 - Reopen first basket
9 - Reload opac view, now 2 on order and in message

JK: Remove unused @itemnumbers_on_order variable
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31441: Fix Koha::Item::as_marc_field when kohafield = ''
Julian Maurice [Tue, 23 Aug 2022 11:47:56 +0000 (13:47 +0200)]
Bug 31441: Fix Koha::Item::as_marc_field when kohafield = ''

marc_subfield_structure.kohafield can be NULL, but it can also be an
empty string. But in that case, Koha::Item::as_marc_field ignores them,
which means the resulting MARC::Field object has missing data.
This can produce a bug in OPAC ISBD view (and probably other places
where this method is used)

Test plan:
1. Edit the default biblio MARC framework for the item field: find or
   create a subfield that is not linked to a DB column.
   Save even if you made no changes to make sure that
   marc_subfield_structure.kohafield is set to an empty string.
   I'll use 995$Z as an example for the following steps.
2. Add the following to syspref OPACISBD:
    #995|<br>Item:|{995Z}|
3. Create a biblio with an item and put a value into 995$Z
4. Go to the ISBD detail page for this record at OPAC. Confirm that the
   value you entered in 995$Z is not visible
5. Apply patch and restart koha
6. Refresh the ISBD detail page. Confirm that the 995$Z is now visible.
7. Run `prove t/db_dependent/Koha/Item.t`

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31540: Exclude expired holds from the reminder job
Nick Clemens [Mon, 12 Sep 2022 14:35:24 +0000 (14:35 +0000)]
Bug 31540: Exclude expired holds from the reminder job

Some libraries don't want to auto-cancel holds, but we should not remind
a patron about a hold which has expired.

To test:
1 - Place a hold for a patron
2 - Set it waiting
3 - Run the holds reminder script in the future
    perl misc/cronjobs/holds/holds_reminder.pl -day 1 --date '2023-09-12' -v
4 - Note the holds would be reminded
5 - Set expirationdate for the hold less than today
    UPDATE reserves SET expirationdate = DATE_SUB(CURDATE(), INTERVAL 1 DAY);
6 - Run the remidner cron again
7 - No holds trigger!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31601: Add ID to materials specified check-in page
Lucas Gass [Thu, 22 Sep 2022 13:14:22 +0000 (13:14 +0000)]
Bug 31601: Add ID to materials specified check-in page

TO test:
1. Apply patch
2. Find an item and add a materials specified note ( 952$3 ) to it.
3. Add this CSS to the IntranetUserCSS system preference:
background: red;
}
4. Now check-in the item in. The background of the materials specified note should now be red!
5. Hooray, sign off!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31653: Correct event names passed to jQuery on() function
Owen Leonard [Thu, 29 Sep 2022 12:20:30 +0000 (12:20 +0000)]
Bug 31653: Correct event names passed to jQuery on() function

This patch replaces the obsolete .on("hover") with .on("mouseenter
mouseleave"). This will allow the code to work again following the last
jQuery upgrade.

See Bug 20217 for discussion of the original implementation:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20217#c14

To test, apply the patch and go to the staff interface. Hover your mouse
over the "Search" link in the header menu. The adjacent dropdown menu
button should have its hover state triggered.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30571: DBIC schema
Tomas Cohen Arazi [Mon, 3 Oct 2022 11:30:37 +0000 (08:30 -0300)]
Bug 30571: DBIC schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30571: (QA follow-up) Update marc to MARC in docs
Katrin Fischer [Mon, 3 Oct 2022 10:35:00 +0000 (10:35 +0000)]
Bug 30571: (QA follow-up) Update marc to MARC in docs

... don't say it, I know.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30571: Z3950Servers.t - Add another subtest
Marcel de Rooy [Wed, 24 Aug 2022 12:50:31 +0000 (12:50 +0000)]
Bug 30571: Z3950Servers.t - Add another subtest

Subtest for testing nullability of host, syntax and encoding.

Test plan:
Run prove t/db_dependent/Koha/Z3950Servers.t.
(Note: you need strict mode to pass this test.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30571: Z3950Servers.t - Create subtest for existing tests
Marcel de Rooy [Wed, 24 Aug 2022 12:42:33 +0000 (12:42 +0000)]
Bug 30571: Z3950Servers.t - Create subtest for existing tests

No real changes, just moving code and indentation.
Ground work for following patch.

Test plan:
To let the test pass, disable strict_mode in koha-conf.
Run perl t/db_dependent/Koha/Z3950Servers.t. Should pass now.
However, in strict mode or with prove, it should fail.
Run prove t/db_dependent/Koha/Z3950Servers.t. Failed?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 30571: Table z3950servers: Make host, syntax and encoding NOT NULL
Marcel de Rooy [Wed, 24 Aug 2022 12:34:32 +0000 (12:34 +0000)]
Bug 30571: Table z3950servers: Make host, syntax and encoding NOT NULL

This is not a sync issue between structure and db revs.
It just seems a logical move.
Note that the interface for long does not allow these fields to be empty.

Test plan:
Run dbrev.
Add a new Z3950/SRU server. Verify if it works as expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 24127: Add 'code' and title to shelving location search
Nick Clemens [Thu, 22 Sep 2022 20:20:09 +0000 (20:20 +0000)]
Bug 24127: Add 'code' and title to shelving location search

This patch attempts to clarify the 'Shelving location' option in the
staff side dropdown, as it requires searching the shelving location code, not
the values. i.e. 'FIC' not 'Fiction'

This patch adds (code) to the option and adds a title, visible on hover

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31528: Compiled CSS
Tomas Cohen Arazi [Mon, 3 Oct 2022 11:26:33 +0000 (08:26 -0300)]
Bug 31528: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31529: [OPAC] Fix errors in SCSS files raised by stylelint
Owen Leonard [Thu, 8 Sep 2022 12:15:35 +0000 (12:15 +0000)]
Bug 31529: [OPAC] Fix errors in SCSS files raised by stylelint

This patch corrects errors raised by the new stylelint configuration in
OPAC SCSS files. Many of the fixes were made automatically by using the
"--fix" option:

npx stylelint koha-tmpl/opac-tmpl/bootstrap/css/src/*.scss --fix

Some examples of errors found:

    - Unexpected empty line before $-variable
    - Expected single space after ":"
    - Expected "#fff" to be "#FFF"
    - Expected modern color-function notation
    - Expected single space after "("
    - Expected single space before ")"
    - Expected empty line before comment
    - Expected no more than 1 empty line
    - Expected a trailing semicolon
    - Expected color.adjust($color, $lightness: -$amount) instead of darken($color, $amount)
    - Unexpected leading zero
    - Expected single space after "," in a single-line function
    - Expected double colon pseudo-element notation

Manual fixes include replacing named colors with hex codes, combining
duplicate selectors, removing empty blocks, etc.

Some warnings remain: "Unexpected !important" and "Expected a
placeholder selector (e.g. %placeholder) to be used in @extend" which
both require more than a quick fix, if we should choose to address them.

To test, apply the patch and rebuild the OPAC SCSS:
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client

Browse around the OPAC to confirm that there are no visible changes to
style.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31528: (follow-up) A few additional rules
Owen Leonard [Thu, 8 Sep 2022 12:37:25 +0000 (12:37 +0000)]
Bug 31528: (follow-up) A few additional rules

Adding a few more rules which came up during the correction process in
the follow-up bug.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31528: Replace scss-lint configuration with one for stylelint
Owen Leonard [Wed, 7 Sep 2022 12:24:02 +0000 (12:24 +0000)]
Bug 31528: Replace scss-lint configuration with one for stylelint

This patch removes the SCSS linting configuration .scss-lint.yml which
was intended to be used with a now-obsolete tool, scss-lint.

It is replaced with .stylelintrc.json, for use with stylelint. I've
tried to keep the linting rules the same as before.

To test, run 'yarn install' to install the new dependencies.

You can test stylelint from the command line like so:

npx stylelint koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss

It should output a list of problems with the file:

koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
   30:27   ✖  Expected "#e6f0f2" to be "#E6F0F2" color-hex-case
   81:31   ✖  Expected single space after "("    function-parentheses-space-inside
   ...etc.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 31412: Add focus to 'name' on SMTP Servers
Isobel Graham [Mon, 12 Sep 2022 16:33:57 +0000 (17:33 +0100)]
Bug 31412: Add focus to 'name' on SMTP Servers

This patch adds the focus class to ensure focus is given to the first form element on the SMTP server entry page.

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 26368: DBRev 22.06.00.055
Tomas Cohen Arazi [Mon, 3 Oct 2022 11:20:41 +0000 (08:20 -0300)]
Bug 26368: DBRev 22.06.00.055

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 26368: (QA follow-up) Standardize spaces in option descriptions
Katrin Fischer [Sat, 1 Oct 2022 22:17:45 +0000 (22:17 +0000)]
Bug 26368: (QA follow-up) Standardize spaces in option descriptions

Most options are labelles as x- description, but a few had
additional spaces. This just makes sure they all look the same.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 26368: Rephase system preference to sentence style
Katrin Fischer [Sat, 1 Oct 2022 22:16:41 +0000 (22:16 +0000)]
Bug 26368: Rephase system preference to sentence style

The preference was using a yes/no instead of the more common
display/don't display. This patch switches it to the latter
and adds a note about position 17.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
19 months agoBug 26368: Add OCLC options to marc21_leader.tt
Nick Clemens [Thu, 3 Sep 2020 12:52:28 +0000 (12:52 +0000)]
Bug 26368: Add OCLC options to marc21_leader.tt

See documentation at:
https://www.oclc.org/bibformats/en/fixedfield/elvl.html

To test:
 1 - Apply patch, updatedatabase
 2 - Edit a record in the basic editor
 3 - Edit the leader using the plugin
 4 - Note the options for '17 - Encoding level'
 5 - Find the system preference 'UseOCLCEncodingLevels'
 6 - Edit the record again
 7 - Note new options I,J,K,M
 8 - Set the value of encodign level to one of the new options and save
 9 - Edit again
10 - Confirm the value is displayed correctly selected
11 - Repeat tests using advanced cataloging editor

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 15545: Remove reqholdnotes from opac-reserve
Marcel de Rooy [Mon, 29 Aug 2022 13:40:28 +0000 (13:40 +0000)]
Bug 15545: Remove reqholdnotes from opac-reserve

This never really made it. So let's remove all traces.

Test plan:
Look at code changes and git grep reqholdnotes.
Bonus: Place a hold with/without hold notes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 8305: Added an icon for iOS home screen
Isobel Graham [Thu, 1 Sep 2022 10:03:31 +0000 (11:03 +0100)]
Bug 8305: Added an icon for iOS home screen

1. Bookmark the Koha OPAC on an iOS device
2. See if an icon is formed on the home screen
   of the device

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31496: Fix branch in printslip.pl to logged in staff user's library
Lari Strand [Wed, 31 Aug 2022 12:39:42 +0000 (15:39 +0300)]
Bug 31496: Fix branch in printslip.pl to logged in staff user's library

When you print a receipt slip in SCO, the library/branch you are at
in should be fetched from the logged in staff member's data (staff login
done before entering SCO view) instead of the patron's own who has signed
in to the SCO. Printing a slip shows patron's own home branch in the slip
as the branch they're in. This causes confusion with patrons who want to
print receipts/slips.

Test plan:
1) Make sure the staff user's library (used to login into SCO patron
   view) is not the same as the patron's who is logging into SCO
2) Print a slip in SCO and notice patron's home library printed on the slip
3) Apply patch
4) Print a slip in SCO and notice the library is now the staff user's library
   used to sign in to SCO patron view.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31419: Add accesskeys for modals
Nick Clemens [Fri, 19 Aug 2022 10:04:56 +0000 (10:04 +0000)]
Bug 31419: Add accesskeys for modals

This patch simply adds accesskey elements to the buttons, and changes an icon to be
consistent with bug 26626

For tips on how to access the accesskeys:
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey

To test:
1 - Generate a recall
2 - Fill it/check in
3 - Note modal now has hints "Confirm (Y)"
4 - Test with Y,P,I keys (may need to recreate recalls)
5 - Confirm the recall and test waiting recall modal too

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31605: Improve style of OPAC suggestions search form
Owen Leonard [Thu, 22 Sep 2022 15:48:32 +0000 (15:48 +0000)]
Bug 31605: Improve style of OPAC suggestions search form

This patch makes minor modifications to the markup for the
OPAC suggestions search form so that the different labels and
form fields display a little more nicely.

The patch also adds standard Bootstrap alert classes to
several messages which might be displayed on the screen, e.g.
"You have no pending purchase suggestions."

To test, apply the patch and make sure the "suggestion" system
preference is enabled.

- With the  OPACViewOthersSuggestions preference disabled, log
  in to the OPAC and view your suggestions.
- If you have no suggestions you should see a Bootstrap-styled
  message box, "You have no pending purchase suggestions."
- If necessary, submit a suggestion. With at least one suggestion
  present you should see a search form above the table of
  suggestions. The label, form field, and submit button should
  line up nicely.
- Test that the search form works correctly to find suggestions
  in your system.
- If you search for a suggestion which doesn't exist you should
  see a message-style alert, "There are no pending purchase
  suggestions matching your search."
- Enable the OPACViewOthersSuggestions system preference.
- Return to the OPAC suggestions page. The form field should
  now include a nicely-styled "Suggested by" filter.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31527: Breadcrumbs for anonymous suggestions are not correct
Owen Leonard [Thu, 22 Sep 2022 16:41:12 +0000 (16:41 +0000)]
Bug 31527: Breadcrumbs for anonymous suggestions are not correct

This patch updates the OPAC suggestions template in order to
omit the patron name breadcrumb if there is not a logged-in
user.

To test, apply the patch and view the OPAC suggestions page
with the AnonSuggestions preference both enabled and disabled.

- If you are logged in, the page breadcrumbs will be:
  Home -> [Your name] -> Purchase suggestions.
- If you are not logged in it should be:
  Home -> Purchase suggestions

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31565: (QA follow-up) Remove support for _ as wildcard in -like queries
Tomas Cohen Arazi [Mon, 26 Sep 2022 13:32:06 +0000 (10:32 -0300)]
Bug 31565: (QA follow-up) Remove support for _ as wildcard in -like queries

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: Fix QueryBuilder.t tests
Julian Maurice [Mon, 26 Sep 2022 12:47:52 +0000 (14:47 +0200)]
Bug 25375: Fix QueryBuilder.t tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 29744: (QA follow-up) Only consider PLACK_ENV for underscore
Tomas Cohen Arazi [Fri, 23 Sep 2022 15:04:54 +0000 (12:04 -0300)]
Bug 29744: (QA follow-up) Only consider PLACK_ENV for underscore

When run under certain circumstances (in jenkins, for example) some ENV
variables are set for convenience, like PLACK_WORKERS and
PLACK_MAX_REQUESTS and is causing some tests to fail (notably, shib
ones).

This patch makes the regex only consider PLACK_ENV when testing for the
underscore case.

Tests are updated accordingly, and they are also rewritten to test for
boolean values instead of empty string, or zero or one, etc. The
implementation shouldn't matter as long as the boolean evaluation is
correct and it is clearer for devs what to expect.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31105: Regression tests
Tomas Cohen Arazi [Fri, 23 Sep 2022 12:56:46 +0000 (09:56 -0300)]
Bug 31105: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31105: Holds to pull counts items from other branches when independentbranches...
Shi Yao Wang [Tue, 5 Jul 2022 16:03:52 +0000 (12:03 -0400)]
Bug 31105: Holds to pull counts items from other branches when independentbranches is active

Holds to pull should not show items from other branches that shares a
record when IndependentBranches is active. Except for superlibrarians.

Test plan:
1- Have IndependentBranches set to Yes
2- Have a record with an item from the current branch and another item from a different branch. We will call them branch A and branch B respectively
3- Have a patron from branch A place a hold on that record
4- Have a staff account on branch A and B with the following permissions:
    - circulate (all)
    - catalogue
5- Go to circulation > holds to pull
6- Notice under "Libraries" it displays branch A and B. Also, it shows 2 under "Items available"
7- Checkout the item from branch A to another patron
8- Go back to circulation > holds to pull
9- Notice under "Libraries" it displays branch B even though we are in branch A
10- Apply the patch
11- Return the checked out item from step 7
12- Redo step 5 to 9 with superlibrarian privileges and notice nothing changed
13- Redo step 11-12 but using accounts from step 4 and notice Holds to
pull only shows information relevant to their branch

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 23538: DBRev 22.06.00.054
Tomas Cohen Arazi [Fri, 23 Sep 2022 12:42:05 +0000 (09:42 -0300)]
Bug 23538: DBRev 22.06.00.054

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 23538: (QA follow-up) Group system preferences into one entry
Katrin Fischer [Sat, 30 Jul 2022 14:35:27 +0000 (14:35 +0000)]
Bug 23538: (QA follow-up) Group system preferences into one entry

This makes the new perferences EmailPatronRegistrations and EmailAddressForPatronRegistrations
follow a little more closely the pattern set by the very similar
EmailPurchaseSuggestions and EmailAddressforSuggestions.

* Group both preferences into one entry
* Add line break between preferences
* Switch branch for library in pull down

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 23538: (follow-up) Fix up notices
Alex Buckley [Wed, 6 Apr 2022 12:40:01 +0000 (12:40 +0000)]
Bug 23538: (follow-up) Fix up notices

- Add toolkit template (TT) syntax to notices
- Add TT conditionals to notices

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 23538: Unit tests
Alex Buckley [Wed, 6 Apr 2022 10:38:38 +0000 (10:38 +0000)]
Bug 23538: Unit tests

Test plan:
1. Run unit tests:
sudo koha-shell <instance>
cd t/db_dependent/Koha
prove -v Patron.t

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 23538: Email library when new patron self-registers
Alex Buckley [Tue, 5 Apr 2022 21:33:12 +0000 (09:33 +1200)]
Bug 23538: Email library when new patron self-registers

Test plan:
1. Apply all patches
2. Update database
3. Restart services
4. Set email addresses in:
- KohaAdminEmailAddress syspref
- EmailAddressForPatronRegistrations syspref
- Email address in the library branch
5. Enable PatronSelfRegistration syspref
6. Test the following use cases:

- EmailPatronRegistrations syspref = 'none'.
Submit OPAC registration.
= OUTCOME: Confirm no OPAC_REG notice in message_queue table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 23538: Database changes
Alex Buckley [Mon, 4 Apr 2022 07:52:06 +0000 (07:52 +0000)]
Bug 23538: Database changes

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31468: Change interface in Koha::Logger
Marcel de Rooy [Fri, 26 Aug 2022 09:28:14 +0000 (09:28 +0000)]
Bug 31468: Change interface in Koha::Logger

Test plan:
Add a line in mainpage.pl:
  require Koha::Logger; Koha::Logger->get->warn("intranet L51");
Restart. Hit intranet mainpage. Verify that line is in plack=intranet.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Retested with L49 now ;)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30484: (follow-up) Fix tests
Tomas Cohen Arazi [Fri, 23 Sep 2022 12:29:40 +0000 (09:29 -0300)]
Bug 30484: (follow-up) Fix tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30484: DBRev 22.06.00.053
Tomas Cohen Arazi [Fri, 23 Sep 2022 12:22:36 +0000 (09:22 -0300)]
Bug 30484: DBRev 22.06.00.053

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30484: (QA follow-up) Fix typo 'Kind Regards'
Katrin Fischer [Mon, 8 Aug 2022 20:46:33 +0000 (22:46 +0200)]
Bug 30484: (QA follow-up) Fix typo 'Kind Regards'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30484: Add unit tests
Andrew Isherwood [Wed, 13 Apr 2022 10:30:40 +0000 (11:30 +0100)]
Bug 30484: Add unit tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=28909
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30484: Implement support for ILL request updates
Andrew Isherwood [Fri, 8 Apr 2022 15:09:30 +0000 (16:09 +0100)]
Bug 30484: Implement support for ILL request updates

This commit adds support for the concept of ILL request update notices.

- Adds a new Koha::Illrequest::SupplierUpdate class that is used to
encapsulate an update to a request, this update may come from a
supplier via a backend or from core ILL via, perhaps, a user action
- Adds a new Koha::Illrequest::SupplierUpdateProcessor base class that
can be subclassed in order to create a processor that can be passed an
update and act accordingly.
- Updates to Illrequest.pm to support the above classes and allow core
Koha to offer update processors
- A shell script to initiate a periodic process to check for updates
meeting given criteria and run the appropriate processors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=28909
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30484: Add ILL update notice
Andrew Isherwood [Fri, 8 Apr 2022 15:06:37 +0000 (16:06 +0100)]
Bug 30484: Add ILL update notice

Adds a new ILL_REQUEST_UPDATE notice which is to be used for the
formation of notices informing users of updates to ILL requests.

Commit includes database updates and template changes for messaging
preferences

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=28909
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30802: (QA follow-up) Simplify a ternary
Marcel de Rooy [Tue, 13 Sep 2022 13:06:53 +0000 (13:06 +0000)]
Bug 30802: (QA follow-up) Simplify a ternary

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30802: Make numReturnedItemsToShow function properly
Shi Yao Wang [Thu, 19 May 2022 15:05:17 +0000 (11:05 -0400)]
Bug 30802: Make numReturnedItemsToShow function properly

Replaced the hardcoded 20 by the value of numReturnedItemsToShow to
display the right number of items in check in.

Test plan:
1-  Make lots of checkouts, at least like 40 (I used the batchCheckouts feature)
2-  Go to Circulation > Check in
3-  Return 21 items
    The last 20 items returned will be displayed
4-  Change numReturnedItemsToShow to 50
5-  Return a couple more items
    Only the last 20 returned items are displayed
6-  Change numReturnedItemsToShow to 10
7-  Return a couple more items
    Only the last 10 returned items are displayed
8-  Apply the patch
9-  Change numReturnedItemsToShow back to 20
10- Do steps 1 to 7 again, but this time step 5 returns the right amount
of items

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31525: display streetnumber with address in patron search
Wainui Witika-Park [Sun, 11 Sep 2022 22:18:45 +0000 (22:18 +0000)]
Bug 31525: display streetnumber with address in patron search

Adds back street number to the address when searching for patrons

To test:
1) Edit a patron's contact information
2) Under Main Address put an address, make sure to put something in the
Street number field
3) Do a simple patron search that will yield results (i.e. "a")
4) Confirm the street number does not show, but the rest of the address
does
5) Apply this patch
6) Do another patron search
5) Confirm the street number now shows

Sponsored-by: Catalyst IT
Testing note:  AddressFormat system preference must be set to "US style"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31518: Fix syntax error on request.tt that prevents showing hidden item count
Joonas Kylmälä [Sun, 4 Sep 2022 07:22:22 +0000 (10:22 +0300)]
Bug 31518: Fix syntax error on request.tt that prevents showing hidden item count

The variable set by request.pl doesn't have biblio prefix, it is just
hiddencount.

To test:
 1) Log in with a staff member account that has "Lost items in staff
 interface" setting set to "Hidden by default" in the patron category
 settings
 2) Add a lost item to biblio
 3) Go place a hold on staff interface (request.pl) notice the broken
 link on the request page: "Show all items ( hidden)"
 4) After applying the patch it should read "Show all items (1 hidden)"

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: DBRev 22.06.00.052
Tomas Cohen Arazi [Fri, 23 Sep 2022 12:08:38 +0000 (09:08 -0300)]
Bug 25375: DBRev 22.06.00.052

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: Spelling fixes
Tomas Cohen Arazi [Fri, 23 Sep 2022 12:06:11 +0000 (09:06 -0300)]
Bug 25375: Spelling fixes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: New atomicupdate syntax
Tomas Cohen Arazi [Fri, 23 Sep 2022 12:03:50 +0000 (09:03 -0300)]
Bug 25375: New atomicupdate syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: Adjust tests and test itemlost, not notforloan
Nick Clemens [Tue, 13 Sep 2022 13:06:03 +0000 (13:06 +0000)]
Bug 25375: Adjust tests and test itemlost, not notforloan

Previous commit correctly lists Zebra availability test, but was a
bad edit. This fixes the availability test to use itemlost

Additiionally, tests were written before limits were agreed. Adjusted
for the current settings

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: Match current Zebra availability limit
Nick Clemens [Mon, 8 Aug 2022 12:15:16 +0000 (12:15 +0000)]
Bug 25375: Match current Zebra availability limit

In Zebra the availability limit code states:
'available' is defined as (items.onloan is NULL) and (items.itemlost = 0)

We should make ES follow the same behaviour so that changing the engine does not
change this.

To test:
1 - Find or create several records with two items each
2 - For those records setup items as:
    a - one checked out, one available
    b - both marked lost
    c - both damaged
    d - both withdrawn
    e - both notforloan
3 - Enable ES and reindex to confirm everything is set
4 - Perform an advanced search to return those records and 'limit to available items'
5 - Confirm you see records b,c,d,e and records say '2 items, none available'
6 - Apply patch
7 - Run `misc/search_tools/rebuild_elasticsearch.pl -d -b`
8 - Perform an advanced search to return those records and 'limit to available items'
9 - Confirm you see records a,b,c,d and al but a say '2 items, none available'

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: Add tests for the "available" ES field
Julian Maurice [Thu, 3 Mar 2022 10:18:25 +0000 (11:18 +0100)]
Bug 25375: Add tests for the "available" ES field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: (QA follow-up) Count available items rather than iterating
Nick Clemens [Fri, 11 Sep 2020 15:23:02 +0000 (15:23 +0000)]
Bug 25375: (QA follow-up) Count available items rather than iterating

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: Get biblionumber from the correct MARC field
Julian Maurice [Fri, 4 Sep 2020 08:25:17 +0000 (12:25 +0400)]
Bug 25375: Get biblionumber from the correct MARC field

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 25375: Fix 'available' facet in elasticsearch
Julian Maurice [Wed, 29 Apr 2020 14:13:08 +0000 (16:13 +0200)]
Bug 25375: Fix 'available' facet in elasticsearch

Add a new boolean ES field named 'available', which is true if at least
one item is available, which means the item is not on loan, not
"notforloan", not withdrawn, not lost and not damaged

A full indexation is required

Test plan:
1. Apply patch and run updatedatabase.pl
2. Run `misc/search_tools/rebuild_elasticsearch.pl -d -b`
3. Make sure you have some biblios whose items are all unavailable, some
   biblios whose items are all available, and some biblios with at least
   one item available and at least one item unavailable
4. Use the 'available' filter on both opac and intranet and make sure it
   works as expected.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 31367: Add subtotals if budget has children
Nick Clemens [Fri, 26 Aug 2022 13:32:50 +0000 (13:32 +0000)]
Bug 31367: Add subtotals if budget has children

On bug 29287 we added child funds if a fund had no parent id

It turns out funds can have a parent, and still have children (sub-sub-funds)

This patch simply checks for children, rather than checking for lack of parent.

Totals are already calculated correctly in GetBudgetHierarchy

To test:
1 - Add a fund "Fund" to a budget - assign 1000 dollars
2 - Add a sub-fund "SubFund" - assign 100 dollars
3 - Add a sub-sub-fund "SubSubFund" - assign 10 dollars
4 - Add to a basket $5 order from SubSubFund
5 - Add to a basket $50 order from SubFund
6 - Add to a basket $500 order form Fun
7 - View acqui home - note 'SubFund' does not include total from 'SubSubFund'
8 - Apply patch
9 - Confirm all sub-sub-funds totaled in sub-funds and that fund total correctly adds sub and sub-sub funds

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30982: (QA follow-up) No userenv, no jobs
Marcel de Rooy [Fri, 23 Sep 2022 09:37:46 +0000 (09:37 +0000)]
Bug 30982: (QA follow-up) No userenv, no jobs

+    # Assume permission if context has no user
+    my $can_manage_background_jobs = 1;
=> This felt a bit unsafe.

Test plan:
Try interface for jobs. Call API with cookie. Call API with OAuth.
Run t/db_dependent/Koha/BackgroundJobs.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30982: (QA follow-up) Remove redundancy from template
Marcel de Rooy [Fri, 23 Sep 2022 08:48:05 +0000 (08:48 +0000)]
Bug 30982: (QA follow-up) Remove redundancy from template

The template now contains two lists for both status and type:
a TT list and a JS list. The type list already proves that
redundancy leads to bugs. We miss three types at one side:
    Unknown job type 'stage_marc_for_import'
    Unknown job type 'marc_import_commit_batch'
    Unknown job type 'marc_import_revert_batch'

This patch removes the TT list. And gets the status and type
via an additional js call. For that reason I hide the fieldset
until document ready. This can be improved later when needed.

Test plan:
Look at status and type on both job list and detail view.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30982: (QA follow-up) Spelling
Marcel de Rooy [Fri, 23 Sep 2022 07:05:39 +0000 (07:05 +0000)]
Bug 30982: (QA follow-up) Spelling

[1] Correct: BackgrounJob
[2] If should filter out not current jobs
=> Had a hard time reading that one until I replaced if by it.
=> Decided to rephrase it in a more positive way.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30982: (QA follow-up) Resolve pod warning
Marcel de Rooy [Tue, 20 Sep 2022 14:47:45 +0000 (14:47 +0000)]
Bug 30982: (QA follow-up) Resolve pod warning

Empty section in previous paragraph at line 32 in file Koha/BackgroundJobs.pm

Test plan:
Run podchecker again on this module.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30982: Rename 'Background Jobs' => 'Jobs'
Tomas Cohen Arazi [Mon, 12 Sep 2022 18:06:51 +0000 (15:06 -0300)]
Bug 30982: Rename 'Background Jobs' => 'Jobs'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
20 months agoBug 30982: Adapt table to new API spec
Tomas Cohen Arazi [Mon, 12 Sep 2022 17:54:08 +0000 (14:54 -0300)]
Bug 30982: Adapt table to new API spec

Disclaimer: this patch is highly opinionated :-D

When I started looking at this patch I felt like the two tables
(current/past jobs) implemented on bug 30462 was the way to go.

In order to make this patches apply after it I had to redo all the
things. Or most of them.

But I decided to keep the idea of filtering out completed tasks, not
just having the option to display 'the last hour' tasks. For the task I
added some required helper methods and the relevant tests as well. So a
behavior change.

Hope you all agree with it.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>