Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Create JIRA issue from SharePoint Work Request

Edited

Currently in my workplace, we use both SharePoint and JIRA as issue trackers/work requests. What we want is when a user submits a work request on our SharePoint site, it will automatically create a JIRA issue, and populate fields in the JIRA issue based on fields in the SharePoint work request. (I hope I'm making sense so far) I have been able to successfully use the JIRA Rest API to print JIRA issue fields to the console in Visual Studio, but ultimately will somehow need  JIRA to recognize that a SharePoint work request has been submitted, and to create an issue from it. 

1 answer

0 votes
Ben Kelley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 17, 2017

I'm not all that familiar with what you can do from the SharePoint side, but can you get SharePoint to call the JIRA REST API to create an issue when a work request is created?

This is what I got to work for me. I just add a service reference in my visual studio project to our SharePoint site, then using the Atlassian SDK, take those items from SharePoint and populate them into JIRA. When I run my program, it creates JIRA stories from the SharePoint work requests.

 

using Atlassian.Jira;

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;

namespace ConsoleApplication3
{
public class Jira_SP_API
{
public static void Main(string[] args)
{
Jira jira = Jira.CreateRestClient("jira url", "username", "password");

var context = new SharePoint.ITDataContext(
new Uri("SharePoint url"));
context.Credentials = System.Net.CredentialCache.DefaultCredentials;

var workrequests = from request in context.WorkRequests
where request.Id > 260
orderby request.Id
select new
{
request.Id,
request.Title,
request.RequestTypeValue,
request.RequestStatusValue,
request.PriorityValue,
request.RequestDate,
request.Requestor.Name,
request.BusinessApprover.FirstName,
request.BusinessApprover.LastName,
request.WorkAssignedTo,
request.FunctionalArea,
request.WorkRequestFormReadOnly
};

foreach (var request in workrequests)
{
try
{
var issue = jira.CreateIssue("TEST");
issue.Type = "Story";
issue.Priority = request.PriorityValue;
issue.Summary = request.Title;

issue.SaveChanges();
}
catch (Exception) { }

 

}
}
}
}

 

What I haven't gotten to work is to populate custom JIRA fields I created in my JIRA environment. I've tried this: 

issue.CustomFields.Add("Functional Area", request.FunctionalArea); //Functional Area customfield_10050

But when I run my program with this in my code, it doesn't create JIRA stories.

Like jar jar likes this

How do you call the JIRA REST api?  I don't have Visual Studio only access to SharePoint Designer from which I could make the call.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events