How to Ensure developers in Jira, Bitbucket/Git make codes changes only for bugs or stories.

Jamie Young April 3, 2024

I am thinking of creating a rule that requires users to acknowledge there are no code changes if they are aligning with issues other than bugs or stories.  I would like some assistance.  I do not know if Jira has this capability.  I know you can configure a rule for moving an issue from task to others.  

2 answers

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2024

With our apps you can verify:

  1. if every commit has a message mentioning an issue key
  2. and if the mentioned issue key is matching a JQL query

If you use JQL query like this, then you have the check in place:

type IN (Bug,Story)

 In a similar way, you can check if the issue status is "In progress", if the assignee is the developer, and many other valuable things! See some ideas here.

The apps you need:

  1. On the Jira side: https://marketplace.atlassian.com/apps/1213415/better-commit-policy-for-jira-git-subversion-and-more?hosting=datacenter&tab=overview
  2. On the Bitbucket side: https://marketplace.atlassian.com/apps/1214430/better-commit-policy-for-bitbucket?hosting=datacenter&tab=overview

(Discl. I am a developer working on these apps.)

Jamie Young April 4, 2024

Could I add A rule in bitbucket? How can I stop developers from adding work to issues that are tasks for jira.?

Levente Szabo _Midori_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 21, 2024

As Aron mentioned, you need a (free) Bitbucket companion app that works with Better Commit Policy for Jira, called Better Commit Policy for Bitbucket. It allows you to apply the policies to your Bitbucket repositories.

0 votes
MattD April 3, 2024

I think it might be easier to enforce this in your version control system. That is, don't allow a PR to be merged unless it contains a Jira issue key and that issue is a Bug or Story. How you do that depends on your integration of Jira and version control

Jamie Young May 21, 2024

That I can do, but I need to stop developers from merge against tickets that contain code changes only when the issue key = 'Task'.  This appears to be quite difficult!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events