Bug 14973 - Add an alert during purchase suggestion submissions to warn the user when an existing biblio appears to satisfy the request
Summary: Add an alert during purchase suggestion submissions to warn the user when an ...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 6813 (view as bug list)
Depends on:
Blocks: 14963
  Show dependency treegraph
 
Reported: 2015-10-07 15:30 UTC by Alex Arnaud
Modified: 2020-05-18 11:35 UTC (History)
16 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
This enhancement to the suggestions process adds a warning to alert the user to the presence of an apparent holding that already satisfies the suggestion they are about to submit.
Version(s) released in:
20.05.00


Attachments
Bug 14973: Check existing biblio when submitting a purchase suggestion (15.48 KB, patch)
2015-10-07 15:35 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 14973 - Fix broken itemtypes list in opac-suggestions form (839 bytes, patch)
2015-10-27 15:21 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (15.78 KB, patch)
2015-11-03 09:05 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 14973 - Fix broken itemtypes list in opac-suggestions form (839 bytes, patch)
2015-11-03 09:05 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (15.83 KB, patch)
2015-11-03 13:49 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 14973 - Fix broken itemtypes list in opac-suggestions form (899 bytes, patch)
2015-11-03 13:49 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) (12.95 KB, patch)
2017-03-07 15:39 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side) (9.83 KB, patch)
2017-03-08 11:23 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) (18.06 KB, patch)
2019-09-24 14:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side) (10.05 KB, patch)
2019-09-24 14:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Do not skip validation step when submiting a suggestion - OPAC (1.39 KB, patch)
2019-10-16 13:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Remove double textarea for notes (1.85 KB, patch)
2019-10-16 13:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) (18.11 KB, patch)
2019-10-16 15:22 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side) (10.09 KB, patch)
2019-10-16 15:22 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 14973: Do not skip validation step when submiting a suggestion - OPAC (1.45 KB, patch)
2019-10-16 15:22 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 14973: Remove double textarea for notes (1.90 KB, patch)
2019-10-16 15:22 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 14973: Remove double declaration of suggestions_loop (1.13 KB, patch)
2019-11-06 16:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Add missing filters in templates (13.80 KB, patch)
2019-11-06 16:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Fix edit a suggestion and dup found (1.56 KB, patch)
2019-11-18 17:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) (18.11 KB, patch)
2019-12-13 15:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side) (10.32 KB, patch)
2019-12-13 15:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Do not skip validation step when submiting a suggestion - OPAC (1.45 KB, patch)
2019-12-13 15:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Remove double textarea for notes (1.90 KB, patch)
2019-12-13 15:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Remove double declaration of suggestions_loop (1.13 KB, patch)
2019-12-13 15:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Add missing filters in templates (13.80 KB, patch)
2019-12-13 15:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Fix edit a suggestion and dup found (1.56 KB, patch)
2019-12-13 15:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) (18.17 KB, patch)
2019-12-16 12:41 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side) (10.37 KB, patch)
2019-12-16 12:41 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 14973: Do not skip validation step when submiting a suggestion - OPAC (1.50 KB, patch)
2019-12-16 12:42 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 14973: Remove double textarea for notes (1.96 KB, patch)
2019-12-16 12:42 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 14973: Remove double declaration of suggestions_loop (1.18 KB, patch)
2019-12-16 12:42 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 14973: Add missing filters in templates (13.86 KB, patch)
2019-12-16 12:42 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 14973: Fix edit a suggestion and dup found (1.61 KB, patch)
2019-12-16 12:42 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Arnaud 2015-10-07 15:30:36 UTC
When submitting a new purchase suggestion, we search for similar document among biblio and show a message if a duplicate is found. User can ignore the message and confirm the suggestion.
Comment 1 Alex Arnaud 2015-10-07 15:35:51 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-10-08 10:04:25 UTC
Hi Alex,

I tested in Opac: Purchase Suggestions

Existing Biblio with item:
Wachtmeister Studers erste Fälle by Friedrich Glauser

Suggested:
Wachtmeister Studers erste Fälle -> Duplicate messsage
Wachtmeister Studer -> No message
Wachtmeister Studers -> No message
Wachtmeister Studers erste -> No Message
Studers erste Fälle -> No message

Combining full title with full Author
Wachtmeister Studers erste Fälle
Friedrich Glauser 
-> No Message

Wachtmeister Studers erste Fälle
Glauser, Friedrich
-> No Message

