[Bug 38235] New: Suggestion confirmation letter sent when it should not
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Bug ID: 38235 Summary: Suggestion confirmation letter sent when it should not Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Acquisitions Assignee: januszop@gmail.com Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org When processing a new order (creating basket, receiving order, etc.) using a bibliographic record once already linked to an old suggestion (already completed in the past), Koha generates and sends a confirmation letter that should not be sent at all. This is because suggestions in Koha are linked to a biblionumber (and not the order), and so the old suggestion is identified - erroneously - as relevant. Then C4::Suggestions::ModSuggestion sends a letter whenever it receives STATUS as a parameter, paying no attention to whether the status is changed. So, in this case, a suggestion already in the status AVAILABLE is "updated" to the status AVAILABLE and the letter is generated. To solve this problem, it should be enough to check whether STATUS is actually changed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 173199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173199&action=edit Bug 38235: Suggestion confirmation letter sent when it should not When processing a new order (creating basket, receiving order, etc.) using a bibliographic record once already linked to an old suggestion (already completed in the past), Koha generates and sends a confirmation letter that should not be sent at all. This is because suggestions in Koha are linked to a biblionumber (and not the order), and so the old suggestion is identified - erroneously - as relevant. Then C4::Suggestions::ModSuggestion sends a letter whenever it receives STATUS as a parameter, paying no attention to whether the status is changed. So, in this case, a suggestion already in the status AVAILABLE is "updated" to the status AVAILABLE and the letter is generated. To solve this problem, it should be enough to check whether STATUS is actually changed. Test plan: ========== 1. As a patron, make a purchase suggestion. As a librarian, accept it and process it, as usual, through the acquisition process. 2. At the patron account, as librarian, check the generated notices (the most recent should be "Suggested purchase available"). 3. Make a new aquisition order for the same bibliographic record ("From an existing record:") and receive it as usual. 4. Go to the account of the patron that made the original suggestion and check the notices. Note the second, irrelevant letter "Suggested purchase available". 5. Apply the patch; restart_all. 6. Repeat p. 3 and 4. Note that no new notice has been generated. Sponsored-by: Ignatianum University in Cracow -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 --- Comment #2 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 173200 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173200&action=edit Bug 38235: Unit tests BTW, tiny adjustments to existing tests to work with modified C4::Suggestions::ModSuggestion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173199|0 |1 is obsolete| | --- Comment #3 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 173227 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173227&action=edit Bug 38235: Suggestion confirmation letter sent when it should not When processing a new order (creating basket, receiving order, etc.) using a bibliographic record once already linked to an old suggestion (already completed in the past), Koha generates and sends a confirmation letter that should not be sent at all. This is because suggestions in Koha are linked to a biblionumber (and not the order), and so the old suggestion is identified - erroneously - as relevant. Then C4::Suggestions::ModSuggestion sends a letter whenever it receives STATUS as a parameter, paying no attention to whether the status is changed. So, in this case, a suggestion already in the status AVAILABLE is "updated" to the status AVAILABLE and the letter is generated. To solve this problem, it should be enough to check whether STATUS is actually changed. Test plan: ========== 1. As a patron, make a purchase suggestion. As a librarian, accept it and process it, as usual, through the acquisition process. 2. At the patron account, as librarian, check the generated notices (the most recent should be "Suggested purchase available"). 3. Make a new aquisition order for the same bibliographic record ("From an existing record:") and receive it as usual. 4. Go to the account of the patron that made the original suggestion and check the notices. Note the second, irrelevant letter "Suggested purchase available". 5. Apply the patch; restart_all. 6. Repeat p. 3 and 4. Note that no new notice has been generated. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173200|0 |1 is obsolete| | --- Comment #4 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 173228 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173228&action=edit Bug 38235: Unit tests BTW, tiny adjustments to existing tests to work with modified C4::Suggestions::ModSuggestion. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA QA Contact|testopia@bugs.koha-communit |aleisha@catalyst.net.nz |y.org | CC| |aleisha@catalyst.net.nz --- Comment #5 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Hello, I was QAing this but I can't seem to reproduce the original problem and generate a second notice. Can you please provide a clearer test plan? Maybe too much ambiguity. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #6 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Aleisha Amohia from comment #5)
Hello, I was QAing this but I can't seem to reproduce the original problem and generate a second notice.
Can you please provide a clearer test plan? Maybe too much ambiguity.
Hello Aleisha, Thank you for your interest. Please, confirm that you are using the default KTD settings and that in p. 2 you can see the notice "Suggested purchase available". If yes, in p. 3.: a) Create a new basket (select a vendor and then: New -> Basket). b) Add to basket --> From an existing record: [make a search for the record created from the suggestion from p. 1). c) From the record view: Add order (grayish action menu at the top). d) Pick Koha item type ; Add item ; select Fund ; Save. e) Close basket. f) Receive shipments. g) Enter Vendor invoice # ; proceed with next. h) Click Receive. i) Click Edit. j) Mark checkbox "Receive?" and Confirm. k) Finish receiving. Proceed to p. 4: Go to the account of the patron that made the original suggestion and check the notices. Note the second, irrelevant letter "Suggested purchase available". I hope you will be able to reproduce the issue now. Could you confirm please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 --- Comment #7 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Janusz Kaczmarek from comment #6)
I hope you will be able to reproduce the issue now. Could you confirm please?
Yes thank you! I don't know what I did differently this time but I can confirm I saw the second irrelevant notice this time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173227|0 |1 is obsolete| | --- Comment #8 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 174391 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174391&action=edit Bug 38235: Suggestion confirmation letter sent when it should not When processing a new order (creating basket, receiving order, etc.) using a bibliographic record once already linked to an old suggestion (already completed in the past), Koha generates and sends a confirmation letter that should not be sent at all. This is because suggestions in Koha are linked to a biblionumber (and not the order), and so the old suggestion is identified - erroneously - as relevant. Then C4::Suggestions::ModSuggestion sends a letter whenever it receives STATUS as a parameter, paying no attention to whether the status is changed. So, in this case, a suggestion already in the status AVAILABLE is "updated" to the status AVAILABLE and the letter is generated. To solve this problem, it should be enough to check whether STATUS is actually changed. Test plan: ========== 1. As a patron, make a purchase suggestion. As a librarian, accept it and process it, as usual, through the acquisition process. 2. At the patron account, as librarian, check the generated notices (the most recent should be "Suggested purchase available"). 3. Make a new aquisition order for the same bibliographic record ("From an existing record:") and receive it as usual. 4. Go to the account of the patron that made the original suggestion and check the notices. Note the second, irrelevant letter "Suggested purchase available". 5. Apply the patch; restart_all. 6. Repeat p. 3 and 4. Note that no new notice has been generated. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173228|0 |1 is obsolete| | --- Comment #9 from Aleisha Amohia <aleisha@catalyst.net.nz> --- Created attachment 174392 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174392&action=edit Bug 38235: Unit tests BTW, tiny adjustments to existing tests to work with modified C4::Suggestions::ModSuggestion. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement prevents a release notes| |patron who made a | |suggestion from being | |notified again if their | |suggested record is | |reordered. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38235 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to main |RESOLVED CC| |lucas@bywatersolutions.com --- Comment #11 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Merge conflicst with 24.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org