Bug 24347 - Add a 'search to order' function
Summary: Add a 'search to order' function
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature
Assignee: Owen Leonard
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 23944
Blocks: 27900
  Show dependency treegraph
 
Reported: 2020-01-05 11:08 UTC by Katrin Fischer
Modified: 2021-12-13 21:08 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This new feature allows staff to add items to an order via a new 'Search to order' function accessible from the basket. The order can then be created either directly from the result list or the detail pages of the catalog. This replaces the former search functionality for existing records within the acquisitions module and makes it possible to use all search features and information shown in the normal catalog.
Version(s) released in:
20.05.00
Circulation function:


Attachments
Bug 24347: Add a 'search to order' option similar to 'search to hold' (14.17 KB, patch)
2020-01-06 15:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24347: (follow-up) Remove custom catalog search from acquisitions (12.51 KB, patch)
2020-01-06 15:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24347: Add a 'search to order' option similar to 'search to hold' (14.19 KB, patch)
2020-01-26 06:19 UTC, David Nind
Details | Diff | Splinter Review
Bug 24347: (follow-up) Remove custom catalog search from acquisitions (12.56 KB, patch)
2020-01-26 06:19 UTC, David Nind
Details | Diff | Splinter Review
Bug 24347: Add a 'search to order' option similar to 'search to hold' (14.24 KB, patch)
2020-01-29 22:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24347: (follow-up) Remove custom catalog search from acquisitions (12.61 KB, patch)
2020-01-29 22:54 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-01-05 11:08:53 UTC
On bug 11149 it was noted that the search options when reordering an existing record are limited. Instead of relying on ccl queries or rebuilding search features in the acq module, it could be nice to have a "search to order" feature. This could work similar to the "search to hold" functionality. Only you would not start from a patron record, but from your basket. Searching in the catalog you would see an "Add to order" link that would redirect you to the order page of your basket with the record already linked to the order.
Comment 1 Owen Leonard 2020-01-05 19:54:39 UTC
If anyone is interested in this feature I recommend helping test Bug 23944, "Phase out use of jquery.cookie.js in favor of js.cookie.js" which I would view as a dependency.
Comment 2 Owen Leonard 2020-01-06 15:19:11 UTC
Created attachment 96838 [details] [review]
Bug 24347: Add a 'search to order' option similar to 'search to hold'

This patch modifes the process of searching for an existing record
to add to a basket. Now the search is performed as a keyword search in
the regular catalog rather than via a custom search script. Options are
added to the search results and detail pages to add results to an order.

This process follows the same pattern as the "Search to hold" feature:
When the search is initiated, a cookie is set with the requisite
information--in this case vendor id and basket number.

If the search results or bibliographic detail pages detect that a
"searchToOrder" cookie is present, the correct "Add order" link will be
shown. Like with the "search to hold" feature, the cookie expires in 10
minutes.

To test, apply the patch and log into the staff client as a user who has
permission to add to a basket in acquisitions.

 - Go to Acquisitions -> Vendor -> Basket -> Add to basket.
 - Using the "From an existing record" option, perform a search.
 - On the search results page, test the "Add order" link which appears
   with each result. Clicking the link should take you to the "New
   order" page for the correct vendor and basket. The catalog
   details section of the form should include the correct information.
 - From the search results page view the bibliographic details page for
   any record. There should be a new toolbar button, "Add order." Verify
   that it works correctly.
   - Test the same thing from all bibliographic detail pages: Normal,
     MARC, Labeled MARC, ISBD, as well as the items page
     (moredetail.pl).
 - Test this process for both the locations in acquisitions where one
   can add to an existing basket: Vendor search results and the basket
   detail page
 - Test the cookie timeout: Wait 10 minutes and perform another catalog
   search. The "Add order" link should no longer be present.
Comment 3 Owen Leonard 2020-01-06 15:19:13 UTC
Created attachment 96839 [details] [review]
Bug 24347: (follow-up) Remove custom catalog search from acquisitions

This patch removes the "neworderbiblio" script and template which are
made obsolete by the "search to order" feature.

deleted:    acqui/neworderbiblio.pl
deleted:    koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt

Some documentation in addorder.pl has been corrected to remove reference
to neworderbiblio.pl.

To test, apply the patch and verify that the correct files have been
removed.

