The manual explains that one can use double quotes when listing fields for one's label layout to make two or more values concatenate onto a single line in one's label. From https://koha-community.org/manual//18.11/en/html/tools.html#layouts: "You can also enclose a whitespace-separated list of fields to concatenate on one line in double quotes, for example “099a 099b” or “itemcallnumber barcode”. Testing this on both 18.11 and 19.05, this works for MARC fields but not for database fields. To test: - define a label layout with this field list: "100a 245s","enumchron copynumber" - find or create a record with values for all of those fields - generate a label for that record - the 100a and 245s successfully display on one line - the enumchron and copynumber do not display at all
Created attachment 95273 [details] [review] Bug 23900: Teach label maker to concat database fields Test plan: - define a label layout with this field list: "100a 245s","enumchron copynumber" - find or create a record with values for all of those fields - generate a label for that record - the 100a and 245s successfully display on one line - the enumchron and copynumber are displayed and separated by a space Try other combinations
Created attachment 95307 [details] [review] Bug 23900: Teach label maker to concat database fields Test plan: - define a label layout with this field list: "100a 245s","enumchron copynumber" - find or create a record with values for all of those fields - generate a label for that record - the 100a and 245s successfully display on one line - the enumchron and copynumber are displayed and separated by a space Try other combinations Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Hi Jonathan, could we have a regression test for this please?
(In reply to Katrin Fischer from comment #3) > Hi Jonathan, could we have a regression test for this please? I tried but failed. I do not think the whole thing is tested at all.
Please add tests :)
(In reply to Marcel de Rooy from comment #5) > Please add tests :) I have answered previously, I will not.
(In reply to Jonathan Druart from comment #6) > (In reply to Marcel de Rooy from comment #5) > > Please add tests :) > > I have answered previously, I will not. Didnt even see that, reading so fast :)
(In reply to Jonathan Druart from comment #4) > (In reply to Katrin Fischer from comment #3) > > Hi Jonathan, could we have a regression test for this please? > > I tried but failed. I do not think the whole thing is tested at all. t/Labels.t t/Labels_split_ccn.t t/Labels_split_lccn.t t/db_dependent/Labels/t_Label.t
Created attachment 99641 [details] [review] Bug 23900: Add tests
Created attachment 101072 [details] [review] Bug 23900: Teach label maker to concat database fields Test plan: - define a label layout with this field list: "100a 245s","enumchron copynumber" - find or create a record with values for all of those fields - generate a label for that record - the 100a and 245s successfully display on one line - the enumchron and copynumber are displayed and separated by a space Try other combinations Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 101073 [details] [review] Bug 23900: Add tests Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x for 19.11.05
backported to 19.05.x for 19.05.10
I cannot get any of the data fields showing on my labels in 18.11.x, following this test plan. Is somebody able to confirm that this works in 18.11 and that this patch fixes any issues?
*** Bug 16503 has been marked as a duplicate of this bug. ***