Bug 23706 - Item search CSV export doesn't include collection code
Summary: Item search CSV export doesn't include collection code
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: 18.11
Hardware: All All
: P5 - low enhancement
Assignee: David Roberts
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-30 22:55 UTC by David Roberts
Modified: 2020-11-30 21:45 UTC (History)
6 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Crowdfunding committed: 0
Crowdfunding contact:
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 23706: Item search CSV export doesn't include collection code (1.27 KB, patch)
2019-09-30 23:19 UTC, David Roberts
Details | Diff | Splinter Review
LLP: Bug 23706 (2.01 KB, patch)
2019-09-30 23:43 UTC, David Roberts
Details | Diff | Splinter Review
Bug 23706: Item search CSV export doesn't include collection code (2.01 KB, patch)
2019-09-30 23:46 UTC, David Roberts
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Roberts 2019-09-30 22:55:07 UTC
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.
Comment 1 David Roberts 2019-09-30 23:19:11 UTC
Created attachment 93335 [details] [review]
Bug 23706: Item search CSV export doesn't include collection code
Comment 2 David Roberts 2019-09-30 23:22:40 UTC
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
Comment 3 David Roberts 2019-09-30 23:23:35 UTC
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
Comment 4 David Roberts 2019-09-30 23:34:08 UTC
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.
Comment 5 David Roberts 2019-09-30 23:43:03 UTC
Created attachment 93336 [details] [review]
LLP: Bug 23706
Comment 6 David Roberts 2019-09-30 23:46:22 UTC
Created attachment 93337 [details] [review]
Bug 23706: Item search CSV export doesn't include collection code
Comment 7 David Roberts 2019-09-30 23:46:59 UTC
I think I've fixed it now.
Comment 8 Amandine Zocca 2019-10-02 08:02:06 UTC
We try to test today : this patch doesn't apply on a sandbox (Biblibre n°1)
Comment 9 Séverine Queune 2019-10-02 14:36:42 UTC
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
Comment 10 David Roberts 2019-10-02 16:28:17 UTC
That looks like it's trying to apply an obsolete patch.
Comment 11 David Roberts 2019-10-02 17:05:20 UTC
Actually, it looks like this might have already been fixed in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22424
Comment 12 Katrin Fischer 2019-10-14 21:59:04 UTC
Verified that collection is now exported.
Comment 13 Katrin Fischer 2019-10-14 22:01:00 UTC
Actually, still an issue on 18.11
Comment 14 Fridolin Somers 2019-11-26 14:06:53 UTC
(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 ?