Bug 10689 - public note does not appear in subscriptions search
Summary: public note does not appear in subscriptions search
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-06 10:00 UTC by Fridolin Somers
Modified: 2014-05-26 21:04 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 10689 - public note does not appear in subscriptions search (2.74 KB, patch)
2013-08-06 10:24 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 10689 - public note does not appear in subscriptions search (2.99 KB, patch)
2013-08-06 10:28 UTC, Fridolin Somers
Details | Diff | Splinter Review
[PATCH][SIGNED OFF] Bug 10689 - public note does not appear in subscriptions search (3.07 KB, patch)
2013-09-13 20:36 UTC, Mathieu Saby
Details | Diff | Splinter Review
Bug 10689 - public note does not appear in new order form a subscription (1.29 KB, patch)
2013-09-18 13:15 UTC, Fridolin Somers
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10689 - public note does not appear in subscriptions search (3.12 KB, patch)
2013-09-29 16:45 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10689 - public note does not appear in new order form a subscription (1.47 KB, patch)
2013-09-29 16:45 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 10689 - public note does not appear in subscriptions search (3.32 KB, patch)
2013-09-29 17:32 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 10689 - public note does not appear in new order form a subscription (1.59 KB, patch)
2013-09-29 17:32 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 Fridolin Somers 2013-08-06 10:00:26 UTC
In a serials module, when searching subscriptions, the results table as a "Notes" column.
In TT code, you see that it tries to display public note "subscription.notes" and internal note "subscription.internalnotes".
Internal note is well displayed but not public note.
You can see the 2 notes in serial details in summary tab.
Comment 1 Fridolin Somers 2013-08-06 10:24:44 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2013-08-06 10:28:44 UTC Comment hidden (obsolete)
Comment 3 Mathieu Saby 2013-09-13 20:35:42 UTC
Hi Fridolyn.
It works well, so I sign off.

But I have found SearchSubscriptions is used 2 times in code : 
./serials/serials-search.pl
./acqui/newordersubscription.pl

So I think you need to make changes too to the template used by newordersubscription.pl (I have checked : there is always one note on this page).
Maybe in an other patch? 

Mathieu
Comment 4 Mathieu Saby 2013-09-13 20:36:46 UTC Comment hidden (obsolete)
Comment 5 Fridolin Somers 2013-09-18 13:15:48 UTC Comment hidden (obsolete)
Comment 6 I'm just a bot 2013-09-29 06:10:34 UTC
Patch applied cleanly, go forth and signoff
Comment 7 Bernardo Gonzalez Kriegel 2013-09-29 16:45:28 UTC Comment hidden (obsolete)
Comment 8 Bernardo Gonzalez Kriegel 2013-09-29 16:45:40 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2013-09-29 17:32:04 UTC
Created attachment 21602 [details] [review]
[PASSED QA] Bug 10689 - public note does not appear in subscriptions search

In a serials module, when searching subscriptions, the results table as a "Notes" column.
In TT code, you see that it tries to display public note "subscription.notes" and internal note "subscription.internalnotes".
Internal note is well displayed but not public note.
You can see the 2 notes in serial details in summary tab.

The problem commes from the SQL query. A join is perform on subscription and biblio, both containing a "notes" column.
This patch solves the problem by using a alias in query for both columns (biblio.notes is acutally not used in template but could be).

Test plan :
- Edit a subscription
- Add public and internal notes. For example : "too busy" and "on holiday"
- Perform a subscription search that returns this subscription
=> "Notes" column contains both notes. For example : "too busy (on holiday)"
- Test with only public note
- Test with only internal note

====
Works as described.
Signed-off-by:Mathieu Saby <mathieu.saby@uhb.fr>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Adding a sign

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.
Works as described, fixes a bug as the templates show that
the intention was to display both notes in the column.
Comment 10 Katrin Fischer 2013-09-29 17:32:18 UTC
Created attachment 21603 [details] [review]
[PASSED QA] Bug 10689 - public note does not appear in new order form a subscription

Test by creating a new order to a basket using "From a subscription" link

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works as described. No koha-qa errors

When creating a new basket from a susbcription, public note shows
on Notes column.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tiny enhancement, passes tests and QA script.
Works as described.
Comment 11 Galen Charlton 2013-10-11 04:28:23 UTC
Pushed to master, along with a follow-up that adds a regression test.  Thanks, Fridolyn!
Comment 12 Tomás Cohen Arazi (tcohen) 2013-11-19 18:03:03 UTC
This patch has been pushed to 3.12.x, will be in 3.12.7.

Thanks Fridolyn!