Search the Koha codebase to verify that no links to
acqui/neworderbiblio.pl remain.
Comment 4 David Nind 2020-01-26 06:19:54 UTC
Created attachment 97948 [details] [review]
Bug 24347: Add a 'search to order' option similar to 'search to hold'

This patch modifes the process of searching for an existing record
to add to a basket. Now the search is performed as a keyword search in
the regular catalog rather than via a custom search script. Options are
added to the search results and detail pages to add results to an order.

This process follows the same pattern as the "Search to hold" feature:
When the search is initiated, a cookie is set with the requisite
information--in this case vendor id and basket number.

If the search results or bibliographic detail pages detect that a
"searchToOrder" cookie is present, the correct "Add order" link will be
shown. Like with the "search to hold" feature, the cookie expires in 10
minutes.

To test, apply the patch and log into the staff client as a user who has
permission to add to a basket in acquisitions.

 - Go to Acquisitions -> Vendor -> Basket -> Add to basket.
 - Using the "From an existing record" option, perform a search.
 - On the search results page, test the "Add order" link which appears
   with each result. Clicking the link should take you to the "New
   order" page for the correct vendor and basket. The catalog
   details section of the form should include the correct information.
 - From the search results page view the bibliographic details page for
   any record. There should be a new toolbar button, "Add order." Verify
   that it works correctly.
   - Test the same thing from all bibliographic detail pages: Normal,
     MARC, Labeled MARC (enable viewLabeledMARC system preference), ISBD,
     as well as the items page (moredetail.pl).
 - Test this process for both the locations in acquisitions where one
   can add to an existing basket: Vendor search results and the basket
   detail page
 - Test the cookie timeout: Wait 10 minutes and perform another catalog
   search. The "Add order" link should no longer be present.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2020-01-26 06:19:58 UTC
Created attachment 97949 [details] [review]
Bug 24347: (follow-up) Remove custom catalog search from acquisitions

This patch removes the "neworderbiblio" script and template which are
made obsolete by the "search to order" feature.

deleted:    acqui/neworderbiblio.pl
deleted:    koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt

Some documentation in addorder.pl has been corrected to remove reference
to neworderbiblio.pl.

To test, apply the patch and verify that the correct files have been
removed.

Search the Koha codebase to verify that no links to
acqui/neworderbiblio.pl remain.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 Katrin Fischer 2020-01-29 22:53:57 UTC
Created attachment 98101 [details] [review]
Bug 24347: Add a 'search to order' option similar to 'search to hold'

This patch modifes the process of searching for an existing record
to add to a basket. Now the search is performed as a keyword search in
the regular catalog rather than via a custom search script. Options are
added to the search results and detail pages to add results to an order.

This process follows the same pattern as the "Search to hold" feature:
When the search is initiated, a cookie is set with the requisite
information--in this case vendor id and basket number.

If the search results or bibliographic detail pages detect that a
"searchToOrder" cookie is present, the correct "Add order" link will be
shown. Like with the "search to hold" feature, the cookie expires in 10
minutes.

To test, apply the patch and log into the staff client as a user who has
permission to add to a basket in acquisitions.

 - Go to Acquisitions -> Vendor -> Basket -> Add to basket.
 - Using the "From an existing record" option, perform a search.
 - On the search results page, test the "Add order" link which appears
   with each result. Clicking the link should take you to the "New
   order" page for the correct vendor and basket. The catalog
   details section of the form should include the correct information.
 - From the search results page view the bibliographic details page for
   any record. There should be a new toolbar button, "Add order." Verify
   that it works correctly.
   - Test the same thing from all bibliographic detail pages: Normal,
     MARC, Labeled MARC, ISBD, as well as the items page
     (moredetail.pl).
 - Test this process for both the locations in acquisitions where one
   can add to an existing basket: Vendor search results and the basket
   detail page
 - Test the cookie timeout: Wait 10 minutes and perform another catalog
   search. The "Add order" link should no longer be present.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2020-01-29 22:54:01 UTC
Created attachment 98102 [details] [review]
Bug 24347: (follow-up) Remove custom catalog search from acquisitions

This patch removes the "neworderbiblio" script and template which are
made obsolete by the "search to order" feature.

deleted:    acqui/neworderbiblio.pl
deleted:    koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt

Some documentation in addorder.pl has been corrected to remove reference
to neworderbiblio.pl.

To test, apply the patch and verify that the correct files have been
removed.

