Closed (fixed)
Project:
Webform
Version:
7.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2015 at 01:12 UTC
Updated:
24 Jan 2016 at 20:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
pdcarto commentedComment #3
serundeputy commentedSetting to `Needs review` to trigger travis.
Comment #4
serundeputy commentedI applied this patch and tested the
drush wfx --range-type='new'command. Works as expected with only new results being exported.I did not test through the Drupal UI.
Comment #5
danchadwick commentedI took a quick look and see one minor style issue and a bug:
This is an anti-pattern. You can easily screw yourself with a global $user. I've been converting these to $GLOBALS['user'] as I work on issues.
Not quite. You are evaluating a floating point number as a boolean. The truthy value of 0.5 is TRUE, so this will do the db_merge part way through the batch. To test this, set the batch size small enough that multiple batches are exported.
This needs testing with both drush and the UI. It also needs testing with multiple batches.
Comment #6
danchadwick commentedOh, also, thanks for the am-style patch. However, you need to put a Drupal and webform standard commit message in it, otherwise I can't use it.
Comment #7
danchadwick commentedEhhhh, looking more closely, the code was removed from the page which displays the downloaded file and moved to just after the rows are exported. This increases the risk that the last-downloaded will be reset before the file is successfully delivered to the user. The UI download uses some javascript trickery to display the file.
This isn't going to be quite as easy as I hoped.
Comment #8
danchadwick commentedThis was made harder because the $_SESSION super-global this is used to communicate the results of the export to the next page load does not work with the command line.
Committed to 7.x-4.x.
Comment #10
danchadwick commentedUp-port needed.
Comment #12
fenstratCommitted and pushed to 8.x-4.x.