Bug 41010 - Incorrect show_priority condition in opac-detail
Summary: Incorrect show_priority condition in opac-detail
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on: 39276 39452
Blocks: 30633
  Show dependency treegraph
 
Reported: 2025-10-14 09:43 UTC by Jonathan Druart
Modified: 2025-10-14 10:07 UTC (History)
0 users

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


Attachments
Bug 41010: Adjust show_priority condition in opac-detail (1.69 KB, patch)
2025-10-14 09:50 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 Jonathan Druart 2025-10-14 09:43:43 UTC
From bug 39276 comment 12

I don't understand this patch.

Here is the diff:
+                    [% ELSIF show_priority %]
+                        <td class="holds_priority">[% priority | html %] </td>
                     [% END %]

Here is the context:
                    [% IF item_level_holds > 0 || show_priority %]
                        <td class="holds_count">
                            [% IF holds_count.defined %][% ITEM_RESULT.holds_count | html %][% END %]
                            [% IF ITEM_RESULT.priority %]
                                [% IF holds_count.defined %]
                                    <span>(priority [% ITEM_RESULT.priority | html %])</span>
                                [% ELSE %]
                                    <span>[% ITEM_RESULT.priority | html %]</span>
                                [% END %]
                            [% END %]
                        </td>
                    [% ELSIF show_priority %]
                        <td class="holds_priority">[% priority | html %] </td>
                    [% END %]

we never reach the ELSIF, we have || show_priority in the first condition.
Comment 1 Jonathan Druart 2025-10-14 09:50:01 UTC
Created attachment 187855 [details] [review]
Bug 41010: Adjust show_priority condition in opac-detail

We had
[% IF item_level_holds > 0 || show_priority %]
[% ELSIF show_priority %]

We never reach ELSIF.

I am not sure what's the correct fix here. People involved on bug 39276
should help.
Comment 2 Jonathan Druart 2025-10-14 10:07:51 UTC
Bug 39276 clashed with bug 39452.

The changes from bug 39452 was totally unrelated to the rest of the patch

-                    [% IF item_level_holds > 0 %]
+                    [% IF item_level_holds > 0 || show_priority %]

Lucas and Nick, please clarify.