Hello,
I would like to create a new issue via the Atlassian.Jira SDK and assign it a sprint.
To do this, I add a CustomField to the previously created issue, but when I save the issue I get the following error message:
{"errorMessages":["Number value expected as the Sprint id."],"errors":{}}
var story = Global.GlobalSettings.JiraInstance.CreateIssue("CGMDETM");
story.Type = "User Story";
story.Priority = "Major";
story.Summary = "Agile Meetings";
//story.Reporter = Global.GlobalSettings.UserName;
story.FixVersions.Add("19/1");
story.DueDate = DateTime.Now;
story.Assignee = "jens.debernitz@cgm.com";
story.Description = "Hallo das ist eine User Story"; story.CustomFields.Add("Epic Link", TextFieldEpicAgileMeetings.Text);
story.CustomFields.Add("Cost Unit", "Product Investments"); story.CustomFields.Add("CGM Product", "DE65 TURBOMED");
//story.CustomFields.Add("Sprint", @"2/19-1-Turbo.Plopp");
story.CustomFields.Add("Internal Number", "/");
story.CustomFields.Add("DPA relevant", "Irrelevant");
story.CustomFields.Add("Acceptance Criteria", "de.communardo.jira.plugins.acceptance.criteria.beans.AcceptanceCriteria@725d9f55");
story.CustomFields.Add("Business Value", "1");
story.CustomFields.Add("Requirement Type", "Non functional");
story.CustomFields.Add("Sprint", "2/19-2-Turbo.Plopp"); try
{
story.SaveChanges();
}
catch (System.Exception ex)
{
MessageBox.Show(ex.Message);
}
The number it wants is the id of the sprint in the database, not the "name" (as those can be non-unique and variable). You need to either look that up manually, or issue REST calls to find out what it is. See https://docs.atlassian.com/jira-software/REST/7.3.1/
Oh Yes I have see it,
An another Question:
I will make a Query of my Issus to become all Sprints
What must I do?
var issues = (from i in Global.GlobalSettings.JiraInstance.Issues.Queryable
where i.Project == "CGMDETM" && "Sprint" //&& (from u in i.FixVersions where u.Name == "19/1" select u).ToString() == "19/1"
select i);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not understand "issues to become all sprints"? I understand you've got a query to find issues that you want to do something with, but I'm not sure of the rest of the question
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.