Bug 27266 - Move C4::Biblio::GetMarcAuthors to Koha namespace
Summary: Move C4::Biblio::GetMarcAuthors to Koha namespace
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 3150 29421 29652 29690
  Show dependency treegraph
 
Reported: 2020-12-17 23:07 UTC by Aleisha Amohia
Modified: 2021-12-17 14:54 UTC (History)
7 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancment moves C4::Biblio::GetMarcAuthors to Koha::Biblio->get_marc_authors. This is so the method can be used in templates and notices.
Version(s) released in:
22.05.00


Attachments
Bug 27266: Move GetMarcAuthors to Koha namespace (17.91 KB, patch)
2020-12-18 01:11 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.73 KB, patch)
2020-12-21 21:38 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.78 KB, patch)
2021-02-24 06:24 UTC, David Nind
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.30 KB, patch)
2021-03-16 11:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.44 KB, patch)
2021-03-16 11:35 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.76 KB, patch)
2021-07-21 21:25 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Rename to get_marc_authors (6.39 KB, patch)
2021-07-21 21:25 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove instances of GetMarcAuthors (3.70 KB, patch)
2021-07-21 22:16 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.74 KB, patch)
2021-07-22 07:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Rename to get_marc_authors (6.46 KB, patch)
2021-07-22 07:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove instances of GetMarcAuthors (3.76 KB, patch)
2021-07-22 07:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME (1017 bytes, patch)
2021-07-22 20:30 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.99 KB, patch)
2021-09-29 04:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Rename to get_marc_authors (6.31 KB, patch)
2021-09-29 04:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove instances of GetMarcAuthors (3.76 KB, patch)
2021-09-29 04:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME (1017 bytes, patch)
2021-09-29 04:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Show MARC author notes (4.08 KB, patch)
2021-09-29 04:48 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.85 KB, patch)
2021-09-29 22:34 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Rename to get_marc_authors (6.31 KB, patch)
2021-09-29 22:34 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove instances of GetMarcAuthors (3.76 KB, patch)
2021-09-29 22:34 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME (1017 bytes, patch)
2021-09-29 22:34 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail (1.34 KB, patch)
2021-09-29 22:34 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.88 KB, patch)
2021-10-05 07:51 UTC, David Nind
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Rename to get_marc_authors (6.36 KB, patch)
2021-10-05 07:52 UTC, David Nind
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove instances of GetMarcAuthors (3.81 KB, patch)
2021-10-05 07:52 UTC, David Nind
Details | Diff | Splinter Review
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME (1.04 KB, patch)
2021-10-05 07:52 UTC, David Nind
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail (1.39 KB, patch)
2021-10-05 07:52 UTC, David Nind
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (17.95 KB, patch)
2021-10-19 20:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Rename to get_marc_authors (6.36 KB, patch)
2021-10-19 20:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove instances of GetMarcAuthors (3.81 KB, patch)
2021-10-19 20:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME (1.04 KB, patch)
2021-10-19 20:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail (1.45 KB, patch)
2021-10-19 20:24 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (18.14 KB, patch)
2021-11-05 08:27 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Rename to get_marc_authors (6.47 KB, patch)
2021-11-05 08:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove instances of GetMarcAuthors (3.90 KB, patch)
2021-11-05 08:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME (1.14 KB, patch)
2021-11-05 08:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail (1.54 KB, patch)
2021-11-05 08:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts (4.09 KB, patch)
2021-11-05 08:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Indentation in opac-sendshelf (1.49 KB, patch)
2021-11-05 08:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Remove GetBiblioData from sendshelf too (2.56 KB, patch)
2021-11-05 08:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts (4.24 KB, patch)
2021-11-05 08:38 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Indentation in opac-sendshelf (1.49 KB, patch)
2021-11-05 08:38 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Remove GetBiblioData from sendshelf too (2.56 KB, patch)
2021-11-05 08:38 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: Move GetMarcAuthors to Koha namespace (18.12 KB, patch)
2021-11-12 07:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Rename to get_marc_authors (6.47 KB, patch)
2021-11-12 07:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove instances of GetMarcAuthors (3.90 KB, patch)
2021-11-12 07:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME (1.14 KB, patch)
2021-11-12 07:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail (1.53 KB, patch)
2021-11-12 07:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts (4.24 KB, patch)
2021-11-12 07:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Indentation in opac-sendshelf (1.49 KB, patch)
2021-11-12 07:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 27266: (QA follow-up) Remove GetBiblioData from sendshelf too (2.56 KB, patch)
2021-11-12 07:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2020-12-17 23:07:58 UTC

    
Comment 1 Aleisha Amohia 2020-12-18 01:11:49 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2020-12-21 21:38:54 UTC
Created attachment 114580 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
6. Set the OPACXSLTDetailsDisplay system preference to empty (for no
xslt)
7. Log in to the OPAC. Find the record and add it to the cart and a list
8. View the cart and click 'more details'. Confirm authors show as
normal.
9. Click 'send' and confirm the email sent shows the authors as normal.
10. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
11. View the record detail page and confirm the authors show as normal.
12. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Comment 3 David Nind 2021-02-24 06:24:33 UTC
Created attachment 117239 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
6. Set the OPACXSLTDetailsDisplay system preference to empty (for no
xslt)
7. Log in to the OPAC. Find the record and add it to the cart and a list
8. View the cart and click 'more details'. Confirm authors show as
normal.
9. Click 'send' and confirm the email sent shows the authors as normal.
10. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
11. View the record detail page and confirm the authors show as normal.
12. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2021-02-24 06:43:08 UTC
Notes from testing with koha-testing-docker:

