Bug 16503 - Label creator: grouping fields with quotes does not work in layout creator
Summary: Label creator: grouping fields with quotes does not work in layout creator
Status: RESOLVED DUPLICATE of bug 23900
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: 3.22
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Chris Nighswonger
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-11 19:31 UTC by Barton Chittenden
Modified: 2020-04-18 22:47 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barton Chittenden 2016-05-11 19:31:18 UTC
The description for "Data field" under label-edit-layout.pl shows

"Enter a comma separated list of fields to print. You may include any Koha field or MARC subfield.

See online help for advanced options

ex: barcode, itemcallnumber, title, "050a 050b", 300a

Fields homebranch_description, holdingbranch_description, ccode_description, location_description and permanent_location_description show description instead of code."

This seems to indicate that grouping fields using quotes, non-comma separated, *should* work:

Given an item with the following data:

         title: Juggling for the complete klutz /
        author: Cassidy, John.
itemcallnumber: JNF 793.8 Cas

Using the data fields 

"title author", itemcallnumber

Should yield a CSV export this:

"Juggling for the complete klutz / Cassidy, John.","JNF 793.8 Cas"

Instead I get this:

,"JNF 793.8 Cas"


To replicate:

1/ Create a record using the title, author and itemcallnumber above.
2/ Go to tools > label creator
3/ Add a batch containing the created item
4/ Add a new layout. Click the list fields radio button, and add the fields title, author, itemcallnumber
5/ Export the batch as CSV using the new layout. The resulting file will look like this:

   "Juggling for the complete klutz /","Cassidy, John.","JNF 793.8 Cas"

6/ Edit the layout, change the field list to

    "title author", itemcallnumber

7/ Export the batch again, the new CSV file will read

    ,"JNF 793.8 Cas"

The bug was replicated under version 3.23.
Comment 1 Chris Nighswonger 2016-05-11 20:17:50 UTC
(In reply to Barton Chittenden from comment #0)
> The description for "Data field" under label-edit-layout.pl shows
> 
> "Enter a comma separated list of fields to print. You may include any Koha
> field or MARC subfield.
> 
> See online help for advanced options
> 
> ex: barcode, itemcallnumber, title, "050a 050b", 300a
> 
> Fields homebranch_description, holdingbranch_description, ccode_description,
> location_description and permanent_location_description show description
> instead of code."
> 
> This seems to indicate that grouping fields using quotes, non-comma
> separated, *should* work:

This is a "vestigial example." The feature itself never quite made it in. A quick look over the code shows that there does not appear to be any code to handle this feature. It is described in the formal documentation as "concatenating and keeping on a single line."

If one were to write code to handle this, it would probably best go here: http://tinyurl.com/j9o4au3
Comment 2 George Williams (NEKLS) 2019-07-09 20:32:56 UTC
I'm going to suggest that, if no one is going to write code to add the feature that the the description on the screen in label-edit-layout.pl refers to, maybe we could just remove the parts of the description that are causing the confusion.
Comment 3 Katrin Fischer 2020-04-18 22:47:31 UTC

*** This bug has been marked as a duplicate of bug 23900 ***