Closed (fixed)
Project:
Webform
Version:
7.x-4.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2015 at 00:54 UTC
Updated:
12 Mar 2015 at 17:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
danchadwick commentedThere isn't an undocumented feature. Patches are welcome, or perhaps you could sponsor development of this feature.
Comment #2
jamesbisset commentedOK, just stumbling through the code in webform.drush.inc here:
Am I missing anything?
Comment #3
danchadwick commented@jamesbisset -- no clue. I've only glanced at the drush integration. You'll have to read the code, implement the feature, and test it thoroughly. Be sure to add the feature to the command's help.
Any interest in helping other export/wfx issues? I can create a meta-issue. These include suppressing the header, exporting using serial numbers (not sure of status -- maybe this is done), and possibly exporting using the various dates (creation, finished, last saved), pending implementation of that. There is also an old request to bundle up the files from file components into a compressed file. Lot's of areas for improvement. :)
Comment #4
jamesbisset commentedI'll test and generate a patch over the weekend, but my update seems to be working fine.
Comment #5
danchadwick commentedCan you also look at this issue -- essentially the same thing but through the UI:
#2382271: Downloading all submissions includes draft and finished despite range options
Comment #6
jamesbisset commentedPatch attached. Initial patches to the wfx command should be straightforward because it is merely passing values back to functions in webform.report.inc.
Webform default behaviour is to download all submissions, because allowing drafts is an option in advanced settings. Only when drafts are allowed does it become relevant to select one or the other.
So I've set an error message which prevents download if someone defines completion type without having enabled drafts first.
Comment #7
danchadwick commenteda) Thank you for the patch!
b) I understand your idea about the error checking, but I don't think it is necessary. In the UI, we try to not present options that aren't relevant. In truth, it is possible for the webform to have submissions because draft options could have previously been enabled. In the case of a drush command, if they ask for something that is possible, but unlikely, I think we should just honor what they asked for.
c) I will remove the if clause and give it a whirl. No need to resubmit the patch. Thanks for tending to this.
Comment #9
danchadwick commentedI added a test to ensure that the option is one of the three valid choices. The way the code is written, an invalid option does not default to "all".
Committed to 7.x-4.x and 8.x.
Thanks for your help!