Click here to Skip to main content
Click here to Skip to main content

Atlassian Jira - TortoiseSVN Plugin for Issue Tracking and Easy Linking of Subversion Project with Jira Issue

By , 30 Mar 2009
 

Introduction

This application is a plugin for TortoiseSVN. It integrates into your TortoiseSVN application.

If you use Atlassian Jira for issue tracking and TortoiseSVN for subversion repository management, you may want to manage the issue when working towards copy committing. This plugin helps you at this time.

Using the Code

JiraBrowserPlg DLL is the main plugin DLL. This is the source code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Interop.BugTraqProvider;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using JiraTortoBrowser;

namespace JiraTorto
{
    [ComVisible(true)]
    [ClassInterface(ClassInterfaceType.None)]
    [Guid("7C054A52-725F-4053-BFCF-44988D9BA5DE")]

    public class JiraTortoPlugin : IBugTraqProvider2, IBugTraqProvider
    {
        
        #region IBugTraqProvider2 Members

        public string GetCommitMessage(IntPtr hParentWnd, string parameters, 
		string commonRoot, string[] pathList, string originalMessage)
        {
            return GetCommitMessage2(hParentWnd, parameters, "", commonRoot, 
						pathList, originalMessage);
        }

        public string GetCommitMessage2(IntPtr hParentWnd, string parameters, 
	string commonURL, string commonRoot, string[] pathList, string originalMessage)
        {
            try
            {
                MainWindow window = new MainWindow();
                window.Activate();
                if (window.ShowDialog() == DialogResult.OK)
                {                                        
                    return (originalMessage + "\r\n" + window.SelectedIssue());
                }
                return originalMessage;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                throw;
            }            
        }

        public string GetLinkText(IntPtr hParentWnd, string parameters)
        {
            return "Show Issues...";
        }

        public bool HasOptions()
        {
            return true;
        }

        public string OnCommitFinished(IntPtr hParentWnd, string commonRoot, 
			string[] pathList, string logMessage, int revision)
        {            
            MainWindow form = new MainWindow();
            form.Show();
            
            return "an error happened while closing the issue";
        }

        public string ShowOptionsDialog(IntPtr hParentWnd, string parameters)
        {
            frmAccountSettings settings = new frmAccountSettings();
            if (settings.ShowDialog() != DialogResult.OK)
                return "";

            string options = settings.Text;
            return options;
        }

        public bool ValidateParameters(IntPtr hParentWnd, string parameters)
        {
            return true;
        }

        #endregion
    }
}

History

  • 30th March, 2009: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Ahmet Göktaş
Software Developer Istanbul Bilgi University
Turkey Turkey
Member
- Software developer from İstanbul/Turkey
- Programmed with C#.NET, ASP.NET, ASP, PHP, T-SQL
- SQL Server Administration
- Experiencing about NHibernate

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionI can not get data from Atlassian Jira with path "/rpc/soap/jirasoapservice-v2?wsdl"memberH.K Vietnam Ltd.2 May '13 - 21:16 
Hi,
 
I can not get data from Atlassian Jira with path http://myjira.Atlassian.net/rpc/soap/jirasoapservice-v2?wsdl", this return empty data. I think that, the code can not use for new version of the jira(version 6). If so, Would you please help to find out the solution to fix this problem?
 
Thanks.
GeneralAn alternative implementation on csharptest.netmemberdmreference dot com24 Aug '09 - 7:42 
csharptest.net[^] has a version that is an alternative to the one posted here, it is also open source and supported from http://code.google.com/p/csharptest-net/[^]
GeneralSome bugfixes [modified]memberLinne7424 Jun '09 - 10:07 
The included Interop.BugTraqProvider.dll has not the latest interface declaration from TortoiseSVN 1.6.x (IBugTraqProvider2) and crashes TortoiseSVN! The project has to rebuild with the actual Interop.BugTraqProvider.dll and small changes at the interface declaration. After this the plugin works again.
Also there should be a note, that you have to declare a custom filter on Jira, to see any issue in the list.
 
modified on Wednesday, June 24, 2009 4:18 PM

GeneralRe: Some bugfixesmemberAhmet Göktaş30 Jun '09 - 7:35 
thanks for reply
i will recompile and post it again in next days..
 
C#.Net Development

GeneralRe: Some bugfixesmemberVlad Volkov24 Nov '09 - 4:09 
Apparently, you still didn't have a chance to rebuild the plugin.
I've tried to fix the stuff, here is the download (both source code and installer): http://dl.dropbox.com/u/644287/JiraTorto_mod.7z. Would you please review and publish it?
GeneralRe: Some bugfixesmemberAhmet Göktaş24 Nov '09 - 6:16 
thx. i test your changes..its works nicely. and i added new dll for new version of Jira. tested on Tortoise 1.6.6 and its works.
 
thanks for help Smile | :)
 
C#.Net Development

GeneralRe: Some bugfixesmemberAhmet Göktaş24 Nov '09 - 6:20 
i cant update my article but now sending new version to site admins for update my article..
 
C#.Net Development

GeneralCombining multiple BugTraqProvider into a single projectmemberLinne Jan16 Jun '09 - 10:14 
Hi,
 
I just started a discussion about "Combining multiple BugTraqProvider into a single project". May be you want to join the discussion in the Gurtle mailing list (http://groups.google.de/group/gurtle[^]
 
Jan
GeneralTSVN Versionmemberledz27 Apr '09 - 11:06 
What Tortoise SVN version did you use ?
GeneralRe: TSVN VersionmemberAhmet Göktas27 Apr '09 - 12:04 
im using 1.5.7
 
C#.Net Development

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 30 Mar 2009
Article Copyright 2009 by Ahmet Göktaş
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid