Bug 31214 - Regression: subfield code editable in MARC framework editor
Summary: Regression: subfield code editable in MARC framework editor
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Joonas Kylmälä
QA Contact: Testopia
URL:
Keywords:
Depends on: 5917
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-21 18:22 UTC by Joonas Kylmälä
Modified: 2022-08-09 10:51 UTC (History)
1 user (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


Attachments
Bug 31214: Make subfield code non-editable in MARC framework editor (2.81 KB, patch)
2022-08-07 11:44 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 31214: Make subfield code non-editable in MARC framework editor (2.86 KB, patch)
2022-08-07 11:59 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31214: Make subfield code non-editable in MARC framework editor (2.94 KB, patch)
2022-08-09 10:18 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-07-21 18:22:04 UTC
The Subfield code field is incorrectly editable in the MARC framework subfield configuration page, on e.g. on the page

http://localhost:8081/cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=003&frameworkcode= 

This is an regression from bug 5917 – When converting the old templating syntax to Template toolkit syntax some of the code was missed and the old syntax was left in the codebase. In marc koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt the following line should be fixed:

> [% IF ( subfieldcode == 0 || subfieldcode ) %]

it should be 

> [% IF ( loo.subfieldcode == 0 || loo.subfieldcode ) %]
Comment 1 Joonas Kylmälä 2022-07-21 18:35:02 UTC
Commit causing the regression: Bug 5917 : Swapping templates over (5884fb100071e973daf671a4ada6b32724376768)
Comment 2 Katrin Fischer 2022-07-22 07:51:35 UTC
We noticed this too and were torn between bug or feature, but it doesn't work right and isn't really useful.
Comment 3 Joonas Kylmälä 2022-08-07 11:44:17 UTC
Created attachment 138743 [details] [review]
Bug 31214: Make subfield code non-editable in MARC framework editor

The subfield code field became editable in framework
editor due to a regression that happened during the
switch from a previous template framework koha used
to the new Template toolkit framework currently in use:
Bug 5917 : Swapping templates over (5884fb100071e973daf671a4ada6b32724376768)
The regression happened due to the template syntax
not being updated to the new one in this particular
case.

Note: The subfield code field doesn't align with the
      other fields anymore after this patch. However,
      this alignment issue is in every other Koha form
      in intranet and should be fixed in the global
      CSS rules.

1) Apply patch
2) Browse to
   /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=995&frameworkcode=AR
3) Notice the subfield code is non-editable
4) Notice the subfield code is still editable in the New tab.
Comment 4 Katrin Fischer 2022-08-07 11:59:20 UTC
Created attachment 138744 [details] [review]
Bug 31214: Make subfield code non-editable in MARC framework editor

The subfield code field became editable in framework
editor due to a regression that happened during the
switch from a previous template framework koha used
to the new Template toolkit framework currently in use:
Bug 5917 : Swapping templates over (5884fb100071e973daf671a4ada6b32724376768)
The regression happened due to the template syntax
not being updated to the new one in this particular
case.

Note: The subfield code field doesn't align with the
      other fields anymore after this patch. However,
      this alignment issue is in every other Koha form
      in intranet and should be fixed in the global
      CSS rules.

1) Apply patch
2) Browse to
   /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=995&frameworkcode=AR
3) Notice the subfield code is non-editable
4) Notice the subfield code is still editable in the New tab.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2022-08-09 10:18:58 UTC
Created attachment 138891 [details] [review]
Bug 31214: Make subfield code non-editable in MARC framework editor

The subfield code field became editable in framework
editor due to a regression that happened during the
switch from a previous template framework koha used
to the new Template toolkit framework currently in use:
Bug 5917 : Swapping templates over (5884fb100071e973daf671a4ada6b32724376768)
The regression happened due to the template syntax
not being updated to the new one in this particular
case.

Note: The subfield code field doesn't align with the
      other fields anymore after this patch. However,
      this alignment issue is in every other Koha form
      in intranet and should be fixed in the global
      CSS rules.

1) Apply patch
2) Browse to
   /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=995&frameworkcode=AR
3) Notice the subfield code is non-editable
4) Notice the subfield code is still editable in the New tab.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Tomás Cohen Arazi 2022-08-09 10:51:43 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!