Bug 27120 - Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'
Summary: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Plugin architecture (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Fridolin Somers
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on: 27114
Blocks:
  Show dependency treegraph
 
Reported: 2020-12-01 08:24 UTC by Fridolin Somers
Modified: 2021-12-13 21:10 UTC (History)
5 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:
21.05.00,20.11.06,20.05.12
Circulation function:


Attachments
Sample plugin (2.63 KB, application/octet-stream)
2020-12-01 08:30 UTC, Fridolin Somers
Details
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab' (2.42 KB, patch)
2020-12-01 08:31 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab' (2.47 KB, patch)
2021-03-11 08:10 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 27120: (follow-up) also send biblionumber (1.05 KB, patch)
2021-03-11 08:15 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab' (2.52 KB, patch)
2021-04-02 08:12 UTC, David Nind
Details | Diff | Splinter Review
Bug 27120: (follow-up) also send biblionumber (1.10 KB, patch)
2021-04-02 08:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab' (2.59 KB, patch)
2021-04-16 13:37 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 27120: (follow-up) also send biblionumber (1.17 KB, patch)
2021-04-16 13:38 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2020-12-01 08:24:35 UTC
Koha plugins hook 'intranet_catalog_biblio_tab' should have the datas of the current biblio record.
Koha::Biblio is aleady in template, send it with hooks call.

Depends on Bug 27114
Comment 1 Fridolin Somers 2020-12-01 08:30:33 UTC
Created attachment 114061 [details]
Sample plugin

Sample plugin for test plan
Comment 2 Fridolin Somers 2020-12-01 08:31:09 UTC
Created attachment 114062 [details] [review]
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'

Koha plugins hook 'intranet_catalog_biblio_tab' should have the datas of the current biblio record.
Koha::Biblio is aleady in template, send it with hooks call.

This will be very usefull to be able to fetch external datas
(wikipedia, youtube, ...) depending on current biblio record.

Test plan :
1) Enable Koha plugins
2) Install plugin attached to this bug
3) Go to staff interface on a biblio record details page
4) Check you see tab 1 containing 'Tab for record {title}'
5) Check you see tab 2 containing 'Tab for record {isbn}'
Comment 3 Martin Renvoize (ashimema) 2021-03-09 17:01:18 UTC
Looks great.. sorry Fridolin.. sha1 issue on apply though.
Comment 4 Fridolin Somers 2021-03-11 08:10:43 UTC
Created attachment 118085 [details] [review]
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'

Koha plugins hook 'intranet_catalog_biblio_tab' should have the datas of the current biblio record.
Koha::Biblio is aleady in template, send it with hooks call.

This will be very usefull to be able to fetch external datas
(wikipedia, youtube, ...) depending on current biblio record.

Test plan :
1) Enable Koha plugins
2) Install plugin attached to this bug
3) Go to staff interface on a biblio record details page
4) Check you see tab 1 containing 'Tab for record {title}'
5) Check you see tab 2 containing 'Tab for record {isbn}'
Comment 5 Fridolin Somers 2021-03-11 08:15:57 UTC
Created attachment 118086 [details] [review]
Bug 27120: (follow-up) also send biblionumber

Like in after_biblio_action hook
Comment 6 David Nind 2021-04-02 08:12:54 UTC
Created attachment 119096 [details] [review]
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'

Koha plugins hook 'intranet_catalog_biblio_tab' should have the datas of the current biblio record.
Koha::Biblio is aleady in template, send it with hooks call.

This will be very usefull to be able to fetch external datas
(wikipedia, youtube, ...) depending on current biblio record.

Test plan :
1) Enable Koha plugins
2) Install plugin attached to this bug
3) Go to staff interface on a biblio record details page
4) Check you see tab 1 containing 'Tab for record {title}'
5) Check you see tab 2 containing 'Tab for record {isbn}'

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2021-04-02 08:13:00 UTC
Created attachment 119098 [details] [review]
Bug 27120: (follow-up) also send biblionumber

Like in after_biblio_action hook

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2021-04-02 08:17:59 UTC
Note: For steps 4 and 5 the new tabs contain "This is content for tab 1" and "This is content for tab 2". Have signed-off on the basis that this is what was expected.
Comment 9 Kyle M Hall (khall) 2021-04-16 13:37:53 UTC
Created attachment 119734 [details] [review]
Bug 27120: Send biblio to Koha plugins hook 'intranet_catalog_biblio_tab'

Koha plugins hook 'intranet_catalog_biblio_tab' should have the datas of the current biblio record.
Koha::Biblio is aleady in template, send it with hooks call.

This will be very usefull to be able to fetch external datas
(wikipedia, youtube, ...) depending on current biblio record.

Test plan :
1) Enable Koha plugins
2) Install plugin attached to this bug
3) Go to staff interface on a biblio record details page
4) Check you see tab 1 containing 'Tab for record {title}'
5) Check you see tab 2 containing 'Tab for record {isbn}'

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Kyle M Hall (khall) 2021-04-16 13:38:50 UTC
Created attachment 119735 [details] [review]
Bug 27120: (follow-up) also send biblionumber

Like in after_biblio_action hook

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Jonathan Druart 2021-04-22 12:39:44 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 12 Fridolin Somers 2021-04-29 13:49:26 UTC
Pushed to 20.11.x for 20.11.06
Comment 13 Victor Grousset/tuxayo 2021-05-24 17:02:49 UTC
Note: it was pushed to 20.05.x for 20.05.12
Comment 14 Victor Grousset/tuxayo 2021-05-24 17:02:57 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.