- I couldn't send email (it comes up with an error message when you click on the send buttons - problem sending email). I didn't have this issue when testing bug 3150, so I applied that and everything worked as expected with the test plan.

- To review the email I copied the HTML from the database (koha-mysql kohadev, select * from message_queue;) and saved it as an HTML file.
Comment 5 Martin Renvoize 2021-03-16 11:24:00 UTC
Sorry, this no longer applies.
Comment 6 Martin Renvoize 2021-03-16 11:31:45 UTC
Created attachment 118311 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
6. Set the OPACXSLTDetailsDisplay system preference to empty (for no
xslt)
7. Log in to the OPAC. Find the record and add it to the cart and a list
8. View the cart and click 'more details'. Confirm authors show as
normal.
9. Click 'send' and confirm the email sent shows the authors as normal.
10. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
11. View the record detail page and confirm the authors show as normal.
12. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2021-03-16 11:35:33 UTC
Created attachment 118312 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
6. Set the OPACXSLTDetailsDisplay system preference to empty (for no
xslt)
7. Log in to the OPAC. Find the record and add it to the cart and a list
8. View the cart and click 'more details'. Confirm authors show as
normal.
9. Click 'send' and confirm the email sent shows the authors as normal.
10. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
11. View the record detail page and confirm the authors show as normal.
12. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2021-03-16 11:35:52 UTC
Rebased
Comment 9 Martin Renvoize 2021-03-16 11:37:29 UTC
Tests pass, QA scripts pass and the code looks reasonable.

I'm not entirely sure about the method name.. we now have:

Koha::Biblio->get_marc_notes;

and

Koha::Biblio->get_authors_from_MARC;

For consistency, I think I'd prefer this patch to introduce

Koha::Biblio->get_marc_authors;

But... I think we can leave that decision to the RM.. so Passing QA :)
Comment 10 Marcel de Rooy 2021-06-25 08:59:10 UTC
(In reply to Martin Renvoize from comment #9)
> Tests pass, QA scripts pass and the code looks reasonable.
> 
> I'm not entirely sure about the method name.. we now have:
> 
> Koha::Biblio->get_marc_notes;
> 
> and
> 
> Koha::Biblio->get_authors_from_MARC;
> 
> For consistency, I think I'd prefer this patch to introduce
> 
> Koha::Biblio->get_marc_authors;
> 
> But... I think we can leave that decision to the RM.. so Passing QA :)

I would also prefer get_marc_authors.
Comment 11 Aleisha Amohia 2021-07-21 21:25:41 UTC
Created attachment 123017 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
6. Set the OPACXSLTDetailsDisplay system preference to empty (for no
xslt)
7. Log in to the OPAC. Find the record and add it to the cart and a list
8. View the cart and click 'more details'. Confirm authors show as
normal.
9. Click 'send' and confirm the email sent shows the authors as normal.
10. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
11. View the record detail page and confirm the authors show as normal.
12. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Aleisha Amohia 2021-07-21 21:25:45 UTC
Created attachment 123018 [details] [review]
Bug 27266: (QA follow-up) Rename to get_marc_authors
Comment 13 Aleisha Amohia 2021-07-21 22:16:31 UTC
Created attachment 123019 [details] [review]
Bug 27266: (follow-up) Remove instances of GetMarcAuthors
Comment 14 Martin Renvoize 2021-07-22 07:48:18 UTC
Created attachment 123026 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
6. Set the OPACXSLTDetailsDisplay system preference to empty (for no
xslt)
7. Log in to the OPAC. Find the record and add it to the cart and a list
8. View the cart and click 'more details'. Confirm authors show as
normal.
9. Click 'send' and confirm the email sent shows the authors as normal.
10. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
11. View the record detail page and confirm the authors show as normal.
12. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize 2021-07-22 07:48:22 UTC
Created attachment 123027 [details] [review]
Bug 27266: (QA follow-up) Rename to get_marc_authors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Martin Renvoize 2021-07-22 07:48:25 UTC
Created attachment 123028 [details] [review]
Bug 27266: (follow-up) Remove instances of GetMarcAuthors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 17 Martin Renvoize 2021-07-22 08:00:16 UTC
Comment on attachment 123026 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

Review of attachment 123026 [details] [review]:
-----------------------------------------------------------------

::: Koha/Biblio.pm
@@ +870,5 @@
> +    # tagslib useful only for UNIMARC author responsibilities
> +    my $tagslib;
> +    if ( $marcflavour eq "UNIMARC" ) {
> +        # FIXME : we don't have the framework available, we take the default framework. May be buggy on some setups, will be usually correct.
> +        $tagslib = C4::Biblio::GetMarcStructure( 1, '', { unsafe => 1 });

I wonder if we aught to fix the FIXME here?

$tagslib = C4::Biblio::GetMarcStructure( 1, $self->frameworkcode, { unsafe => 1 });
Comment 18 Aleisha Amohia 2021-07-22 20:27:46 UTC
(In reply to Martin Renvoize from comment #17)
> Comment on attachment 123026 [details] [review] [review]
> Bug 27266: Move GetMarcAuthors to Koha namespace
> 
> Review of attachment 123026 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: Koha/Biblio.pm
> @@ +870,5 @@
> > +    # tagslib useful only for UNIMARC author responsibilities
> > +    my $tagslib;
> > +    if ( $marcflavour eq "UNIMARC" ) {
> > +        # FIXME : we don't have the framework available, we take the default framework. May be buggy on some setups, will be usually correct.
> > +        $tagslib = C4::Biblio::GetMarcStructure( 1, '', { unsafe => 1 });
> 
> I wonder if we aught to fix the FIXME here?
> 
> $tagslib = C4::Biblio::GetMarcStructure( 1, $self->frameworkcode, { unsafe
> => 1 });

True, may as well. Follow-up on it's way.
Comment 19 Aleisha Amohia 2021-07-22 20:30:51 UTC
Created attachment 123067 [details] [review]
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME
Comment 20 Aleisha Amohia 2021-09-29 04:48:26 UTC
Created attachment 125440 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
6. Set the OPACXSLTDetailsDisplay system preference to empty (for no
xslt)
7. Log in to the OPAC. Find the record and add it to the cart and a list
8. View the cart and click 'more details'. Confirm authors show as
normal.
9. Click 'send' and confirm the email sent shows the authors as normal.
10. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
11. View the record detail page and confirm the authors show as normal.
12. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 21 Aleisha Amohia 2021-09-29 04:48:30 UTC
Created attachment 125441 [details] [review]
Bug 27266: (QA follow-up) Rename to get_marc_authors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 22 Aleisha Amohia 2021-09-29 04:48:34 UTC
Created attachment 125442 [details] [review]
Bug 27266: (follow-up) Remove instances of GetMarcAuthors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 23 Aleisha Amohia 2021-09-29 04:48:39 UTC
Created attachment 125443 [details] [review]
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME
Comment 24 Aleisha Amohia 2021-09-29 04:48:43 UTC
Created attachment 125444 [details] [review]
Bug 27266: (follow-up) Show MARC author notes
Comment 25 Aleisha Amohia 2021-09-29 22:34:20 UTC
Created attachment 125465 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
xslt)
6. Log in to the OPAC. Find the record and add it to the cart and a list
7. View the cart and click 'more details'. Confirm authors show as
normal.
8. Click 'send' and confirm the email sent shows the authors as normal.
9. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
10. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 26 Aleisha Amohia 2021-09-29 22:34:25 UTC
Created attachment 125466 [details] [review]
Bug 27266: (QA follow-up) Rename to get_marc_authors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 27 Aleisha Amohia 2021-09-29 22:34:29 UTC
Created attachment 125467 [details] [review]
Bug 27266: (follow-up) Remove instances of GetMarcAuthors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 28 Aleisha Amohia 2021-09-29 22:34:34 UTC
Created attachment 125468 [details] [review]
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME
Comment 29 Aleisha Amohia 2021-09-29 22:34:38 UTC
Created attachment 125469 [details] [review]
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail

There's no way to use 'no' XSLT now, so don't need to use this to show
authors on the detail page.
Comment 30 David Nind 2021-10-05 07:51:55 UTC
Created attachment 125719 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
xslt)
6. Log in to the OPAC. Find the record and add it to the cart and a list
7. View the cart and click 'more details'. Confirm authors show as
normal.
8. Click 'send' and confirm the email sent shows the authors as normal.
9. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
10. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Comment 31 David Nind 2021-10-05 07:52:03 UTC
Created attachment 125720 [details] [review]
Bug 27266: (QA follow-up) Rename to get_marc_authors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Nind <david@davidnind.com>
Comment 32 David Nind 2021-10-05 07:52:21 UTC
Created attachment 125721 [details] [review]
Bug 27266: (follow-up) Remove instances of GetMarcAuthors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Nind <david@davidnind.com>
Comment 33 David Nind 2021-10-05 07:52:27 UTC
Created attachment 125722 [details] [review]
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME

Signed-off-by: David Nind <david@davidnind.com>
Comment 34 David Nind 2021-10-05 07:52:32 UTC
Created attachment 125723 [details] [review]
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail

There's no way to use 'no' XSLT now, so don't need to use this to show
authors on the detail page.

Signed-off-by: David Nind <david@davidnind.com>
Comment 35 Aleisha Amohia 2021-10-19 20:24:38 UTC
Created attachment 126539 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
xslt)
6. Log in to the OPAC. Find the record and add it to the cart and a list
7. View the cart and click 'more details'. Confirm authors show as
normal.
8. Click 'send' and confirm the email sent shows the authors as normal.
9. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
10. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Nind <david@davidnind.com>
Comment 36 Aleisha Amohia 2021-10-19 20:24:43 UTC
Created attachment 126540 [details] [review]
Bug 27266: (QA follow-up) Rename to get_marc_authors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Nind <david@davidnind.com>
Comment 37 Aleisha Amohia 2021-10-19 20:24:47 UTC
Created attachment 126541 [details] [review]
Bug 27266: (follow-up) Remove instances of GetMarcAuthors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Nind <david@davidnind.com>
Comment 38 Aleisha Amohia 2021-10-19 20:24:52 UTC
Created attachment 126542 [details] [review]
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME

Signed-off-by: David Nind <david@davidnind.com>
Comment 39 Aleisha Amohia 2021-10-19 20:24:57 UTC
Created attachment 126543 [details] [review]
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail

There's no way to use 'no' XSLT now, so don't need to use this to show
authors on the detail page.

