Hi there!
I'm new to Jira Development and I'm a bit confused on how can I manage Jira issues programmatically.
My goal is to create a windows application (prefferably using microsoft tools -C#/VB.NET etc-) with the functionality of creating and editing a Jira issue.
I've searched for possible solutions but couldn't find something suitable to my requirements.
So if there is any link for guides or tutorials regarding issue management through code, I would appreciate it if you could let me know..
Thanks in advance
George
As far as I undertand about using SOAP using Visual Studio C# (with any version for that matter), do an auto generation of code by importing the WSDL from your local jira or even one of the publich JIRA instances (same version) and directly using the generated classes. I have no clue about atlassian.jira.dll, I have not used it.
And if you business logic requires that you trigger JIRA, then SOAP or REST is fine. But if you need JIRA to trigger you, either you should write a plugin, or use the latest method of Webhooks (in labs) which can trigger you via JSON data during issue changes.
And regarding, when/how you write a plugin, read https://developer.atlassian.com/display/HOME/Welcome
Renjith,
What do you mean by "do an auto generation of code by importing the WSDL from your local jira or even one of the publich JIRA instances (same version) and directly using the generated classes." How can I do that?
Regards
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Praveen, check http://lmgtfy.com/?q=access+a+web+service+visual+studio+wsdl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
VB.Net methods (Don't forget that JIRA is a case sensitive instance and the JIRA issue key MUST be upper cased when using methods)
This should get you started
'JIRA specific variables Private JiraSoapService As New JiraSoapServiceService Public JIRA_token As String = "" Public JIRA_userName As String = "" Public JIRA_password As String = "" Public JIRA_status As String = "" Public JIRA_key As String = "" Private Const JIRA_ProjectStr = "TECH" 'JIRA specific functions and Subs 'Connect & login Sub JIRA_Connect() JIRA_token = JiraSoapService.login(JIRA_userName, JIRA_password) End Sub 'LOGOUT Sub JiraLogout(ByVal JIRA_userName As String) Try JiraSoapService.logout(JIRA_userName) Catch ex As Exception 'Nothing to do if there is an error. 'Maybe the user is already disconnected because of the session timeout. End Try End Sub 'Return a JIRA issue by ID Function JIRA_getIssue(ByVal issueKey As String) Dim theJiraIssue As RemoteIssue Dim theJiraProject As RemoteProject Dim remoteUser As RemoteUser = JiraSoapService.getUser(JIRA_token, JIRA_userName.ToLower()) If Trim(remoteUser.name) <> "" Then 'Set the JIRA project type theJiraProject = JiraSoapService.getProjectByKey(JIRA_token, "TECH") 'Get the Issue structure theJiraIssue = JiraSoapService.getIssue(JIRA_token, issueKey.ToUpper) JIRA_key = theJiraIssue.key 'Set the status string For Each remoteStatus As RemoteStatus In JiraSoapService.getStatuses(JIRA_token) If remoteStatus.id = theJiraIssue.status Then JIRA_status = remoteStatus.name End If Next Return theJiraIssue Else : Return vbNull End If End Function
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's a method for adding a comment:
Private Sub butSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butSave.Click Dim theComment As New RemoteComment Try theComment.author = theUser theComment.body = tbComment.Text theComment.created = Date.Now JIRA_setIssueComment(theComment) theSubmitResult = 1 Me.DialogResult = DialogResult.OK Catch ex As Exception MsgBox(ex.Message, , "Error saving comment") theSubmitResult = 3 Me.DialogResult = DialogResult.Abort End Try End Sub 'Add comment to JIRA issue Sub JIRA_setIssueComment(ByVal theComment As RemoteComment) JiraSoapService.addComment(JIRA_token, JIRA_key, theComment) End Sub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interacting with the JIRA SOAP services via C# is pretty straight-forward. The one important "trick for beginners" to note is that the WSDL file generated by JIRA is incompatible with the .NET WCF Client in .NET 3.0 and greater. To successfully generate client classes for .NET you need to use the older .NET 2.0 wsdl generator (in Visual Studio that's a "Web Reference" rather than a "Service Reference", or using the command line wsdl.exe tool).
For a leg-up on building out the client classes, have a look at https://bitbucket.org/farmas/atlassian.net-sdk/wiki/Home and https://bitbucket.org/MikeJansen/jirarestclient.net/wiki/Home
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for your reply Joseph
i'll checkout the links you posted (and probably return with more questions :) )
George
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In addition to the .NET SDK that Joseph mentions above, you might also find this useful: https://bitbucket.org/farmas/jiratrayapp. It is a windows tray application to create JIRA issues (written in C#).
- Federico
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Checkout https://developer.atlassian.com/display/JIRADEV/JIRA+RPC+Services
REST is the preferred way as it is improving lot in the later/upcoming versions. JIRA 5.0 has big improvements with REST.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
REST is not supported for creat/update/delete in 4.1. You might want to look at SOAP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, but it's not as advanced as Jira 5.0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i forgot to mention that in my company we use Jira v4.1
Is REST applicable to this version?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply
As i can see soap will be the right way to implement my application....
Does anyone know if there are any examples of using soap services within c# or VB.NET?
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.
Hi Jordan,
Thanks for your reply. But could you be more expalanative. Also, please mention any reference materials for the same.
Regards
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
REST is not supported as a platform but you still can create your own APIs and deploy it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not familiar with Visual Studio, but I suspect reading the docs for it will get you a much faster answer than hoping that someone here knows VS well enough to walk you through it, spots your comment and takes the time to answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can create the REST api required what you think will do the job and the REST API can be called from any client. It is reqular as any other plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Praveen, I hope you read the comment from Joseph Clark below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am breaking out this to a new answer below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Renjith,
Thanking you first. I've written a code snipped similar to the one mentioned in https://bitbucket.org/MikeJansen/jirarestclient.net/src/f77556b2be7e/JiraRestClient.Test/JiraRestClientTest.cs
But as I've written this code in VSTA which supports .NET 2.0 framework, the issue arised. The Atlassian.Jira.dll provided by JIRA is of version 4.0.
So, I had to rule out this opiton. I don't know if I'll have to use a plugin to interact with my project. In that case will there be an issue with the version of dlls?
What is the main use of plugin?
Sorry if i'm posting too many questions.
Regards
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.