provide trackers in "project XML" response
this is the response I get from REST API on my "get project(s)" request:
<?xml version="1.0" encoding="UTF-8"?> <project> <id>80</id> <name>project number 1293492756675</name> <identifier>projkey1293492756675</identifier> <description>some description for the project</description> <homepage></homepage> <created_on>2010-12-27T15:32:39-08:00</created_on> <updated_on>2010-12-27T15:32:39-08:00</updated_on> </project>
would be nice to have the project trackers list in this response - or at least allow fetching the trackers separately like it's requested in #7181.
#1 Updated by moritz haarmann about 7 years ago
Have you tried using the /projects/[id].xml option? At least I'm getting the trackers there.
<trackers> <tracker name="Bug" id="1"/> <tracker name="Feature" id="2"/> <tracker name="Support" id="3"/> <tracker name="Action" id="6"/> <tracker name="Review" id="7"/> <tracker name="Test" id="8"/> </trackers>
#2 Updated by Alex Last about 7 years ago
I tried your URL as well. I'm using "Redmine 1.1.0.devel.4622 (PostgreSQL)" version.
maybe I should have ran some db migration scripts in addition to "svn up" for this redmine version?..
#3 Updated by Alex Last about 7 years ago
I see a similar request sent to www.hostedredmine.com site returns
<project> <id>...</id> <name>.....</name> <identifier>.....</identifier> <description></description> <homepage></homepage> <created_on>....</created_on> <updated_on>....</updated_on> <trackers> <tracker name="Feature" id="2"/> <tracker name="Support" id="3"/> <tracker name="Bug" id="1"/> <tracker name="Task" id="4"/> </trackers> </project>
so I guess it must be something with my setup - but what?
#4 Updated by Alex Last about 7 years ago
I installed Redmine 1.0.5 on a new server. I can see "trackers" list in XML response for the projects created through the web-interface, but not for the project created via REST API, which has this xml response:
<project> <id>2</id> <name>project number 1294120761945</name> ... <trackers> </trackers> </project>
I thought the default trackers will be assigned to the projects created via REST API without specifying the trackers list. am I wrong?
I also see all options on "Select modules to enable for this project", including "Issue tracking", are UN-checked for those new projects.
#5 Updated by Alex Last about 7 years ago
I see trackers are added to the XML response if I manually select them on Project -> Settings -> Information page - which makes sense.
so, the question boils down to: how do I create a project through REST API so that it would get all default trackers assigned? I don't want to specify the default trackers with their IDs in "Create project" request (I don't even have that info).
another question: how to specify "enabled modules" when creating project via REST API?
#7 Updated by Alex Last about 7 years ago
mmm... sorry, but I have to reopen this request (which can be changed from "feature" to "bug").
I installed the last stable 1.1.0 version, deleted the database just to be sure, re-created it, loaded default data. this assures I have the "clean" install.
then created a project via REST API and still can't see the trackers in the response from the server.
I added the rest api user to the project members manually via the web UI (just to try this idea) and still don't get the trackers.
I can see in the web UI that the "issue tracking" module is enabled for the project and the available trackers are checked/selected there.
I had to read Redmine's source code to find out there's an undocumented parameter:
I can finally see the trackers in the response when I provide this parameter.
Jean-Philippe, could you please clarify if this is a bug in the system or I do need to use that parameter. I'm not sure if it's not something internal which will go away in the next version(s).
#10 Updated by Marco Descher almost 7 years ago
Marco Descher wrote:
I have the same problem here, where do I need to put this parameter in, to get it work again? In 1.0.2 it works, 1.1.2 does not return the tracker list :(
Okay, I see you need to pass it at the HTTP Line adding ?include=trackers...