Bug 34357 - Subroutine Koha::ItemType::SUPER::imageurl redefined
Summary: Subroutine Koha::ItemType::SUPER::imageurl redefined
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Marcel de Rooy
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 33745
Blocks:
  Show dependency treegraph
 
Reported: 2023-07-24 14:09 UTC by Marcel de Rooy
Modified: 2023-12-28 20:47 UTC (History)
3 users (show)

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


Attachments
Bug 34357: Replace SUPER->imageurl in ItemTypes (2.11 KB, patch)
2023-07-24 14:10 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 34357: Replace SUPER->imageurl in ItemTypes (2.14 KB, patch)
2023-07-24 15:46 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34357: Replace SUPER->imageurl in ItemTypes (2.19 KB, patch)
2023-07-29 19:35 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 Marcel de Rooy 2023-07-24 14:09:50 UTC
This becomes visible since Bug 33745: Lazily create attribute accessor methods in AUTOLOAD.

Note that Koha::ItemType was introduced with an unneeded SUPER reference on commit db2a1aa0dda1c786c34c3cf239fccfcaedefd094:
+sub image_location {
+    my ( $self, $interface ) = @_;
+    return C4::Koha::getitemtypeimagelocation( $interface, $self->SUPER::imageurl );
+}

We should just use $self->imageurl.
Comment 1 Marcel de Rooy 2023-07-24 14:10:29 UTC
Created attachment 153838 [details] [review]
Bug 34357: Replace SUPER->imageurl in ItemTypes

Test plan:
Run t/db_dependent/Koha/ItemTypes.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2023-07-24 14:11:43 UTC
(In reply to Marcel de Rooy from comment #0)
> Note that Koha::ItemType was introduced with an unneeded SUPER reference on
> commit db2a1aa0dda1c786c34c3cf239fccfcaedefd094:
> +sub image_location {
> +    my ( $self, $interface ) = @_;
> +    return C4::Koha::getitemtypeimagelocation( $interface,
> $self->SUPER::imageurl );
> +}

Any idea why this was introduced like that, Jonathan?
Comment 3 Jonathan Druart 2023-07-24 15:46:02 UTC
Created attachment 153844 [details] [review]
Bug 34357: Replace SUPER->imageurl in ItemTypes

Test plan:
Run t/db_dependent/Koha/ItemTypes.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2023-07-24 15:46:32 UTC
(In reply to Marcel de Rooy from comment #2)
> (In reply to Marcel de Rooy from comment #0)
> > Note that Koha::ItemType was introduced with an unneeded SUPER reference on
> > commit db2a1aa0dda1c786c34c3cf239fccfcaedefd094:
> > +sub image_location {
> > +    my ( $self, $interface ) = @_;
> > +    return C4::Koha::getitemtypeimagelocation( $interface,
> > $self->SUPER::imageurl );
> > +}
> 
> Any idea why this was introduced like that, Jonathan?

No idea, that does not seem to make sense here.
Comment 5 Katrin Fischer 2023-07-29 19:35:18 UTC
Created attachment 154060 [details] [review]
Bug 34357: Replace SUPER->imageurl in ItemTypes

Test plan:
Run t/db_dependent/Koha/ItemTypes.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Tomás Cohen Arazi 2023-08-15 09:14:18 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-08-17 19:32:41 UTC
Depends on Bug 33745 not in 23.05.x