Skip to content

Bug related to getFormEntries and DateCreated filter and + character conversion #12

@armenmargaryan

Description

@armenmargaryan

Hello,
I have found bug related to getFormEntries and DateCreated filter.

Basically i'm unable to use 'Filter1':"DateCreated+Is_after+2021-07-24+00:00:00"

wufooAPI.getFormEntries(frm.hash, {'sort':'entryId', 'sortDirection':'DESC', 'pageSize':'100', 'Filter1':"DateCreated+Is_after+2021-07-24+00:00:00", 'match':'AND'}, function(err, entries) {

Because inside wufoo.js is working require("querystring").stringify which converts + charter to %2B but based on official documentation
https://wufoo.github.io/docs/#form-entries
i have to request with + inside url like this -> Filter2=EntryId+Is_less_than+5&match=AND but require("querystring").stringify converts it to Filter2=EntryId%2BIs_less_than%2B5&match=AND which then doesn't accepted by Wufoo.

My simple solution/workaround is to call options["uri"] = options["uri"].replace(/%2B/g, '+'); before executing request(options, function(err, res, body) { in node_modules/wufoo/lib/wufoo.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions