Hi,
Plugin requires that in svn 'log message' commiter insert Jira Key e.g. TST-20.
But more obvious should be inserting link to jira issue e.g https://jira.company.pl/browse/TST-20 (it is faster to copy-paste from browser than typing key) but is not accepted by jira-svn plugin.
We think about adding post-commit hook to svn that modify "log message" but maybe there is better way to do it?
Regards
Michał
No better ways. In fact having just the key is better as it shortens the commit message and also helps not to tie down the commit to a JIRA server.
I guess pre-commit is the only way.
We add post commit tha add key to log_message using link and we modify log_message using svnadmin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
find_jira_key(){ perl -e ' $org_str = $ARGV[0]; $out_str = $org_str; if ($org_str =~ m/(https\:\/\/<your http jira address>\:[0-9]*\/browse\/[A-Z]*\-[0-9]*)/) { $jira_str = $1; if( $jira_str =~ m/([A-Z]*\-\d+)/) { $jira_key = $1; if ( !($org_str =~ m/(?<!\/)$jira_key / ) ) { $out_str = $org_str; $out_str =~ s/$jira_str/$jira_key ($jira_str)/; } } } print $out_str; ' "$@" } SVN_LOG=`svnlook -r $REV log $REPOS` TEMP_FILE=`mktemp /tmp/svn_tmp_XXXXX`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
find_jira_key(){ perl -e ' $org_str = $ARGV[0]; $out_str = $org_str; if ($org_str =~ m/(https\:\/\/jira\.datera\.pl\:[0-9]*\/browse\/[A-Z]*\-[0-9]*)/) { # Znalazl link do jiry $jira_str = $1; if( $jira_str =~ m/([A-Z]*\-\d+)/) { # znalazl jira key $jira_key = $1; # Sprawdza czy przypadkiem juz nie ma klucza w log message if ( !($org_str =~ m/(?<!\/)$jira_key / ) ) { # nie znalazl juz samego klucza w stringu wstawiam $out_str = $org_str; $out_str =~ s/$jira_str/$jira_key ($jira_str)/; } } } print $out_str; ' "$@" } SVN_LOG=`svnlook -r $REV log $REPOS` TEMP_FILE=`mktemp /tmp/svn_tmp_XXXXX`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We added such script after commit/changing log_message
find_jira_key(){ perl -e ' $org_str = $ARGV[0]; $out_str = $org_str; if ($org_str =~ m/(https\:\/\/<your http jira address>\:[0-9]*\/browse\/[A-Z]*\-[0-9]*)/) { $jira_str = $1; if( $jira_str =~ m/([A-Z]*\-\d+)/) { $jira_key = $1; if ( !($org_str =~ m/(?<!\/)$jira_key / ) ) { $out_str = $org_str; $out_str =~ s/$jira_str/$jira_key ($jira_str)/; } } } print $out_str; ' "$@" } SVN_LOG=`svnlook -r $REV log $REPOS` TEMP_FILE=`mktemp /tmp/svn_tmp_XXXXX`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We added such script after commit/changing log_message
find_jira_key(){ perl -e ' $org_str = $ARGV[0]; $out_str = $org_str; if ($org_str =~ m/(https\:\/\/<your http jira address>\:[0-9]*\/browse\/[A-Z]*\-[0-9]*)/) { $jira_str = $1; if( $jira_str =~ m/([A-Z]*\-\d+)/) { $jira_key = $1; if ( !($org_str =~ m/(?<!\/)$jira_key / ) ) { $out_str = $org_str; $out_str =~ s/$jira_str/$jira_key ($jira_str)/; } } } print $out_str; ' "$@" } SVN_LOG=`svnlook -r $REV log $REPOS` TEMP_FILE=`mktemp /tmp/svn_tmp_XXXXX`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can set the system property jira.option.ignore.url.with.key then it will work with the full url - this is what we've been using for years. https://jira.atlassian.com/browse/JRA-12032
Set that <jira-home>/jira-config.properties.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
are you sure that URL will be interpreted by SVN plugin as key?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works fine for me. But perhaps I hacked something in the source... I've had to do a lot of hacking to that plugin over the years. Or maybe it's another property, I'll check when I'm in work tomorrow.
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.
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.