Bug 30828 - Remove unused variable in placerequest.pl
Summary: Remove unused variable in placerequest.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Joonas Kylmälä
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-21 19:20 UTC by Joonas Kylmälä
Modified: 2023-06-08 22:26 UTC (History)
8 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:
22.11.00, 22.05.01, 21.11.07


Attachments
Bug 30828: remove useless type parameter in placerequest.pl (2.13 KB, patch)
2022-05-21 19:25 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 30828: remove useless type parameter in placerequest.pl (2.18 KB, patch)
2022-05-23 17:39 UTC, David Nind
Details | Diff | Splinter Review
Bug 30828: Remove useless 'type' parameter in placerequest.pl (2.29 KB, patch)
2022-05-31 06:55 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Kylmälä 2022-05-21 19:20:06 UTC
placerequest.pl contains an useless check "$type eq 'str8'" which doesn't do anything. This should be removed.
Comment 1 Joonas Kylmälä 2022-05-21 19:25:21 UTC
Created attachment 135257 [details] [review]
Bug 30828: remove useless type parameter in placerequest.pl

To test:
 1) Grep for placerequest.pl in the source code and check that
    request.tt is the only place where the type parameter is passed.
Comment 2 Michal Urban 2022-05-23 17:37:11 UTC
Tested and signed off by Michal Urban
Comment 3 Michal Urban 2022-05-23 17:37:59 UTC
Tested and signed off by Michal Urban
Comment 4 David Nind 2022-05-23 17:39:48 UTC
Created attachment 135283 [details] [review]
Bug 30828: remove useless type parameter in placerequest.pl

To test:
 1) Grep for placerequest.pl in the source code and check that
    request.tt is the only place where the type parameter is passed.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2022-05-23 17:42:59 UTC
Testing notes:

1. Before applying patch: git grep "$type eq 'str8'"

2. Should only find one occurrence in reserve/placerequest.pl  

3 After applying patch, no occurences.
Comment 6 David Nind 2022-05-23 17:44:50 UTC
(In reply to Michal Urban from comment #3)
> Tested and signed off by Michal Urban

Hi Michal.

Looks like we were both testing at the same time!

Hopefully the QA Team can add your sign off to the patch.

David
Comment 7 Michal Urban 2022-05-23 17:48:18 UTC
(In reply to David Nind from comment #6)
> (In reply to Michal Urban from comment #3)
> > Tested and signed off by Michal Urban
> 
> Hi Michal.
> 
> Looks like we were both testing at the same time!
> 
> Hopefully the QA Team can add your sign off to the patch.
> 
> David

Haha what a coincidence.

Thanks David, this was my first test so I wasn’t sure what to do but I’ll make sure to add test notes like you did next time. :)
Comment 8 Jonathan Druart 2022-05-31 06:55:21 UTC
Created attachment 135467 [details] [review]
Bug 30828: Remove useless 'type' parameter in placerequest.pl

To test:
 1) Grep for placerequest.pl in the source code and check that
    request.tt is the only place where the type parameter is passed.

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

JD amended patch: adjust commit title
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2022-05-31 06:56:03 UTC
Funky historical weirdness...
Comment 10 Tomás Cohen Arazi 2022-06-01 19:10:14 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 11 Lucas Gass 2022-06-10 14:52:38 UTC
Pushed to 22.05.x for 22.05.01
Comment 12 Arthur Suzuki 2022-06-21 10:38:23 UTC
thx, pushed to 21.11.x for 21.11.07
Comment 13 Victor Grousset/tuxayo 2022-06-25 23:53:17 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.