Bug 38842 - Refactor modal logic in returns.tt / returns.pl
Summary: Refactor modal logic in returns.tt / returns.pl
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 38588 38789 38793
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-07 17:21 UTC by Emily Lamancusa (emlam)
Modified: 2025-01-07 17:21 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa (emlam) 2025-01-07 17:21:49 UTC
The logic for displaying modals on the checkin page is badly in need of refactoring. There are 10 separate modals coded in returns.tt, plus an additional 2 modal include files. There is also at least one parameter (found) that is duplicated for completely different meanings in different contexts, and several other similar-sounding parameters in different contexts whose meaning is no longer clear without code tracing how the value was assigned.

All of this leads to a lot of code duplication and error-prone code, and makes it very confusing to follow the template/controller logic when developing or debugging. We should refactor down to one modal with clear logic for filling in its contents.

See also comments on bug 38588