Search the Koha codebase to verify that no links to
acqui/neworderbiblio.pl remain.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2020-01-29 23:00:37 UTC
Thx a lot Owen for picking up my idea and running with it!

Possible improvement I could imagine:
- Add a link to jump directly to Advanced search
- Improve the styling of the 'Add to order' pop up to make all our different options a bit easier to handle (not related to this bug actually)
Comment 9 Martin Renvoize (ashimema) 2020-01-30 11:01:46 UTC
This introduces a new cookie right.. should this get recorded on the wiki page for cookies?
Comment 10 Martin Renvoize (ashimema) 2020-01-30 11:02:35 UTC
https://wiki.koha-community.org/wiki/Use_of_Cookies - Katrin or Owen.. could you do the honours pretty please.
Comment 11 Martin Renvoize (ashimema) 2020-01-30 11:04:06 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 12 Katrin Fischer 2020-01-30 11:07:36 UTC
(In reply to Martin Renvoize from comment #10)
> https://wiki.koha-community.org/wiki/Use_of_Cookies - Katrin or Owen.. could
> you do the honours pretty please.

I already added a personal tag about it yesterday :) Is there a way we could mark them otherwise/publicly? I have an update of the cookie docs on the agenda since I think I found a few missing.
Comment 13 Martin Renvoize (ashimema) 2020-01-30 18:23:23 UTC
Could add a public keyword I suppose.. I use those allot to share States with people.. like the Manual and needs-release-notes.. how about 'new-cookie' ?
Comment 14 Katrin Fischer 2020-01-30 18:32:20 UTC
(In reply to Martin Renvoize from comment #13)
> Could add a public keyword I suppose.. I use those allot to share States
> with people.. like the Manual and needs-release-notes.. how about
> 'new-cookie' ?

+1
Comment 15 Katrin Fischer 2020-01-30 20:41:39 UTC
Cookie description added!
Comment 16 Jonathan Druart 2020-02-04 09:52:17 UTC
Would it make sense to have the "Add order" link a bit more visible?
Comment 17 Katrin Fischer 2020-02-04 17:45:49 UTC
(In reply to Jonathan Druart from comment #16)
> Would it make sense to have the "Add order" link a bit more visible?

As you have to start from the basket I don't mind the current display - people will be looking for the link. But open to ideas, what were you thinking of?
Comment 18 Jonathan Druart 2020-02-05 09:05:35 UTC
(In reply to Katrin Fischer from comment #17)
> (In reply to Jonathan Druart from comment #16)
> > Would it make sense to have the "Add order" link a bit more visible?
> 
> As you have to start from the basket I don't mind the current display -
> people will be looking for the link. But open to ideas, what were you
> thinking of?

To be honest I spent 10 min trying to understand which parameter was missing, and why the previous view (the table with the "Order" buttons on the right) did not appear. I thought it was a bug!
If we are coming from the acquisition module we certainly only want to do that action, however the link is lost between all the other links.
I do not have an idea that could be ergonomic however (I thought maybe cats, snow or stars around the new link? but...)
Comment 19 Katrin Fischer 2020-02-05 09:22:39 UTC
(In reply to Jonathan Druart from comment #18)
> (In reply to Katrin Fischer from comment #17)
> > (In reply to Jonathan Druart from comment #16)
> > > Would it make sense to have the "Add order" link a bit more visible?
> > 
> > As you have to start from the basket I don't mind the current display -
> > people will be looking for the link. But open to ideas, what were you
> > thinking of?
> 
> To be honest I spent 10 min trying to understand which parameter was
> missing, and why the previous view (the table with the "Order" buttons on
> the right) did not appear. I thought it was a bug!
> If we are coming from the acquisition module we certainly only want to do
> that action, however the link is lost between all the other links.
> I do not have an idea that could be ergonomic however (I thought maybe cats,
> snow or stars around the new link? but...)

I think the inbuilt list for odering lacked some of the information that you would want to see. To me this works similar now than the 'search to hold' or 'order from holds ratio report' where we display an additional link, when the feature was activated. What could be nice is maybe displaying a 'back to basket' link where the 'last patron' thing is? Just thinking how we could further streamline navigation...
Comment 20 Joy Nelson 2020-02-10 23:20:38 UTC
New feature not backported to 19.11.x
Comment 21 Martin Renvoize (ashimema) 2020-05-20 16:03:15 UTC
Did anyone sponsor this one?