Add issues request parameter (/issues.json?mypara=xxxx)
Added by Stéphane CHÂTEAU over 5 years ago
Hello everybody.
I think that reply to my question is quite simple...
I would like to add new parameter into REST API issues (to get the issues list).
I have self made plugins that allow to add a geometry to issues (spatial database, table "public.pointes") and have already modify some views (see https://www.redmine.org/boards/3/topics/56954)
In fact i would like to add a custom parameter like (if I ask 2 issues id 13187 and 13188) https://ip+url/issues.json?issue_id=13187,13188&&geometryinto=POLYGON((20.08747 32.12409,20.15034 32.12027,20.14264 32.05882,20.06613 32.06316,20.08747 32.12409))
geometryinto make a new condition into the where of the issues request like:
(....WHERE blah blah...) AND WHERE issue.id IN (SELECT DISTINCT p.issue_id FROM public.pointes p st_contains(ST_GeomFromText('POLYGON((20.08747 32.12409,20.15034 32.12027,20.14264 32.05882,20.06613 32.06316,20.08747 32.12409))') , p.pointe))
I don't know how to hook issues parameter to add my onw WHERE condition into the redmine request.
I'm sure it's not really hard, looking into extra_queries plugin and into class IssueQuery < Query but I didn't know how to do, what to search...
Thanks for your help.