JIRA 6 integration improvement
UPDATE 2015/01/27: This functionality has been released months ago and it is available in all recent 5.0 and 5.4 versions (it was released back in 5.0.44.551 and 5.4.9.552).Some of our customers requested in UserVoice a better integration with JIRA, the popular issue tracker by Atlassian. Our JIRA extension is able to log checkin information into a JIRA custom field. The problem is that if you change a lot of files, this field grows a lot, and sometimes got unusable.
Now the data logged can be customized
With the new version, it’s possible to define a constant in the JIRA server to customize what data can be logged into the custom field, so the JIRA administrator can decide what information wants to see there, for example, the following:Also you can view changeset diffs from JIRA
Also, we have added a mechanism to view the changeset differences from JIRA. There are two possibilities. If you have installed the PlasticSCM WebUI, you can show a link to the WebUI diff changeset URL:If you don’t have the WebUI installed in your company, you can open the changeset in your PlasticSCM client using the following:
How to configure it
And now, the tricky part. In order to configure it, you need to:- Configure your JIRA as a PlasticSCM extension:
- Open PlasticSCM -> Preferences -> IssueTracking and configure Plastic to use you JIRA server:
- Configure the JIRA server:
- Create or edit a file called jira-config.properties in the JIRA home directory:
C:/Program Files/Atlassian/Application Data/JIRA (on Windows) /var/atlassian/application-data/jira (on Linux)
- Add the following content:
jira.websudo.is.disabled=true plastic.diffchangeset.url=DIFF_URL plastic.formatdata=FORMAT_DATA_STRING
- Restart the JIRA server
Configuring the diff URL
There are three variables that the extension replaces:$changeset$ -> the changeset number $repository$ -> the repository name $server$ -> the server nameConfiguration examples:
plastic://showchangeset=cs:$changeset$@$repository$@$server$
http://yourwebuiserver/$repository$/ViewChanges?changeset=$changeset$
Configuring the log format data
A format data string is a string that can have free text and some variables. The variables are numbered and are written between brackets. You have 8 variables that you can use as format data, and are the following:{0} -> Prints the changeset date {1} -> Prints the changeset number {2} -> Prints the Plastic SCM repository {3} -> Prints the Plastic SCM server {4} -> Prints the author of the changeset {5} -> Prints the diff URL configured in the JIRA server {6} -> Prints the changeset branch {7} -> Prints the checkin comments {8} -> Prints the list of the items modified in the changeset {9} -> Prints the changeset GUIDThese are some valid expressions. Note that you can use \r\n for a new line character:
Date: {0}\r\nChangeset {1}@{2}@{3} by {4}\r\nDiff: {5}\r\nNranch: {6}\r\nComments: {7}\r\nItems:\r\n{8} Changeset {1}: {5} {0}{1}{2}{3}{4}{5}{6}{7}{8} Changeset {1} by {4}\r\nViewDiffs: {5}
Note: These plastic:// URLs do not work with the changeset syntax as indicated above anymore. (At least not for me, running 5.4.16.683)
ReplyDeleteFor me the correct diff URLs are:
Branch: plastic://showbranch=br:/main@REPO@SERVER:PORT
Changeset: plastic://showchangeset=cs:1234@br:/main@REPO@SERVER:PORT
where obviously you update your cs # and branch path, repo, and server+port as required.
Hi Ryan, Thanks for your feedback. We will review the integration and we will also update the article with the new URLs values.
Delete