redmine-net-api
redmine-net-api copied to clipboard
Assignee update in Issue
Hi,
I have the latest version of redmine-api 4.6.5. The problem I encountered is Assignee update in Issue. According to the api documentation, I should perform something like this:
var manager = new RedmineManager(host, apiKey);
var issue = manager.GetObject<Issue>("2351", new NameValueCollection());
var user = manager.GetObject<User>("20", new NameValueCollection());
issue.AssignedTo = new IdentifiableName { Id = user.Id, Name = user.FirstName + " " + user.LastName }; //Id problem
manager.UpdateObject<Issue>("2351", issue);
But I get an error: The property or indexer 'Identifiable<IdentifiableName>.Id' cannot be used in this context because the set accessor is inaccessible
Do you have any suggestions on how to solve this?
Hi,
Currently, there is no mechanism to assign by name. Only the ID is accepted and you can do it like 👇
issue.AssignedTo = IdentifiableName.Create<IdentifiableName>(Id = user.Id);