Bug 13695

Summary: Allow ISBD format export
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: OPACAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: hagud, hector.hecaxmmx, jens.weber, jonathan.druart, kyle, savitra.sirohi, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7917
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13642
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 23174    
Attachments: Bug 13695: Add ISBD to OpacExportOptions
Bug 13695: Add ISBD export option to OPAC (detail)
Bug 13695: Add ISBD export option for the OPAC cart and lists
Bug 13695: Add ISBD to OpacExportOptions
Bug 13695: Add ISBD export option to OPAC (detail)
Bug 13695: Add ISBD export option for the OPAC cart and lists
[PASSED QA] Bug 13695: Add ISBD to OpacExportOptions
[PASSED QA] Bug 13695: Add ISBD export option to OPAC (detail)
[PASSED QA] Bug 13695: Add ISBD export option for the OPAC cart and lists

Description Tomás Cohen Arazi 2015-02-10 23:18:27 UTC
Some users might benefit from an ISBD export option in the OPAC, which is user-configurable and can easily be used for copya & paste.
Comment 1 Tomás Cohen Arazi 2015-02-10 23:44:21 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2015-02-10 23:44:27 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 2015-02-10 23:45:08 UTC Comment hidden (obsolete)
Comment 4 Tomás Cohen Arazi 2015-02-23 13:25:18 UTC
*** Bug 7917 has been marked as a duplicate of this bug. ***
Comment 5 Brendan Gallagher 2015-02-24 06:25:36 UTC Comment hidden (obsolete)
Comment 6 Brendan Gallagher 2015-02-24 06:25:49 UTC Comment hidden (obsolete)
Comment 7 Brendan Gallagher 2015-02-24 06:25:55 UTC Comment hidden (obsolete)
Comment 8 Hugo Agud 2015-02-24 09:33:17 UTC
We have applied the patch and it works, but we have found some issues

1. charset issues with utf8
2. issues with html labels
_____________________________
Barcelona  institucions 2000 
DirecciÛ: ¡ngel Fern·ndez MartÌnez, Francesc GalmÈs i DÌaz-Plaja ; col∑laboradors: M. Dulce de Torres Ruiz de Porras ... [et al.] 
 - Barcelona:  DiputaciÛ de Barcelona;Ajuntament de Barcelona 
 - 696 p. ;   21 cm 
 -  Paper 
<br/><br/><label>ISBN: </label>8477947376 
<br/><br/><label>LCCN: </label>2478 
<br/><br/><label>Subjects--Topical Terms: </label><br/>Barcelona (ProvÌncia) -- Directoris -- 2000<br/>Barcelona (ProvÌncia) -- Guies -- 2000
<br/><br/><label>Universal Decimal Class. No.: </label>061.1(460.23)
___________________________________ 

We have modified a little the patch changing txt to html and all these issues are fixed, the user may copy and paste to txt or keep it in html.
Comment 9 Jonathan Druart 2015-03-05 10:27:28 UTC
(In reply to Hugo Agud from comment #8)
> We have applied the patch and it works, but we have found some issues

Hugo, I don't reproduce the encoding issue (pmvers Encode: 2.60).
Is it expected to retrieve a file with the html tag?
IMO the ISBD generated file should be a simple text file, don't you think?
Comment 10 Hugo Agud 2015-03-05 10:31:11 UTC
(In reply to Jonathan Druart from comment #9)
> (In reply to Hugo Agud from comment #8)
> > We have applied the patch and it works, but we have found some issues
> 
> Hugo, I don't reproduce the encoding issue (pmvers Encode: 2.60).
> Is it expected to retrieve a file with the html tag?
> IMO the ISBD generated file should be a simple text file, don't you think?

Yes txt is desirable of course, we just did that change becasue we were in a hurry to push to the server.

We faced problems with diacritics (spanish), I will chech the encoding againg, thanks for the tip
Comment 11 Jonathan Druart 2015-03-05 15:56:56 UTC
Tomas, I would like to get your opinion on this.
Shouldn't we create a new pref for the ISBD export or remove the html tags?
Comment 12 Tomás Cohen Arazi 2015-03-07 20:00:09 UTC
(In reply to Jonathan Druart from comment #11)
> Tomas, I would like to get your opinion on this.
> Shouldn't we create a new pref for the ISBD export or remove the html tags?

As the patch author I might not be the best to say. I always expect the ISBD (In reply to Jonathan Druart from comment #11)
> Tomas, I would like to get your opinion on this.
> Shouldn't we create a new pref for the ISBD export or remove the html tags?

I don't think we should tweak the generated ISBD. If such was the case, then we  might have a bug on the ISBD generating code, that makes people use HTML code to trick the browser, instead of showing the ISBD card as-is.

I don't favour adding new sysprefs for this kind of thing. At least no at a first sight of the problem. I'll try to read a bit more about the ISBD code to figure what is the expected behaviour.
Comment 13 Kyle M Hall 2015-03-27 11:43:39 UTC
Created attachment 37304 [details] [review]
[PASSED QA] Bug 13695: Add ISBD to OpacExportOptions

This patch adds 'isbd' as an export option on the system preferences.
Note this patch doesn't add the feature.

To test:
- On master, search for the OpacExportOptions syspref
=> FAIL: There is no ISBD option.
- Apply the patch
- Search for the OpacExportOptions syspref
=> SUCCESS: There is a new ISBD option.

Sponsored-by: Orex Digital

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 14 Kyle M Hall 2015-03-27 11:43:47 UTC
Created attachment 37305 [details] [review]
[PASSED QA] Bug 13695: Add ISBD export option to OPAC (detail)

This patch adds the option to export a record (from within the
OPAC record detail page) in the ISBD format.

To test:
- Enable ISBD on the OpacExportOptions syspref
- Look for a record on your opac
- On the detail page, notice there's a new ISBD option for 'Save record'
- Choose ISBD
=> SUCCESS: a file containing the ISBD format for the record is downloaded

Sponsored-by: Orex Digital

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 15 Kyle M Hall 2015-03-27 11:43:50 UTC
Created attachment 37306 [details] [review]
[PASSED QA] Bug 13695: Add ISBD export option for the OPAC cart and lists

This patch adds the option to download records from the cart, and
lists in the ISBD format from the OPAC.

To test (cart):
- Apply the patch
- Add several records to your OPAC cart.
- Go to your cart, and choose 'Download'
=> SUCCESS: There's an ISBD option
- Dowload and open the exported records
=> SUCCESS: The file contains the ISBD format for the records on the cart

To test (lists):
- Add several records to a list (i did it from the cart ;-))
- Open the list
- Choose 'Download list'
=> SUCCESS: There's an ISBD option
- Download and open the exported records
=> SUCCESS: The file contains the ISBD format for the records on the list.

- Sign off :-D

Sponsored-by: Orex Digital

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 16 Kyle M Hall 2015-03-27 11:45:12 UTC
Looks good. I do think a further enhancement to allow a system preference to choose the filename suffix would be a good idea ( html vs txt ). But that's another bug report for another day.
Comment 17 Tomás Cohen Arazi 2015-03-31 14:02:39 UTC
Patches pushed to master.