So my problem was after creating a webform report I wasn't able to filter the report data by a date value. So below you will find the patch files that will add this functionality into the module. I will be more then happy to help if you need any more information.

NOTE: Dependent on date module (http://drupal.org/project/date) Plug-ins: Date API & Date Popup.

Thanks!

Comments

droath’s picture

Assigned: droath » Unassigned
jimbullington’s picture

Thanks for the patch - it looks good. A couple of things:

  1. In order to reduce the dependency on other modules, could there be an alternate method of getting the default date range if the Date API and Date Popup modules are not present?
  2. I think the enabler and default dates should go along with the report and not be system wide. For 6.x-1.x, this will mean adding fields to the database - perhaps an options field is needed.
rsacchi’s picture

There is a way to implement this wonderful patch in the 6.x-2.0 version?

Thanks

droath’s picture

Good Idea...

I was thinking about doing both these implementations initially, but ran out of time in the long run. I will look into making both these changes here soon.

Thanks!

droath’s picture

Hi rsacchi,

After I look into getting the above implementations in 6.x.1.11, I will look into writing a patch for 6.x.2.0.

Thanks!

rsacchi’s picture

Sounds great, the version 2.0 has many new features and improvements http://drupal.org/node/826512 .
Thank you so much for this assistance.

rsacchi’s picture

Any progress on this feature ?

droath’s picture

Not yet! Sorry! I'm in bit of a time crunch with a couple other projects that I'm working on. I hope to have this feature added to version 6.x-2.0-beta4 soon. I don't think I will be coding anything for 6.x.1.11 due to webform 3.0 releasing. Does anyone know if 6.x-2.0-beta4 is stable enough for production yet? I know the developer suggested not to install version 6.x-2.0-beta4 on a production server as of 6/13/2010, has this changed?

MBroberg’s picture

With the changes listed in
drupal.org/node/832690#comment-3383662
I actually have Beta4 running on a production site. I have not tested the patch in #12, but it works and doesn't break anything else. I have a ton of modules running on the site and 400 submissions that are showing up in reports very well.

jimbullington’s picture

Thanks for the feedback - I'm thinking I will need a Beta5 on order to address these issues:

#299414: Add search field to reports
#327203: Ability to determine column display order
#832690: Unknown column 'columns' in 'field list' query error (Waiting for patch feedback)
#846528: Filter field in the main report page
#865754: patch to "select" type column to show value instead of key (Need to test patch)
#867908: Date Range Report Filter (Waiting for patch revision)

Maybe after that we will have a descent feature set and the module will be stable enough for release. I'll try to get this done ASAP.

jimbullington’s picture

StatusFileSize
new3.12 KB

A patch for 6.x-2.0-BETA is attached.

In order to filter by date range, add two filters, one greater than (or greater than or equal - added here), and one less than (or less than or equal). Special processing has been added to properly compare dates and times.

rsacchi’s picture

Jim, thank you, this is a very useful feature, but not represents the first patch provided by droath for webform 6.x-1.11, which one the end user could filter the reports by date.

I apreciate your help !

bomarmonk’s picture

I would also like to see the original implementation of date range filter (the top patch here). Since this can be applied by the end user of the report, it prevents a report user from having to make a new report every time the user wants to filter to a certain date criteria (this is very elegant from a UI perspective). The Date API is not an issue for me, and I'm not sure it would be that big of a deal to make this reports module dependent on the very robust Date API by KarenS for the sake of handling date functionality (just playing devil's advocate here).

meordonez’s picture

I am trying to install this patch to my webform_report module from linux and but I have the following errors:

$ patch -p0 < webform_report_6.x-1.11_date_range_feature_inc.patch
patching file webform_report.inc
Hunk #1 FAILED at 54.
Hunk #2 FAILED at 81.
Hunk #3 FAILED at 224.
Hunk #4 FAILED at 244.
4 out of 4 hunks FAILED -- saving rejects to file webform_report.inc.rej

$ patch -p0 < webform_report_6.x-1.11_date_range_feature_module.patch
patching file webform_report.module
Hunk #1 FAILED at 213.
Hunk #2 FAILED at 274.
Hunk #3 FAILED at 393.
Hunk #4 FAILED at 455.
Hunk #5 FAILED at 494.
Hunk #6 FAILED at 522.
Hunk #7 FAILED at 565.
7 out of 7 hunks FAILED -- saving rejects to file webform_report.module.rej

I do not know what I am doing wrong. I tried to install inc. patch first and then module.patch and the viceversa. Please let me know if you can help me.

Thank you.

jimbullington’s picture

Unfortunately the patch is for the 6.x-2.0 version of this module. No more development is being done on the 1.0 version.

droath’s picture

Hi meordonez -

I just retested my original patch on my local sandbox, and everything seems to be working fine. I did notice that the order of your files in your patch command were backwards. I would suggest running the command this way:

patch -p0 webform_report.inc webform_report_6.x1.11_date_range_feature_inc.patch
patch -p0 webform_report.module webform_report_6.x1.11_date_range_feature_module.patch

Here are the patch commands that I ran on the module & inc files.

MacBook-Pro:webform_report MacOSX$ patch webform_report.inc webform_report_6.x-1.11_date_range_feature_inc.patch
MacBook-Pro:webform_report MacOSX$ patch webform_report.module webform_report_6.x-1.11_date_range_feature_module.patch

Hope this helps!

jimbullington’s picture

A new issue along these same lines has been opened for 6.x-2.0 - #969908: Date Range Report Filter Continued.... This was done to aleviate confusion over the patches for 6.x-1.0.

meordonez’s picture

Droath:

Thank you very much for all your help, I try to install the patch the way you told me but I was not able.

$ patch -p0 webform_report.inc webform_report_6.x-1.11_date_range_feature_inc.patch
patching file webform_report.inc
Hunk #1 FAILED at 54.
Hunk #2 FAILED at 81.
Hunk #3 FAILED at 224.
Hunk #4 FAILED at 244.
4 out of 4 hunks FAILED -- saving rejects to file webform_report.inc.rej

I do not what I am doing wrong. I changed the versions from 6.x-1.0 to 6.x-2.0 but I still cannot apply the patch.

droath’s picture

meordonez:

If you are running webform report version 6.X-2.0 you will need to use this patch file #969908: Date Range Report Filter Continued.... The above patch only works on webform report, version 6.x-1.11.

Hope this helps...

meordonez’s picture

droath:

thank you very much!, just one question, this patch is for the .module or the .inc file?

droath’s picture

meordonez:

There are two files that you will need to patch in the webform_report module, version 6.x-1.11.

One is the .inc file, use this patch file:
webform_report_6.x-1.11_date_range_feature_inc.patch

Second is the .module file, use this patch file:
webform_report_6.x-1.11_date_range_feature_module.patch

Hope this gets you up and running...

meordonez’s picture

droath:

I worked! thank you very very much!

jimbullington’s picture

Status: Needs review » Closed (fixed)