Bug 29321 - Remove a last without loop context
Summary: Remove a last without loop context
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Marcel de Rooy
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 23420
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-26 12:18 UTC by Marcel de Rooy
Modified: 2021-11-22 01:41 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.12


Attachments
Bug 29321: Reduce log size by dumping and truncating (6.09 KB, patch)
2021-10-26 14:54 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 29321: Remove a last without loop context (1.25 KB, patch)
2021-11-05 15:06 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 29321: Remove a last without loop context (1.31 KB, patch)
2021-11-11 20:50 UTC, Tomás Cohen Arazi
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 2021-10-26 12:18:07 UTC

    
Comment 1 Marcel de Rooy 2021-10-26 12:18:27 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2021-10-26 14:54:22 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2021-11-05 15:06:41 UTC
Created attachment 127396 [details] [review]
Bug 29321: Remove a last without loop context

This reads better when converted to regular if.
Note that last within such a block is allowed in Perl, but it feels
better to use it only in a loop context.

Test plan:
Read the patch ;)
Bonus: Test if you enter the block by using pref OPACSuggestionMandatoryFields
when adding a suggestion from opac.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2021-11-05 15:09:46 UTC
Self signoff
Comment 5 Tomás Cohen Arazi 2021-11-11 20:50:53 UTC
Created attachment 127555 [details] [review]
Bug 29321: Remove a last without loop context

This reads better when converted to regular if.
Note that last within such a block is allowed in Perl, but it feels
better to use it only in a loop context.

Test plan:
Read the patch ;)
Bonus: Test if you enter the block by using pref OPACSuggestionMandatoryFields
when adding a suggestion from opac.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Edit: Added a space between 'if' and '(' :-D
Comment 6 Jonathan Druart 2021-11-15 11:40:06 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 7 Kyle M Hall 2021-11-19 16:35:53 UTC
Pushed to 21.05.x for 21.05.05
Comment 8 Fridolin Somers 2021-11-20 00:14:32 UTC
Pushed to 20.11.x for 20.11.12
Comment 9 Victor Grousset/tuxayo 2021-11-22 01:41:42 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.