Bug 21740

Summary: Fixed-length fields show _ instead of @ when editing subfields
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: TemplatesAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Josef Moravec <josef.moravec>
Severity: normal    
Priority: P5 - low CC: arouss1980, fridolin.somers, josef.moravec, katrin.fischer, martin.renvoize, nick, pierre-marc.thibault
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 21770    
Attachments: Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks
Bug 21740: (QA follow-up) Make tests aware of special hrefs
Bug 21749: Add tests for ImportFramework
Bug 21749: Fix import of CSV biblio framework

Description Tomás Cohen Arazi 2018-10-31 14:49:06 UTC
To reproduce:
- Open the MARC structure for any bibliographic MARC framework
- Choose Actions > Subfields on any fixed-length field
=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well.
- Cancel
=> SUCCESS: '@' is displayed on the list
Comment 1 Tomás Cohen Arazi 2018-10-31 14:57:03 UTC
Created attachment 81733 [details] [review]
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks

This is a consistency issue: we store '@' as the subfield for
fixed-lenght fields, yet on editing '_' is displayed (on the form and
the tab). This was probably done to avoid URI encoding problems in the
past.

This patch restores the '@' everywhere.

To test:
- Open the MARC structure for any bibliographic MARC framework
- Choose Actions > Subfields on any fixed-length field
=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well.
- Cancel
=> SUCCESS: '@' is displayed on the list
- Apply this patch
- Restart all the things:
  $ restart_all
- Choose Actions > Subfields on any fixed-length field
=> SUCCESS: '@' is displayed in the tab title, and on the 'Subfield
code' form field.
- Save some changes
=> SUCCESS: Things work correctly.
- Sign off :-D
Comment 2 Pierre-Marc Thibault 2018-11-02 19:59:06 UTC
Created attachment 81920 [details] [review]
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks

This is a consistency issue: we store '@' as the subfield for
fixed-lenght fields, yet on editing '_' is displayed (on the form and
the tab). This was probably done to avoid URI encoding problems in the
past.

This patch restores the '@' everywhere.

To test:
- Open the MARC structure for any bibliographic MARC framework
- Choose Actions > Subfields on any fixed-length field
=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well.
- Cancel
=> SUCCESS: '@' is displayed on the list
- Apply this patch
- Restart all the things:
  $ restart_all
- Choose Actions > Subfields on any fixed-length field
=> SUCCESS: '@' is displayed in the tab title, and on the 'Subfield
code' form field.
- Save some changes
=> SUCCESS: Things work correctly.
- Sign off :-D

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Comment 3 ByWater Sandboxes 2018-11-02 21:05:46 UTC
Created attachment 81923 [details] [review]
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks

This is a consistency issue: we store '@' as the subfield for
fixed-lenght fields, yet on editing '_' is displayed (on the form and
the tab). This was probably done to avoid URI encoding problems in the
past.

This patch restores the '@' everywhere.

To test:
- Open the MARC structure for any bibliographic MARC framework
- Choose Actions > Subfields on any fixed-length field
=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well.
- Cancel
=> SUCCESS: '@' is displayed on the list
- Apply this patch
- Restart all the things:
  $ restart_all
- Choose Actions > Subfields on any fixed-length field
=> SUCCESS: '@' is displayed in the tab title, and on the 'Subfield
code' form field.
- Save some changes
=> SUCCESS: Things work correctly.
- Sign off :-D

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Comment 4 Josef Moravec 2018-11-05 06:59:25 UTC
Created attachment 81925 [details] [review]
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks

This is a consistency issue: we store '@' as the subfield for
fixed-lenght fields, yet on editing '_' is displayed (on the form and
the tab). This was probably done to avoid URI encoding problems in the
past.

This patch restores the '@' everywhere.

To test:
- Open the MARC structure for any bibliographic MARC framework
- Choose Actions > Subfields on any fixed-length field
=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well.
- Cancel
=> SUCCESS: '@' is displayed on the list
- Apply this patch
- Restart all the things:
  $ restart_all
- Choose Actions > Subfields on any fixed-length field
=> SUCCESS: '@' is displayed in the tab title, and on the 'Subfield
code' form field.
- Save some changes
=> SUCCESS: Things work correctly.
- Sign off :-D

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Nick Clemens 2018-11-05 14:55:31 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Tomás Cohen Arazi 2018-11-06 13:20:56 UTC Comment hidden (obsolete)
Comment 7 Tomás Cohen Arazi 2018-11-06 13:42:51 UTC
Moved the follow-up patch into its own bug (Bug 21770)
Comment 8 Tomás Cohen Arazi 2018-11-12 18:06:49 UTC Comment hidden (obsolete)
Comment 9 Tomás Cohen Arazi 2018-11-12 18:06:56 UTC Comment hidden (obsolete)
Comment 10 Martin Renvoize 2018-11-16 12:22:28 UTC
Pushed to 18.05.x for 18.05.06
Comment 11 Fridolin Somers 2018-11-28 14:23:20 UTC
Pushed to 17.11.x for 17.11.13

This looks like a very old strange behavior. Thanks @all ;)