Bug 24819 - Allow the librarian to choose a patron when entering a purchase suggestion
Summary: Allow the librarian to choose a patron when entering a purchase suggestion
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Matthias Meusburger
QA Contact: Testopia
URL:
Keywords:
: 14376 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-03-06 09:17 UTC by Matthias Meusburger
Modified: 2020-03-26 09:28 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 24819: Allow the librarian to choose a patron when entering a purchase suggestion (10.62 KB, patch)
2020-03-06 09:20 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 24819: Allow the librarian to choose a patron when entering a purchase suggestion (10.71 KB, patch)
2020-03-06 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24819: (follow-up) Rename suggestion_search to suggestor_search (4.09 KB, patch)
2020-03-24 13:58 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 24819: Allow the librarian to choose a patron when entering a purchase suggestion (10.55 KB, patch)
2020-03-25 14:07 UTC, Matthias Meusburger
Details | Diff | Splinter Review
follow-up (4.09 KB, patch)
2020-03-26 09:25 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 24819: (follow-up) Rename suggestion_search to suggestor_search (4.09 KB, patch)
2020-03-26 09:26 UTC, Matthias Meusburger
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Meusburger 2020-03-06 09:17:53 UTC
Sometimes librarians are creating purchase suggestions that came from patrons which didn't use the opac (but sent an email, or told the librarian verbally...)
    
This patch allows the librarian to change the creator of the purchase suggestion when entering it.
    
This way, the patron will be able to receive notifications during the purchase suggestion workflow.
    
Test plan:
    
     - Apply the patch
    
     - Check that you can change the default creator of the purchase suggestion when
       creating a new suggestion by clicking on 'Set to patron'
       (Home > Acquisitions > Suggestions management > New purchase suggestion)
    
     - Check that you can also change the creator of the purchase suggestion when
       editing an existing suggestion

This is a rewrite of Bug 14376.

Since it has been rewritten from scratch, I thought it would be cleaner to create a new Bug, but let me know otherwise.

This rewrite now uses the common way to select a patron, as requested in Bug 14376.
Comment 1 Matthias Meusburger 2020-03-06 09:19:28 UTC
*** Bug 14376 has been marked as a duplicate of this bug. ***
Comment 2 Matthias Meusburger 2020-03-06 09:20:59 UTC
Created attachment 100223 [details] [review]
Bug 24819: Allow the librarian to choose a patron when entering a purchase suggestion

Sometimes librarians are creating purchase suggestions that came from patrons
which didn't use the opac (but sent an email, or told the librarian verbally...)

This patch allows the librarian to change the creator of the purchase suggestion
when entering it.

This way, the patron will be able to receive notifications during the purchase
suggestion workflow.

Test plan:

 - Apply the patch

 - Check that you can change the default creator of the purchase suggestion when
   creating a new suggestion by clicking on 'Set to patron'
   (Home > Acquisitions > Suggestions management > New purchase suggestion)

 - Check that you can also change the creator of the purchase suggestion when
   editing an existing suggestion
Comment 3 Owen Leonard 2020-03-06 17:02:06 UTC
Created attachment 100281 [details] [review]
Bug 24819: Allow the librarian to choose a patron when entering a purchase suggestion

Sometimes librarians are creating purchase suggestions that came from patrons
which didn't use the opac (but sent an email, or told the librarian verbally...)

This patch allows the librarian to change the creator of the purchase suggestion
when entering it.

This way, the patron will be able to receive notifications during the purchase
suggestion workflow.

Test plan:

 - Apply the patch

 - Check that you can change the default creator of the purchase suggestion when
   creating a new suggestion by clicking on 'Set to patron'
   (Home > Acquisitions > Suggestions management > New purchase suggestion)

 - Check that you can also change the creator of the purchase suggestion when
   editing an existing suggestion

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Fridolin SOMERS 2020-03-11 14:13:06 UTC
Strange to call files suggestion_search.pl and suggestion_search.tt since its a patron search no ?
Comment 5 Matthias Meusburger 2020-03-11 14:28:19 UTC
Well, not that strange according to me: 

common/patron_search.tt is the basecode for patrons search

If you look at what's existing:

Since:

guarantor_search.(pl||tt) using patron_search.tt

 => using patron search in a guarantor context


Seems pretty consistent that:

suggestion_search.(pl||tt) using patron_search.tt

 => using patron search in a suggestion context


Don't you think?
Comment 6 Fridolin SOMERS 2020-03-11 14:52:08 UTC
(In reply to Matthias Meusburger from comment #5)
> Well, not that strange according to me: 
> 
> common/patron_search.tt is the basecode for patrons search
> 
> If you look at what's existing:
> 
> Since:
> 
> guarantor_search.(pl||tt) using patron_search.tt
> 
>  => using patron search in a guarantor context
> 
> 
> Seems pretty consistent that:
> 
> suggestion_search.(pl||tt) using patron_search.tt
> 
>  => using patron search in a suggestion context
> 
> 
> Don't you think?

Ah i see.

In my opinion :
guarantor_search limits search to patrons that can be a garantor so its correct.
In our case its simply patron search.
Comment 7 Katrin Fischer 2020-03-15 21:53:09 UTC
Appears to work well and passes QA tools.

I got a suggestion for the file naming: suggestor_search

Would this work?

I agree with Frido that suggestion_search is misleading and makes it sounds like a search for suggestions.
Comment 8 Matthias Meusburger 2020-03-24 13:58:16 UTC
Created attachment 101583 [details] [review]
Bug 24819: (follow-up) Rename suggestion_search to suggestor_search
Comment 9 Laurence Rault 2020-03-25 10:33:10 UTC
When testing on sandbox : 
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
Comment 10 Matthias Meusburger 2020-03-25 14:07:11 UTC
Created attachment 101716 [details] [review]
Bug 24819: Allow the librarian to choose a patron when entering a purchase suggestion

Sometimes librarians are creating purchase suggestions that came from patrons
which didn't use the opac (but sent an email, or told the librarian verbally...)

This patch allows the librarian to change the creator of the purchase suggestion
when entering it.

This way, the patron will be able to receive notifications during the purchase
suggestion workflow.

Test plan:

 - Apply the patch

 - Check that you can change the default creator of the purchase suggestion when
   creating a new suggestion by clicking on 'Set to patron'
   (Home > Acquisitions > Suggestions management > New purchase suggestion)

 - Check that you can also change the creator of the purchase suggestion when
   editing an existing suggestion

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 11 Matthias Meusburger 2020-03-25 14:08:21 UTC
Rebased on master.
Comment 12 Matthias Meusburger 2020-03-26 09:25:32 UTC
Created attachment 101788 [details] [review]
follow-up
Comment 13 Matthias Meusburger 2020-03-26 09:26:20 UTC
Created attachment 101789 [details] [review]
Bug 24819: (follow-up) Rename suggestion_search to suggestor_search
Comment 14 Matthias Meusburger 2020-03-26 09:28:07 UTC
I re-uploaded the follow-up, patch order is now correct in Bugzilla, git bz applies the patches in the correct order.