It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira issue key mandatory

engg Jul 14, 2013

Hi,

When we do a TFS check-in, is it possible to make a JIRA issue key mandatory in the check-in comment?

The goal is to not allow a TFS check-in if the JIRA issue key is missing in the check-in comment.

Thank you.

- Saurabh

6 answers

1 accepted

0 votes
Answer accepted
Andrzej Pasterczyk Jul 14, 2013

Hi,

If you use our check-in policy then it is mandatory to associate check-in with JIRA. However by design TFS allows to override policy warning (in fact allowing to bypass it) but you can set up e-mail notification on such events (see here for example http://www.woodwardweb.com/vsts/policy_override.html )

engg Jul 17, 2013

When we do a TFS check-in, UseTFS shows JIRA issues to choose from, right, to associate one with the current check-in? Does it show all the JIRA issues or only the ones assigned to the person checking in (preferable)? Does UseTFS use any other filters like the status of JIRA issues e.g. showing only the ones that are not closed?

Thanks.

Andrzej Pasterczyk Jul 18, 2013

UseTFS allows users to either access their filters that are saved in JIRA or directly write JQL query (unfortunatelly without those nice suggestions that you get using JIRA web interface).

Also you can filter and sort the results.

engg Jul 31, 2013

Thank you Andrzej. When we add Jira issue key (e.g. JIRA-1234) to either check-in comment or check-in notes, does 'UseTFS Jira plugin' check if that JIRA issue key exists i.e. JIRA-1234 is a valid JIRA issue and not a random string?

If it doesn't, then does 'UseTFS check-in policy' component enforce that?

In UseTFS - check-in policy video, the user checks one of the four checkboxes to associate a JIRA issue with the code change. What happens if we don’t check any?

Thanks.

1 vote
Alex Perez Jul 15, 2013

Hi engg,

In Subversion you can add some scripts that are executed every time a user uploads some code (commit), called hooks. In these hooks you can enforce that the user fills the comment, references a JIRA issue, all methods are documented, whatever ... or the hook raises an error that prevents the commit.

But this is more related to the subversion management (TFS in your case) than jira nor subversion plugin. As far I understand, this is out of the useTFS plugin scope (preventing checkin), but in the TFS. Does TFS have some way to call a script or external program to allow or disallow a code check-in?

if yes, you can write a simple java program that access Jira and checks if all keys mentioned in the comment exists as issue Key.

Edit: Ive deleted this answer few minutes after posting, because just noticed that TFS has something called 'checkin policies' and really I dont know anything about TFS except by comparing with SVN, so I thought that this answer wasn't really helpful.

HTH

0 votes
engg Jul 14, 2013

I meant in useTFS.

0 votes
Alex Perez Jul 14, 2013

Hi engg,

In Subversion you can add some scripts that are executed every time a user uploads some code (commit), called hooks. In these hooks you can enforce that the user fills the comment, references a JIRA issue, all methods are documented, whatever ... or the hook raises an error that prevents the commit.

But this is more related to the subversion management (TFS in your case) than jira nor subversion plugin. As far I understand, this is out of the useTFS plugin scope (preventing checkin), but in the TFS. Does TFS have some way to call a script or external program to allow or disallow a code check-in?

if yes, you can write a simple java program that access Jira and checks if all keys mentioned in the comment exists as issue Key.

HTH

0 votes
engg Jul 14, 2013

Thank you, Andrzej. I will look into it.

Also, Alex Perez's comment is not visible here. Alex, your answer is helpful too. I will explore wriiting a hook in TFS to achieve this.

The other goal is to view TFS check-ins from Jira web UI. Is this possible without using a plug-in like UseTFS or TFS4JIRA?

Thanks.

I wanted to leave the question open, but in an attempt to see Alex Perez's comment here, somehow Andrzej's answer got accepted.

0 votes
engg Jul 17, 2013

Andrzej,

When we do a TFS check-in, UseTFS shows JIRA issues to choose from, right, to associate one with the current check-in? Does it show all the JIRA issues or only the ones assigned to the person checking in (preferable)? Does UseTFS use any other filters like the status of JIRA issues e.g. showing only the ones that are not closed?

Thanks.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Marketplace Apps & Integrations

Demo Den Ep. 4: Continuous Integration with CircleCI & Jira Software

Get ready! Demo Den Episode 4 is coming your way on Tuesday, May 28, 2018 with a Continuous Integration and Delivery special demo. CircleCI Director of Solutions Engineering, Eddie Webb will show us ...

621 views 0 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you