Project

General

Profile

How to add an issue trackers(Bag,Feature,Support) to existing project?(c#)

Added by Varvara Dvortsova almost 5 years ago

I'm a student at HSE. I am from Russia.
I do course work «Outlook Add-In for Integration with Redmine».

This code doesn't add the task trackers to project, therefore I don't add a task to this project(see picture).
!!
Please help to solve.

var project = manager.GetObject(project_id, null);
project.Description = "Updated description";
ProjectIssueCategory proCat = new ProjectIssueCategory();
proCat.Id = 10;
proCat.Name = "Feature";
project.IssueCategories = new List();
project.IssueCategories.Add(proCat);
project.Trackers = new List();
project.Trackers.Add(new ProjectTracker(){Name = "Bag"});
manager.UpdateObject(project_id, project);
var updatedProject = manager.GetObject<Project>(project_id, null);
Console.WriteLine("Updated issue: {0}.", updatedProject);

Replies (3)

RE: How to add an issue trackers(Bag,Feature,Support) to existing project?(c#) - Added by Bernhard Rohloff almost 5 years ago

At the moment, I don't exactly understand your problem. Do you want to add the tracker programmatically?
Because you can add a new tracker conveniently over the administration panel. Or do you try to add a new tracker by the REST API?
I really don't get it...

Kind regards,

Bernhard

RE: How to add an issue trackers(Bag,Feature,Support) to existing project?(c#) - Added by Varvara Dvortsova almost 5 years ago

Yes, I want to add the tracker programmatically. I need to add a new tracker by the REST API.

RE: How to add an issue trackers(Bag,Feature,Support) to existing project?(c#) - Added by Anonymous over 4 years ago

Bernhard Rohloff wrote:

At the moment, I don't exactly understand your problem. Do you want to add the tracker programmatically?
Because you can add a new tracker conveniently over the administration panel. Or do you try to add a new tracker by the REST API?
I really don't get it...

Kind regards,

Bernhard

This code doesn't add the task trackers to project, therefore I don't add a task to this project(see picture).

    (1-3/3)