Combining full title with partial Author
Wachtmeister Studers erste Fälle
Glauser 
-> No Message

So it seems to work with the full title only. Is this intended?

Marc
Comment 3 Alex Arnaud 2015-10-09 07:37:05 UTC
Hello Marc,

I used C4::Search::FindDuplicate which seems to require almost the full title / author.

Either we fix findDuplicate to make it more flexible or we create an other subrutine (using simpleSearch ?)
Comment 4 Marc Véron 2015-10-11 19:05:38 UTC
Hi Alex,

Maybe simpleSearch is better in this case. Can you give it a try?
Comment 5 Gaetan Boisson 2015-10-26 14:40:13 UTC
I would say not finding a match on a partial title is ok. Otherwise we'll have a lot of fake positives, which will be unsettling for our users and might discourage them from creating suggestions.

However, not finding a match when the full title and the author was entered is definitely a bug for me. I think if findDuplicate says there is a duplicate when just the title is entered, it should definitely find one if both title and author are entered. I am not sure about how it works though.
Comment 6 Alex Arnaud 2015-10-26 15:23:37 UTC
I agree with Gaetan. If we use simpleSearch, this means that if we type "Dragons" as a title, a book like "Rise of the Dragons" could be shown as a duplicate to the user. I think this is not what we want.
However, findDuplicate should be able to find duplicate when typing full title and author. So i think we should fix this sub.
Comment 7 Alex Arnaud 2015-10-27 15:19:20 UTC
I go back on my word about findDuplicate. Searching duplicates with full title and author works for me.

I have a book: Les montagnes from Keith Lye.
Submit a suggestion with title "Les montagnes" => duplicate message
Submit a suggestion with title "Les montagnes" and author "Keith Lye" => duplicate message
Submit a suggestion with title "Les montagnes", author "Keith Lye" and itemtype "Book" => duplicate message.

Anyone has the same problem than Marc ?

I will send a new patch because i have broken the itemtypes list in the form
Comment 8 Alex Arnaud 2015-10-27 15:21:44 UTC Comment hidden (obsolete)
Comment 9 Nicole Engard (ByWater) 2015-11-02 17:13:43 UTC
I don't see a test plan on this - can you add one and then I'll happily test.

Nicole
Comment 10 Alex Arnaud 2015-11-03 09:05:49 UTC Comment hidden (obsolete)
Comment 11 Alex Arnaud 2015-11-03 09:05:56 UTC Comment hidden (obsolete)
Comment 12 Alex Arnaud 2015-11-03 09:10:13 UTC
Nicole,

I have added the test plan to the commit message of the first commit.
Comment 13 Nicole C. Engard 2015-11-03 13:49:29 UTC
Created attachment 44334 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion

Test plan:
- Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion",
- type the title (and author?) of a document that stand in you database
- you should get a warning message about an exiting biblio.
- clicking on confirm your suggestion add it, cancel does nothing

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Comment 14 Nicole C. Engard 2015-11-03 13:49:38 UTC
Created attachment 44335 [details] [review]
Bug 14973 - Fix broken itemtypes list in opac-suggestions form

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Comment 15 Nicole C. Engard 2015-11-03 13:50:39 UTC
This is neat, it's not super powerful, but I see how one day it could be. I'll note in the documentation that it only works if the title and the name are exact - so if I enter author Barbara Kingsolver it doesn't find her, but if I put in Kingsolver,  Barbara it does.

Still a good feature that doesn't break anything that I can see :)
Comment 16 Paul Poulain 2015-11-24 15:42:48 UTC
I agree it's not super-powerfull, and I also agree with Alex about using FindDuplicate.
The next step is probably to improve FindDuplicate. idea : using the matching points system.
Opening a ticket for that now ;-)
Comment 17 Jonathan Druart 2015-12-02 10:11:47 UTC
Alex,
1/ I think MarcRecordFromSuggestion is confusing. It does not take an existing suggestion in parameter, and that's why you use the default framework to get the marc fields. Either you rename it with something like MarcRecordFromNewSuggestion, or you take into account that this suggestion can already be linked to a record.

2/ Should not we have the same behavior on the staff side?
Comment 18 Alex Arnaud 2016-02-22 13:05:06 UTC
(In reply to Jonathan Druart from comment #17)

> 2/ Should not we have the same behavior on the staff side?

This patch is about warning non librarian user. It can therefore be assumed that librarians know which tools to use for finding a potential duplicate record.
Comment 19 Alex Arnaud 2017-03-07 15:39:11 UTC
Created attachment 60877 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side)

