Project

General

Profile

To fetch issues for a date range: GET /issues.xml?created_on=><2012-03-01|2012-03-07

Added by Anand Walvekar over 11 years ago

Hello,

1) When I tried below request on my browser, it is giving proper xml response. From this response I copied "created_on" of one issue which looked as "2012-12-07T11:14:10+01:00"
https://myProject/redmine/issues.xml?project_id=41&tracker_id=20&key=32930751071836g53be4284a64j8b03fb01d797k

2) Now I tried with below requests which is not returning any result (i.e. only one line <issues type="array" total_count="0" limit="25" offset="0"/>)
https://myProject/redmine/issues.xml?project_id=41&tracker_id=20&created_on=>&lt;2012-12-07|2012-12-08&key=32930751071836g53be4284a64j8b03fb01d797k
https://myProject/redmine/issues.xml?project_id=41&tracker_id=20&created_on=>2012-12-07&key=32930751071836g53be4284a64j8b03fb01d797k
https://myProject/redmine/issues.xml?project_id=41&tracker_id=20&created_on=&lt;2012-12-07&key=32930751071836g53be4284a64j8b03fb01d797k

NOTE : Basically my intention is to get the list of issues created after some date.

Looking for your response

Thanks
Anand


Replies (3)

RE: To fetch issues for a date range: GET /issues.xml?created_on=><2012-03-01|2012-03-07 - Added by Anand Walvekar over 11 years ago

Any update?
Anand Walvekar wrote:

Hello,

1) When I tried below request on my browser, it is giving proper xml response. From this response I copied "created_on" of one issue which looked as "2012-12-07T11:14:10+01:00"
https://myProject/redmine/issues.xml?project_id=41&tracker_id=20&key=32930751071836g53be4284a64j8b03fb01d797k

2) Now I tried with below requests which is not returning any result (i.e. only one line <issues type="array" total_count="0" limit="25" offset="0"/>)
https://myProject/redmine/issues.xml?project_id=41&tracker_id=20&created_on=>&lt;2012-12-07|2012-12-08&key=32930751071836g53be4284a64j8b03fb01d797k
https://myProject/redmine/issues.xml?project_id=41&tracker_id=20&created_on=>2012-12-07&key=32930751071836g53be4284a64j8b03fb01d797k
https://myProject/redmine/issues.xml?project_id=41&tracker_id=20&created_on=&lt;2012-12-07&key=32930751071836g53be4284a64j8b03fb01d797k

NOTE : Basically my intention is to get the list of issues created after some date.

Looking for your response

Thanks
Anand

RE: To fetch issues for a date range: GET /issues.xml?created_on=><2012-03-01|2012-03-07 - Added by Jean-Baptiste Barth over 11 years ago

Maybe API docs are wrong, I don't really known, but in those cases you can generated a query in the human interface and then cut the url in your browser so you have the proper filters.

Fwiw, this works for me :

&f%5B%5D=created_on&op%5Bcreated_on%5D=>%3D&v%5Bcreated_on%5D%5B%5D=2012-12-01

Maybe your client tool / language automatically encodes the request. A more readable version of those parameters is :

f[] = created_on
op[created_on] = >=
v[created_on][] = 2012-12-01

RE: To fetch issues for a date range: GET /issues.xml?created_on=><2012-03-01|2012-03-07 - Added by Anand Walvekar over 11 years ago

This gave me little insight on how to proceed with this issue.

To make your answer more precise,
1) Go to Firefox->Tools->Add-ons
2) Install "HttpFox" add-on
3) Open redmine filter page(View all issues)
4) Apply the filter you are interested in & open http fox window.
5) Click on Start button in HttpFox window.
6) Click Apply button in filter page.
7) You will observe list of request & responses
8) Click on first request/response row
9) Click on "Header" section in botton
10) Copy the first line(which will look like GET redmine/issues?set_filter=1.....
11) Add you domain name to this to form a complete url & hit the same in browser(http:mydomain.com/redmine/issues?set_filter=1.....)

NOTE : I tried to set the filter in browser but could not able to do it since it shows below option under update_on
less than days ago
more than days ago
day ago
today
this week

Thanks
Anand

    (1-3/3)