Signed-off-by: David Nind <david@davidnind.com>
Comment 40 Marcel de Rooy 2021-11-05 07:17:08 UTC
Looking here
Comment 41 Marcel de Rooy 2021-11-05 08:27:56 UTC
Created attachment 127330 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
xslt)
6. Log in to the OPAC. Find the record and add it to the cart and a list
7. View the cart and click 'more details'. Confirm authors show as
normal.
8. Click 'send' and confirm the email sent shows the authors as normal.
9. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
10. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 42 Marcel de Rooy 2021-11-05 08:28:00 UTC
Created attachment 127331 [details] [review]
Bug 27266: (QA follow-up) Rename to get_marc_authors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 43 Marcel de Rooy 2021-11-05 08:28:04 UTC
Created attachment 127332 [details] [review]
Bug 27266: (follow-up) Remove instances of GetMarcAuthors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 44 Marcel de Rooy 2021-11-05 08:28:09 UTC
Created attachment 127333 [details] [review]
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 45 Marcel de Rooy 2021-11-05 08:28:12 UTC
Created attachment 127334 [details] [review]
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail

There's no way to use 'no' XSLT now, so don't need to use this to show
authors on the detail page.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 46 Marcel de Rooy 2021-11-05 08:28:17 UTC Comment hidden (obsolete)
Comment 47 Marcel de Rooy 2021-11-05 08:28:21 UTC Comment hidden (obsolete)
Comment 48 Marcel de Rooy 2021-11-05 08:28:25 UTC Comment hidden (obsolete)
Comment 49 Marcel de Rooy 2021-11-05 08:38:50 UTC
Created attachment 127340 [details] [review]
Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts

We are adding (or already doing) a Koha::Biblios->find, so we should
get rid of GetBiblioData, fetching the same data.
It returned a few extra columns, but unused here:
    $dat->{bnotes}, $dat->{bi_notforloan}

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 50 Marcel de Rooy 2021-11-05 08:38:54 UTC
Created attachment 127341 [details] [review]
Bug 27266: (QA follow-up) Indentation in opac-sendshelf

Minimal fix to improve bad indentation a bit, moving to 2 spaces.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 51 Marcel de Rooy 2021-11-05 08:38:58 UTC
Created attachment 127342 [details] [review]
Bug 27266: (QA follow-up) Remove GetBiblioData from sendshelf too

Applies to opac and intranet script.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 52 Martin Renvoize 2021-11-09 13:25:33 UTC
I get 

Applying: Bug 27266: (follow-up) Remove get_marc_authors from opac-detail
error: sha1 information is lacking or useless (opac/opac-detail.pl).
error: could not build fake ancestor
Patch failed at 0001 Bug 27266: (follow-up) Remove get_marc_authors from opac-detail

Patch doesn't apply
Comment 53 Marcel de Rooy 2021-11-12 07:14:06 UTC
Applying: Bug 27266: Move GetMarcAuthors to Koha namespace
Using index info to reconstruct a base tree...
M       C4/Biblio.pm
M       opac/opac-detail.pl
Falling back to patching base and 3-way merge...
Auto-merging opac/opac-detail.pl
Auto-merging C4/Biblio.pm
Applying: Bug 27266: (QA follow-up) Rename to get_marc_authors
Applying: Bug 27266: (follow-up) Remove instances of GetMarcAuthors
Applying: Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME
Applying: Bug 27266: (follow-up) Remove get_marc_authors from opac-detail
Using index info to reconstruct a base tree...
M       opac/opac-detail.pl
Falling back to patching base and 3-way merge...
Auto-merging opac/opac-detail.pl
Applying: Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts
Applying: Bug 27266: (QA follow-up) Indentation in opac-sendshelf
Applying: Bug 27266: (QA follow-up) Remove GetBiblioData from sendshelf too
Comment 54 Marcel de Rooy 2021-11-12 07:14:37 UTC
Wait. I am on the wrong branch ;)
Comment 55 Marcel de Rooy 2021-11-12 07:16:33 UTC
Makes no difference:

Applying: Bug 27266: Move GetMarcAuthors to Koha namespace
Using index info to reconstruct a base tree...
M       C4/Biblio.pm
M       opac/opac-detail.pl
Falling back to patching base and 3-way merge...
Auto-merging opac/opac-detail.pl
Auto-merging C4/Biblio.pm
Applying: Bug 27266: (QA follow-up) Rename to get_marc_authors
Applying: Bug 27266: (follow-up) Remove instances of GetMarcAuthors
Applying: Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME
Applying: Bug 27266: (follow-up) Remove get_marc_authors from opac-detail
Using index info to reconstruct a base tree...
M       opac/opac-detail.pl
Falling back to patching base and 3-way merge...
Auto-merging opac/opac-detail.pl
Applying: Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts
Applying: Bug 27266: (QA follow-up) Indentation in opac-sendshelf
Applying: Bug 27266: (QA follow-up) Remove GetBiblioData from sendshelf too
Comment 56 Marcel de Rooy 2021-11-12 07:17:10 UTC
Created attachment 127561 [details] [review]
Bug 27266: Move GetMarcAuthors to Koha namespace

This patch moves C4::Biblio::GetMarcAuthors to
Koha::Biblio->get_authors_from_MARC. This is so the method can be
used in templates and notices.

To test:
1. Find a record that has an author in the added entry field (700-720).
2. Add the record to the cart and a list.
3. View your cart and click 'more details'. Confirm authors show as
normal.
4. Click 'send' and confirm the email sent shows the authors as normal.
5. Go to the list you added the record to and click 'send list'. Confirm
the email sent shows the authors as normal.
xslt)
6. Log in to the OPAC. Find the record and add it to the cart and a list
7. View the cart and click 'more details'. Confirm authors show as
normal.
8. Click 'send' and confirm the email sent shows the authors as normal.
9. Go to the list you added the record to and click 'send list'.
Confirm the email sent shows the authors as normal.
10. Confirm tests pass:
- t/Biblio.t
- t/db_dependent/Koha/Biblio.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 57 Marcel de Rooy 2021-11-12 07:17:14 UTC
Created attachment 127562 [details] [review]
Bug 27266: (QA follow-up) Rename to get_marc_authors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 58 Marcel de Rooy 2021-11-12 07:17:18 UTC
Created attachment 127563 [details] [review]
Bug 27266: (follow-up) Remove instances of GetMarcAuthors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 59 Marcel de Rooy 2021-11-12 07:17:21 UTC
Created attachment 127564 [details] [review]
Bug 27266: (follow-up) Using biblio frameworkcode to get rid of FIXME

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 60 Marcel de Rooy 2021-11-12 07:17:25 UTC
Created attachment 127565 [details] [review]
Bug 27266: (follow-up) Remove get_marc_authors from opac-detail

There's no way to use 'no' XSLT now, so don't need to use this to show
authors on the detail page.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 61 Marcel de Rooy 2021-11-12 07:17:29 UTC
Created attachment 127566 [details] [review]
Bug 27266: (QA follow-up) Remove GetBiblioData from basket scripts

We are adding (or already doing) a Koha::Biblios->find, so we should
get rid of GetBiblioData, fetching the same data.
It returned a few extra columns, but unused here:
    $dat->{bnotes}, $dat->{bi_notforloan}

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 62 Marcel de Rooy 2021-11-12 07:17:33 UTC
Created attachment 127567 [details] [review]
Bug 27266: (QA follow-up) Indentation in opac-sendshelf

Minimal fix to improve bad indentation a bit, moving to 2 spaces.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 63 Marcel de Rooy 2021-11-12 07:17:37 UTC
Created attachment 127568 [details] [review]
Bug 27266: (QA follow-up) Remove GetBiblioData from sendshelf too

Applies to opac and intranet script.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 64 Fridolin Somers 2021-12-14 06:29:48 UTC
Please have a look at Bug 29690.
We need to catch invalid metadata record so get_marc_authors() is concerned.
I'd like QA to confirm this is the correct way to implement.
Comment 65 Fridolin Somers 2021-12-15 22:16:27 UTC
(In reply to Fridolin Somers from comment #64)
> Please have a look at Bug 29690.
> We need to catch invalid metadata record so get_marc_authors() is concerned.
> I'd like QA to confirm this is the correct way to implement.

Since this one is already passed-QA I push it and will amend Bug 29690 for get_marc_authors().
Comment 66 Fridolin Somers 2021-12-15 22:18:16 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