Test plan:
- Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion",
- type the title (and author?) of a document that stand in you database
- you should get a warning message about an exiting biblio.
- clicking on confirm your suggestion add it, cancel does nothing

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Comment 20 Alex Arnaud 2017-03-08 11:23:42 UTC
Created attachment 60913 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side)
Comment 21 Koha Team AMU 2017-03-20 13:40:34 UTC
Tested on the Biblibre sandbox n°3.

In the database : NOTRE DAME DE PARIS / Victor Hugo [Livres] (biblionumber : 974)

When we make a suggestion in low-case "notre dame de paris", no warning message, the suggestion is added.

When we make a suggestion in upper-case "NOTRE DAME DE PARIS", a warning message appears before validate.

It will be better if this patch is not case sensitive.
Comment 22 Alex Arnaud 2017-03-20 14:53:51 UTC
(In reply to Koha Team AMU from comment #21)
> Tested on the Biblibre sandbox n°3.
> 
> In the database : NOTRE DAME DE PARIS / Victor Hugo [Livres] (biblionumber :
> 974)
> 
> When we make a suggestion in low-case "notre dame de paris", no warning
> message, the suggestion is added.
> 
> When we make a suggestion in upper-case "NOTRE DAME DE PARIS", a warning
> message appears before validate.
> 
> It will be better if this patch is not case sensitive.

This feature use FindDuplicate function and i think the problem come from here. So i agree that this is not a good match but this patch is not intended to improve matching methods. As mentioned in comment 16, we should improve findDuplicate in another bug.
Comment 23 Séverine Queune 2019-09-11 13:08:09 UTC
The BULAC (http://www.bulac.fr/) would like to sponsore this development.

Alex, did you work further on the patch ?

As long as “Change sponsored?” is set on “Seeking developer”, anyone wanting to quote us for the development of such a feature or just ask for more information is welcome to write to us: <sigb@bulac.fr>.
Comment 24 Jonathan Druart 2019-09-24 14:05:22 UTC
Created attachment 93141 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side)

Test plan:
- Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion",
- type the title (and author?) of a document that stand in you database
- you should get a warning message about an exiting biblio.
- clicking on confirm your suggestion add it, cancel does nothing

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Comment 25 Jonathan Druart 2019-09-24 14:05:29 UTC
Created attachment 93142 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side)
Comment 26 Jonathan Druart 2019-09-24 14:07:44 UTC
The patches have been rebased against master. It was a bit tricky but it seems that they still work as expected.

I am with Alex here, we should not block this one because of FindDuplicate behaviors.
Comment 27 Séverine Queune 2019-09-26 15:49:13 UTC
Sorry Jonathan, I tried with :
 - title only
 - title + author
 - title + author + isbn (and other informations)
but I never get a warning.
Comment 28 Jonathan Druart 2019-10-16 13:47:46 UTC
Created attachment 94297 [details] [review]
Bug 14973: Do not skip validation step when submiting a suggestion - OPAC
Comment 29 Jonathan Druart 2019-10-16 13:48:13 UTC
There was indeed a bug at the OPAC.
Comment 30 Jonathan Druart 2019-10-16 13:57:36 UTC
Created attachment 94298 [details] [review]
Bug 14973: Remove double textarea for notes

Certainly a bad merge conflict resolution (I am certainly the one to
blame).
However I do not understand where this "note" variable come from.
Comment 31 ByWater Sandboxes 2019-10-16 15:22:18 UTC
Created attachment 94301 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side)

Test plan:
- Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion",
- type the title (and author?) of a document that stand in you database
- you should get a warning message about an exiting biblio.
- clicking on confirm your suggestion add it, cancel does nothing

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 32 ByWater Sandboxes 2019-10-16 15:22:22 UTC
Created attachment 94302 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side)

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 33 ByWater Sandboxes 2019-10-16 15:22:26 UTC
Created attachment 94303 [details] [review]
Bug 14973: Do not skip validation step when submiting a suggestion - OPAC

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 34 ByWater Sandboxes 2019-10-16 15:22:29 UTC
Created attachment 94304 [details] [review]
Bug 14973: Remove double textarea for notes

