Bug 16626 - downloaded files should have descriptive names including timestamps.
Summary: downloaded files should have descriptive names including timestamps.
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-31 19:46 UTC by Barton Chittenden
Modified: 2016-05-31 19:46 UTC (History)
0 users

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-31 19:46:04 UTC
When downloading exported marc records, creator card batches, creator label batches or report results, the resulting file names are not unique, and none of the names is terribly descriptive.

I would suggest a library function that emits a filename formatted something like this

${description}-${date}.${extension}

Where ${description} is

exported marc => "koha_export.$START-$END"
    $START => first biblionumber in file
    $END => last biblionumber in file (range is omitted if there's only one bib)

card batches  => "creator_batch.$batchnumber"
label batches => "label_batch.$batchnumber"
report        => "report.${report.id}.${sanitized_report_name}"
    ${sanitized_report_name} => shell friendly, i.e. s/[^A-Za-z0-9]+/_/g


${date}
    --iso-8601 formatted, shell friendly.

${extension}
    csv, pdf, marc, marcxml, etc.