Bug 18536 - Generating CSV using profile in serials late issues doesn't work as described
Summary: Generating CSV using profile in serials late issues doesn't work as described
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Josef Moravec
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-04 08:55 UTC by Josef Moravec
Modified: 2017-12-07 22:20 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18536: Generating CSV using profile in serials late issues doesn't work as described (1.83 KB, patch)
2017-05-04 09:00 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18536: Generating CSV using profile in serials late issues doesn't work as described (1.99 KB, patch)
2017-05-10 13:35 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED OFF] Bug 18536: Generating CSV using profile in serials late issues doesn't work as described (2.06 KB, patch)
2017-05-10 21:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 18536: Generating CSV using profile in serials late issues doesn't work as described (2.14 KB, patch)
2017-05-19 09:42 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18536: [QA Follow-up] Tiny regex simplification (1.05 KB, patch)
2017-05-19 09:43 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Moravec 2017-05-04 08:55:39 UTC
Description on editing csv profiles says:

"You can also use your own headers (instead of the ones from Koha) by prefixing the field name with an header, followed by the equal sign."

So the header should be optional, but in fact it's mandatory. Also the regular expression to cut table name from beginning of db column is not right.

Patch follows
Comment 1 Josef Moravec 2017-05-04 09:00:21 UTC
Created attachment 63058 [details] [review]
Bug 18536: Generating CSV using profile in serials late issues doesn't work as described

Description on editing csv profiles says:

"You can also use your own headers (instead of the ones from Koha) by
prefixing the field name with an header, followed by the equal sign."

So the header should be optional, but in fact it's mandatory. Also the
regular expression to cut table name from beginning of db column is not
right.

Test plan:

0. Don't apply the patch
1. Make two CSV profiles for exporting late issues
    a) SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSUENUMBER=serial.serialseq|LATE SINCE=serial.planneddate
    b) aqbooksellers.name|TITLE=subscription.title|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate
2. Export late issues, profile a) works as expected, profile b) doesn't
3. Apply the patch
4. Both profiles should work
Comment 2 Josef Moravec 2017-05-10 13:35:32 UTC
Created attachment 63342 [details] [review]
Bug 18536: Generating CSV using profile in serials late issues doesn't work as described

Description on editing csv profiles says:

"You can also use your own headers (instead of the ones from Koha) by
prefixing the field name with an header, followed by the equal sign."

So the header should be optional, but in fact it's mandatory. Also the
regular expression to cut table name from beginning of db column is not
right.

Test plan:

0. Don't apply the patch
1. Make two CSV profiles for exporting late issues
    a) SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSUENUMBER=serial.serialseq|LATE SINCE=serial.planneddate
    b) aqbooksellers.name|TITLE=subscription.title|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate
2. Export late issues, profile a) works as expected, profile b) doesn't
3. Apply the patch
4. Both profiles should work
Comment 3 Katrin Fischer 2017-05-10 21:58:57 UTC
Created attachment 63373 [details] [review]
[SIGNED OFF] Bug 18536: Generating CSV using profile in serials late issues doesn't work as described

Description on editing csv profiles says:

"You can also use your own headers (instead of the ones from Koha) by
prefixing the field name with an header, followed by the equal sign."

So the header should be optional, but in fact it's mandatory. Also the
regular expression to cut table name from beginning of db column is not
right.

Test plan:

0. Don't apply the patch
1. Make two CSV profiles for exporting late issues
    a) SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSUENUMBER=serial.serialseq|LATE SINCE=serial.planneddate
    b) aqbooksellers.name|TITLE=subscription.title|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate
2. Export late issues, profile a) works as expected, profile b) doesn't
3. Apply the patch
4. Both profiles should work

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Marcel de Rooy 2017-05-19 09:42:57 UTC
Created attachment 63574 [details] [review]
Bug 18536: Generating CSV using profile in serials late issues doesn't work as described

Description on editing csv profiles says:

"You can also use your own headers (instead of the ones from Koha) by
prefixing the field name with an header, followed by the equal sign."

So the header should be optional, but in fact it's mandatory. Also the
regular expression to cut table name from beginning of db column is not
right.

Test plan:

0. Don't apply the patch
1. Make two CSV profiles for exporting late issues
    a) SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSUENUMBER=serial.serialseq|LATE SINCE=serial.planneddate
    b) aqbooksellers.name|TITLE=subscription.title|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate
2. Export late issues, profile a) works as expected, profile b) doesn't
3. Apply the patch
4. Both profiles should work

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2017-05-19 09:43:01 UTC
Created attachment 63575 [details] [review]
Bug 18536: [QA Follow-up] Tiny regex simplification

Simplify regex for removing table name.
No need to escape a dot between the square brackets. No need to specify a
number of 1 between parentheses.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Kyle M Hall 2017-05-19 14:43:34 UTC
Pushed to master for 17.05, thanks Josef!
Comment 7 Katrin Fischer 2017-05-21 21:26:35 UTC
These patches have been pushed to 16.11.x and will be in 16.11.08.
Comment 8 Julian Maurice 2017-05-22 14:17:40 UTC
Pushed to 3.22.x for 3.22.21
Comment 9 Mason James 2017-05-24 03:14:47 UTC
Pushed to 16.05.x, for 16.05.13 release