If you do an item search in the staff client and send the output to the screen, the collection column will be populated. However, if you export the same search to CSV, the column is present, but contains no data. After poking around, I found that the screen was outputting items.ccode, whereas the CSV was outputting biblioitems.collectiontitle. Both output formats should use items.ccode.
Created attachment 93335 [details] [review] Bug 23706: Item search CSV export doesn't include collection code
To test: Perform an item search in the staff client Ensure your screen output contains data in the collection column. Export the same search to CSV, the collection column will not contain any results. Apply the patch Repeat the test. The collection column will now contain data which should match the output to the screen. Check that the CCODE authorised value description displays, instead of just the CCODE policy name
This patch should live in koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc - I don't know what I've done wrong to get the wrong path in this patch.
Created attachment 93336 [details] [review] LLP: Bug 23706
Created attachment 93337 [details] [review] Bug 23706: Item search CSV export doesn't include collection code
I think I've fixed it now.
We try to test today : this patch doesn't apply on a sandbox (Biblibre n°1)
The sandbox you've requested is not ready. Some problems occurred applying patches from bug 23706: <h1>Something went wrong !</h1>Applying: LLP: Bug 23706 Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc error: Failed to merge in the changes. Patch failed at 0001 LLP: Bug 23706
That looks like it's trying to apply an obsolete patch.
Actually, it looks like this might have already been fixed in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22424
Verified that collection is now exported.
Actually, still an issue on 18.11
(In reply to David Roberts from comment #11) > Actually, it looks like this might have already been fixed in > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22424 Indeed this bug made the change. So fixed since 19.05.x ?