I am trying to manage Redmine from ASP.NET MVC application with using Redmine .NET API.
The MVC application needs to allow users to create and edit Issue
from its UI. (The MVC application has same users as Redmine does.) The following code added a new issue but the author is always set as the owner of API key.
using Redmine.Net.Api;
using Redmine.Net.Api.Types;
RedmineManager manager = new RedmineManager(host, apiKey);
Issue newIssue = new Issue();
// Set issue details
newIssue.Author = new IdentifiableName();
var user = manager.GetUsers(UserStatus.STATUS_ACTIVE, loginUserName).FirstOrDefault();
newIssue.Author.Id = user.Id;
manager.CreateObject<Issue>(newIssue);
I want to set the login user to the issue author.
Does anyone know how to do this?
Thanks.