Bug 40556 - Subfields names in control fields should not be displayed/editable
Summary: Subfields names in control fields should not be displayed/editable
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Baptiste Wojtkowski (bwoj)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-30 15:08 UTC by Baptiste Wojtkowski (bwoj)
Modified: 2025-09-15 14:00 UTC (History)
3 users (show)

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 40556 - Subfields names in control fields should not be displayed/editable (4.10 KB, patch)
2025-07-30 15:12 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review
Bug 40556 - Subfields names in control fields should not be displayed/editable (3.16 KB, patch)
2025-09-04 17:55 UTC, Lin Wei
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Wojtkowski (bwoj) 2025-07-30 15:08:05 UTC
In cataloguing/addbiblio.pl, there is a conditionnal display of the subfield name field.
However, it is depending on subfield_loo.fixedfield, which is never set up. However, the field corresponding information is available in innerloo.fixedfield.


<input type="text"
        title="[% subfield_loo.marc_lib | $raw %]"
        style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]"
        name="tag_[% subfield_loo.tag | html %]_code_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]"
        value="[% subfield_loo.subfield | html %]"                                                             
        size="1"                                                             
                         


Moreover, following code does not make sense for control fields: 

<span class="handle">&#xf58e;</span>
Comment 1 Baptiste Wojtkowski (bwoj) 2025-07-30 15:12:13 UTC
Created attachment 184899 [details] [review]
Bug 40556 - Subfields names in control fields should not be displayed/editable

In cataloguing/addbiblio.pl, there is a conditionnal display of the subfield name field.
However, it is depending on subfield_loo.fixedfield, which is never set up. However, the field corresponding information is available in innerloo.fixedfield.

<input type="text"
        title="[% subfield_loo.marc_lib | $raw %]"
        style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]"
        name="tag_[% subfield_loo.tag | html %]_code_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]"
        value="[% subfield_loo.subfield | html %]"
        size="1"

Moreover, following code does not make sense for control fields:

<span class="handle">&#xf58e;</span>

TEST PLAN:
1 - Edit any record. Note that you can grab subfields, note you can edit
  the 00 in the subfield input
2 - Apply patch
3 - On the same page, you should not be able to grab or edit subfield
  titles.
Comment 2 Lin Wei 2025-09-04 17:55:10 UTC
Created attachment 186174 [details] [review]
Bug 40556 - Subfields names in control fields should not be displayed/editable

In cataloguing/addbiblio.pl, there is a conditionnal display of the subfield name field.
However, it is depending on subfield_loo.fixedfield, which is never set up. However, the field corresponding information is available in innerloo.fixedfield.

<input type="text"
        title="[% subfield_loo.marc_lib | $raw %]"
        style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]"
        name="tag_[% subfield_loo.tag | html %]_code_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]"
        value="[% subfield_loo.subfield | html %]"
        size="1"

Moreover, following code does not make sense for control fields:

<span class="handle">&#xf58e;</span>

TEST PLAN:
1 - Edit any record. Note that you can grab subfields, note you can edit
  the 00 in the subfield input
2 - Apply patch
3 - On the same page, you should not be able to grab or edit subfield
  titles.

Signed-off-by: Ludovic julien <ludovic.julien@inLibro.com>
Comment 3 Jonathan Druart 2025-09-15 14:00:59 UTC
-                                                        <span class="handle">&#xf58e;</span>
+                                                       [% UNLESS ( innerloo.fixedfield ) %] <span class="handle">&#xf58e;</span> [% END %]

Please tidy (missing space before '[%' then you have 2 extra spaces around the span) and run the QA script