Certainly a bad merge conflict resolution (I am certainly the one to
blame).
However I do not understand where this "note" variable come from.

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 35 Lisette Scheer 2019-10-16 15:26:01 UTC
Works as expected. 
Very excited for this feature. 
I did notice that when checking the title it doesn't matter what the case of the letters are but with author it does on both the patron and staff side. (ie if the author is cataloged as Tyler, chris it won't warn if Tyler, Chris is entered instead.) 
Lisette
Comment 36 Séverine Queune 2019-10-17 14:04:52 UTC
I have strange behaviours when the title I search for is not exactly the same registered in Koha.
For example on BibLibre's sandbox http://pro.es5-koha.sandbox.biblibre.eu :

1) the 4th volume of "Lanfeust de Troy" is existing in Koha with title "Lanfeust de Troy : Le paladin d'eckmül". The alert is correct when I use all the different elements of this title. But if I only fill "Le paladin d'eckmül", I have an alert leading to a bad biblio (sn=4 instead of sn=1976).

2) for the title "[Le ]Siècle des Lumières", if I fill as the title "Le siècle des lumières" (which is certainly what patrons will do), the alert leads to the same bad notice as for exemple 1 (sn=4 instead of sn=741) !

3) the detection of "L'amour fou" for "[L']Amour fou" is correct.
Comment 37 Séverine Queune 2019-10-17 14:10:53 UTC
Sorry, another example...
Filling "Ramsès : Le Temple des millions d'années" is a duplicate of the 2nd volume for "Ramses" collection of Christian Jacq (sn=984), but the alert is made for the the 5th volume "Ramsès : Sous l'acacia d'Occident" (sn=99)
Comment 38 Jonathan Druart 2019-10-21 06:57:41 UTC
Séverine, this is how FindDuplicate works so far. If we want to improve its behavior we should done it on a separate bug report. It is out of the scope of this one.
Comment 39 Séverine Queune 2019-10-23 07:24:44 UTC
(In reply to Jonathan Druart from comment #38)
> Séverine, this is how FindDuplicate works so far. If we want to improve its
> behavior we should done it on a separate bug report. It is out of the scope
> of this one.

Thank you Jonathan for the information.
Except that point, the other behaviours were good, so ok to keep the "Signed off" status.
About the opening of a new bug, can you do it ? I'm not sure I can correctly describe the problem.
Comment 40 Jonathan Druart 2019-10-25 13:44:46 UTC
(In reply to Séverine Queune from comment #39)
> (In reply to Jonathan Druart from comment #38)
> > Séverine, this is how FindDuplicate works so far. If we want to improve its
> > behavior we should done it on a separate bug report. It is out of the scope
> > of this one.
> 
> Thank you Jonathan for the information.
> Except that point, the other behaviours were good, so ok to keep the "Signed
> off" status.
> About the opening of a new bug, can you do it ? I'm not sure I can correctly
> describe the problem.

It already exists actually :)
See bug 15248.
Comment 41 Jonathan Druart 2019-11-06 16:24:03 UTC
Created attachment 95113 [details] [review]
Bug 14973: Remove double declaration of suggestions_loop
Comment 42 Jonathan Druart 2019-11-06 16:26:47 UTC
Created attachment 95114 [details] [review]
Bug 14973: Add missing filters in templates
Comment 43 Séverine Queune 2019-11-08 11:26:17 UTC
Found an issue coming from this patch, when testing bug 14763 : biblioitems.itemtypes is now  mandatory to edit a suggestion.
It seems an important data to map, so I don't think a modification of the present code is needed, but maybe a warning should be clearly displayed in the release note, and maybe Koha (About > System information ?).
Comment 44 Jonathan Druart 2019-11-18 16:47:20 UTC
*** Bug 6813 has been marked as a duplicate of this bug. ***
Comment 45 Jonathan Druart 2019-11-18 17:00:57 UTC
Created attachment 95517 [details] [review]
Bug 14973: Fix edit a suggestion and dup found

The find duplicate call must only be done when the suggestion is new. It
does not make sense to search for a duplicate when the suggestion
already exists.

This patch also fixes a side-effect:
- Create a suggestion using an existing biblio title
- Ignore the warning and save
- Edit again and save
=> BOOM on date

Template process failed: undef error - The given date (18/11/2019) does
not match the date format (iso) at /kohadevbox/koha/Koha/DateUtils.pm
line 168

The dates are not processed and so badly formatted when sent to the
template.
Comment 46 Martin Renvoize 2019-11-19 19:45:39 UTC
Hmm, might be worth taking a look at bug 23173 for some possible inspiration here.. it add hooks to allow searching of various sources via plugins before submitting an ILL request.. feels like a similar mechanism could be employed here too and would go be perhaps a more flexible end result?

Just some food for thought.. it's still on my list to work through this patch set anyway.
Comment 47 Jonathan Druart 2019-12-13 15:18:06 UTC
Created attachment 96255 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side)

Test plan:
- Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion",
- type the title (and author?) of a document that stand in you database
- you should get a warning message about an exiting biblio.
- clicking on confirm your suggestion add it, cancel does nothing

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 48 Jonathan Druart 2019-12-13 15:18:10 UTC
Created attachment 96256 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side)

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 49 Jonathan Druart 2019-12-13 15:18:15 UTC
Created attachment 96257 [details] [review]
Bug 14973: Do not skip validation step when submiting a suggestion - OPAC

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 50 Jonathan Druart 2019-12-13 15:18:19 UTC
Created attachment 96258 [details] [review]
Bug 14973: Remove double textarea for notes

