[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2023-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #158063|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2023-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #10 from Marcel de Rooy  ---
Created attachment 158233
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158233=edit
Bug 19097: Adjust some GetMarcFromKohaField calls

We need to:
[1] Remove obsolete framework parameters if any (yes there are).
[2] Check scalar context calls if any (most probably not).

Ad 1:
How to find them? Git grep and look at each hit. You will need the -C
parameter to add a few context lines around the call even.

Found one in C4/Biblio.pm and six in Suggestions.t with ''.
Found one in C4/Items on a second line. Similar one in Koha/EDI.
Note: sub receipt_items in EDI has no unit tests yet.

Also did a few git searches like:
git grep GetMarcFromKohaField | grep -v -P "GetMarcFromKohaField.*;"| grep -P
"GetMarcFromKohaField\s*\("
Note: Seeing still three lines; they are all fine. Last line comes from
testing to trigger the warn.

Ad 2:
Have been looking at each git grep line and did not spot any
scalar context call. Before this report, we had an example in
POD and the Biblio test only.

Try to find them by performing smarter git searches?
Did look again at results for:
git grep GetMarcFromKohaField | grep -v -P
"\)\s*=\s*&?(C4::Biblio::)?GetMarcFromKohaField" | grep -v -P "use "
The tests from this grep are included in the last test plan line.

Test plan:
Read the patch.
Run t/db_dependent/Biblio/TransformHtmlToMarc.t
Run t/db_dependent/Items.t
Run t/db_dependent/Suggestions.t
Run prove t/Biblio2.t t/db_dependent/Biblio.t
t/db_dependent/Filter_MARC_ViewPolicy.t t/db_dependent/Koha/Authorities.t
t/db_dependent/Koha/Biblio/Metadata.t
t/db_dependent/Koha/Filter/EmbedItemsAvailability.t
t/db_dependent/Koha/SearchEngine/Search.t t/db_dependent/XISBN.t

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2023-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #9 from Marcel de Rooy  ---
Created attachment 158232
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158232=edit
Bug 19097: Remove wantarray from GetMarcFromKohaField

The routine should be called in list context now.
Warns also about use of obsoleted framework parameter. This
is the case for several years already btw. But may help us
catch a forgotten occurrence? Can be removed later.

In a follow-up we will check for second parameters and
we will update calls in scalar context.

Test plan:
Prove t/db_dependent/Biblio.t

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2023-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #8 from Marcel de Rooy  ---
Created attachment 158231
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158231=edit
Bug 19097: Remove wantarray from GetMarcSubfieldStructureFromKohaField

Replacing wantarray by always returning all mappings.
In a few cases only we expect multiple ones.
Changing two calls to pick the first hit, and add comment about
the implicit assumption being made (as before, no behavior change).

Test plan:
Look at results of git grep GetMarcSubfieldStructureFromKohaField
Run t/db_dependent/Biblio.t

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2023-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #7 from Marcel de Rooy  ---
(In reply to Katrin Fischer from comment #5)
> (In reply to Marcel de Rooy from comment #4)
> > (In reply to Marcel de Rooy from comment #3)
> > > Looks like bug 30813 did most of the work now.
> > 
> > But not all. Will make it more concrete.
> 
> ?

First patch addresses sub GetMarcSubfieldStructureFromKohaField.
Still another follow-up needed for GetMarcFromKohaField.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2023-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #6 from Marcel de Rooy  ---
Created attachment 158063
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158063=edit
Bug 19097: GetMarcSubfieldStructureFromKohaField - remove wantarray

Replacing wantarray by a list parameter.
Adding comment to calls where simply one return is assumed.

Test plan:
Look at results of git grep GetMarcSubfieldStructureFromKohaField
Run t/db_dependent/Biblio.t

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2023-09-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #5 from Katrin Fischer  ---
(In reply to Marcel de Rooy from comment #4)
> (In reply to Marcel de Rooy from comment #3)
> > Looks like bug 30813 did most of the work now.
> 
> But not all. Will make it more concrete.

?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2022-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #4 from Marcel de Rooy  ---
(In reply to Marcel de Rooy from comment #3)
> Looks like bug 30813 did most of the work now.

But not all. Will make it more concrete.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2022-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #3 from Marcel de Rooy  ---
Looks like bug 30813 did most of the work now.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2022-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

Marcel de Rooy  changed:

   What|Removed |Added

 CC||n...@bywatersolutions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2019-08-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097
Bug 19097 depends on bug 22721, which changed state.

Bug 22721 Summary: Normalize GetMarcFromKohaField calls
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22721

   What|Removed |Added

 Status|Pushed to master|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2019-04-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

Josef Moravec  changed:

   What|Removed |Added

 Depends on||22721


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22721
[Bug 22721] Normalize GetMarcFromKohaField calls
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2017-12-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097
Bug 19097 depends on bug 19096, which changed state.

Bug 19096 Summary: Koha to MARC mappings (Part 2): Make Default authoritative
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19096

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2017-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #2 from Marcel de Rooy  ---
Moving this QA comment on bug 19096 about sub GetMarcFromKohaField here also:

return wantarray ? @retval : ( @retval ? $retval[0] : undef ); 
This is not necessary, do not do that please.
Caller can do
my ( $v ) = the_sub();
Not blocker.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

2017-08-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

Marcel de Rooy  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|koha-b...@lists.koha-commun |m.de.r...@rijksmuseum.nl
   |ity.org |
Summary|Koha to MARC mappings Part  |Koha to MARC mappings (Part
   |3   |3): Correct remaining
   ||GetMarcFromKohaField and
   ||TransformMarcToKoha calls

--- Comment #1 from Marcel de Rooy  ---
After bug 19096, we will need some cleanup. This patch set does only remove
obsoleted parameters, so essentially it is a no-op.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/