Project

General

Profile

Actions

Feature #7184

closed

provide trackers in "project XML" response

Added by Alex Last about 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
2010-12-28
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid

Description

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.


Related issues

Related to Redmine - Feature #7181: List of trackers in REST APIClosed2010-12-27

Actions
Actions #1

Updated by moritz haarmann about 13 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>
Actions #2

Updated by Alex Last about 13 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?..

request:

http://academ:3000/projects/122.xml?key=01d7692c218a74d60d25d8eb5f62874a22ef8599


response:


<project>
<id>122</id><name>projB</name>
<identifier>projb</identifier>
<description></description>
<homepage></homepage>
<created_on>2011-01-02T23:36:38-08:00</created_on>
<updated_on>2011-01-02T23:36:38-08:00</updated_on>
</project>

Actions #3

Updated by Alex Last about 13 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?

Actions #4

Updated by Alex Last about 13 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.

Actions #5

Updated by Alex Last about 13 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?

Actions #6

Updated by Alex Last about 13 years ago

  • Status changed from New to Resolved

I think this particular request can be closed. the questions I raised in the previous comments are out of scope of this task.

Actions #7

Updated by Alex Last about 13 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:

include=trackers

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).

Actions #8

Updated by Marco Descher almost 13 years ago

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 :(

Actions #9

Updated by Etienne Massip almost 13 years ago

This behavior has been added by r4486 and included in version 1.1.0.

There is a tiny paragraph in developper guide about this change : Rest_api.

Actions #10

Updated by Marco Descher almost 13 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...

Actions #11

Updated by Etienne Massip almost 13 years ago

  • Status changed from Resolved to Closed
  • Assignee deleted (Jean-Philippe Lang)
  • Resolution set to Invalid
Actions

Also available in: Atom PDF