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

Added by Varvara Dvortsova 2 months 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 (2)

RE: How to add an issue trackers(Bag,Feature,Support) to existing project?(c#) - Added by Bernhard Rohloff 2 months 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 2 months ago

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

(1-2/2)