Certainly a bad merge conflict resolution (I am certainly the one to
blame).
However I do not understand where this "note" variable come from.

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Comment 51 Jonathan Druart 2019-12-13 15:18:24 UTC
Created attachment 96259 [details] [review]
Bug 14973: Remove double declaration of suggestions_loop
Comment 52 Jonathan Druart 2019-12-13 15:18:29 UTC
Created attachment 96260 [details] [review]
Bug 14973: Add missing filters in templates
Comment 53 Jonathan Druart 2019-12-13 15:18:33 UTC
Created attachment 96261 [details] [review]
Bug 14973: Fix edit a suggestion and dup found

The find duplicate call must only be done when the suggestion is new. It
does not make sense to search for a duplicate when the suggestion
already exists.

This patch also fixes a side-effect:
- Create a suggestion using an existing biblio title
- Ignore the warning and save
- Edit again and save
=> BOOM on date

Template process failed: undef error - The given date (18/11/2019) does
not match the date format (iso) at /kohadevbox/koha/Koha/DateUtils.pm
line 168

The dates are not processed and so badly formatted when sent to the
template.
Comment 54 Nick Clemens 2019-12-16 12:41:53 UTC
Created attachment 96325 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side)

Test plan:
- Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion",
- type the title (and author?) of a document that stand in you database
- you should get a warning message about an exiting biblio.
- clicking on confirm your suggestion add it, cancel does nothing

Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 55 Nick Clemens 2019-12-16 12:41:57 UTC
Created attachment 96326 [details] [review]
Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side)

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 56 Nick Clemens 2019-12-16 12:42:01 UTC
Created attachment 96327 [details] [review]
Bug 14973: Do not skip validation step when submiting a suggestion - OPAC

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 57 Nick Clemens 2019-12-16 12:42:06 UTC
Created attachment 96328 [details] [review]
Bug 14973: Remove double textarea for notes

Certainly a bad merge conflict resolution (I am certainly the one to
blame).
However I do not understand where this "note" variable come from.

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 58 Nick Clemens 2019-12-16 12:42:10 UTC
Created attachment 96329 [details] [review]
Bug 14973: Remove double declaration of suggestions_loop

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 59 Nick Clemens 2019-12-16 12:42:14 UTC
Created attachment 96330 [details] [review]
Bug 14973: Add missing filters in templates

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 60 Nick Clemens 2019-12-16 12:42:18 UTC
Created attachment 96331 [details] [review]
Bug 14973: Fix edit a suggestion and dup found

The find duplicate call must only be done when the suggestion is new. It
does not make sense to search for a duplicate when the suggestion
already exists.

This patch also fixes a side-effect:
- Create a suggestion using an existing biblio title
- Ignore the warning and save
- Edit again and save
=> BOOM on date

Template process failed: undef error - The given date (18/11/2019) does
not match the date format (iso) at /kohadevbox/koha/Koha/DateUtils.pm
line 168

The dates are not processed and so badly formatted when sent to the
template.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 61 Martin Renvoize 2020-01-02 12:45:53 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 62 Martin Renvoize 2020-01-02 13:16:06 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 63 Joy Nelson 2020-01-12 21:09:03 UTC
New feature.  not backported to 19.11.x