Hello,
I am trying to fetch issue data using c# code.
I have installed Atlassian SDK of version 2.2.0. I am able to connect JIRA and fetch data using "GetIssuesFromJql()" function.
Issue data is coming fine but time-tracking or original estimate data is missing.I am not able to see such field in the issue i am receiving.
Could someone please help me getting mentioned issue data using c#.
Hi,
Actually I solved this now with Atlassian.SDK v10.5.0
the following code below, helps me determine if i need to create a specialised CreateIssueFields. This is neccessary as part of the CreateIssue() if you want to initially setup correctly the Original Estimate.
private CreateIssueFields NewIssueCriteria(string project, RallyDefect item, string parent)
{
CreateIssueFields res = null;
if (item.PlanEstimate > 0)
res = new CreateIssueFields(project)
{
ParentIssueKey = parent,
ProjectKey = project,
TimeTrackingData = new IssueTimeTrackingData($"{item.PlanEstimate:##}d", null)
};
return res;
}
USAGE
var createFields = NewIssueCriteria(pKey, item, null);
var i = jira.CreateIssue(createFields);
I also used: when i wanted to setup the "story point estimate" field. make sure this is on your screen before using it.
SetCustom(ni.CustomFields, "Story point estimate", $"{story.PlanEstimate:#}");
void SetCustom(CustomFieldValueCollection customs, string field, object value)
{
if (value == null)
return;
if (customs[field] == null)
customs.Add(field, value.ToString());
else
customs[field].Values = new[] { value.ToString() };
}
I usually use the REST API but have just started looking at the SDK. You mention version 2.2.0 (circa 2013), whereas I have just installed (via NuGet) version 10.0.2, which is a huge leap forward. The documentation is https://bitbucket.org/farmas/atlassian.net-sdk/wiki/Home and there is mention of worklogs etc., so possibly look at this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Warren for the suggestion.
I tried using latest NuGet package but still No Luck. I am not able to get Efforts(original estimate ) data in the issue.
Could you please suggest on efforts data?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
me neither!
any help on this would be greatly appreciated guys!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Firstly, are you on server or cloud?
Secondly, whilst I said I was looking at the SDK, I've never actually used it, because the REST API has always managed to give me what I want.
So ... having answered my first question, what are you actually trying to do? Do you have some C# code working for simple queries but want to get worklogs? Or are you just starting?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using the Atlassian.SDK (10.5.0), along with Tempo, and using JIRA Core in the cloud.
basically, im converting Rally Stories/Defects into JIRA, but I cant seem to find the best way to set the Original Estimate for the story.
I've tried to use :
issue.AddWorklogAsync("0h 1m", WorklogStrategy.NewRemainingEstimate, "3d").Wait();
but this does not update the Original Estimate.
I'd like to see the original estimate being set when i create the story, I understand now the AddWorkLog is for when your altering the timeline once the story started.
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.