Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

How to link sourcetree feature branch to a Jira issue/Task??

Dear friends:

I met a problem, I have craeted a feature branch called a_test_branch_1234 in BitBucket in Remote Repo, I hope to create an issue called task_1234 and subtask called subtask_5678 in Jira and hope this feature branch a_test_branch_1234 can link to this task and subtask,
And I have created task_1234 and subtask_5678 already, looks like I cannot link them together,
really hope guru here throw some lights to guide me how to to it?
My way so far is on the right track or not?

Please give some advise.

Thanks
Charlie

2 answers

1 accepted

1 vote
Answer accepted
Mikael Sandberg Community Leader Dec 14, 2021

The way you link a Jira issue to a branch in Bitbucket is to include the issue key, for example JRA-123, as part of the branch name. Note that the key has to be first in the branch name like this, JRA-123-My-branch.

Good morning, Mikael!
Thanks for advice.
You mean to associate a Jira task is :
1. Create an issue in Jira first like JRA-123, then get this Jira issue key  JRA-123
2. Then create a BitBucket feature/release branch and in the subject to include this Jira issue key  JRA-123 in remote Repo.

That is correct creation order, right?
instead of reverse, correct?

and subtask is same order, right??


I think I did wrongly. I created branch 1st, not include 

Thanks so much

Charlie

Mikael Sandberg Community Leader Dec 14, 2021

Correct, and you can create the branch directly from Jira once you created the issue. You should see a Development section on the right-hand side, and from here you can create a branch, and Bitbucket will then suggest the name of the branch for you, consisting of the issue key and the summary field.

Thanks so much,

"you can create the branch directly from Jira once you created the issue. You should see a Development section on the right-hand side, and from here you can create a branch, and Bitbucket will then suggest the name of the branch for you, consisting of the issue key and the summary field."

I am looking for this Development section on the right-hand side for long time, I did not see it, 

Do I need to open this issue I created to enter into issue to see this "Development section on the right-hand side"?

See picture attached
Maybe we are not on the same page?

I am in wrong place?

Curious there is this "Development section on the right-hand side" or panel?

Thanks again

Charlie

Mikael Sandberg Community Leader Dec 14, 2021

In order to create the branch directly from within Jira you have to link your project to your Bitbucket. Have a look at Connect Jira Cloud to Bitbucket for more information.

Thanks,
I follow your instruction, 
Create an issue named Jira_123 in Jira, then create a branch started with Jira_123, it looks like Jira_123_test456;


then Update code, push again, I got this error:


XXXXXX: JIRA Issue does not exist
remote:
remote: In order to commit, your JIRA must be "In Development".
remote:

I check Jira again, 

Its status is in development, pls see attached picture..

thank

Mikael Sandberg Community Leader Dec 14, 2021

You have to check how your hook is setup in Bitbucket, it might be that it also triggers on commit comments, so you would have to make sure any issues mentioned in the comment are in the correct status.

Like Steffen Opel _Utoolity_ likes this

Good morning, Michael:
I got successful push, I fix the issue.

Thanks a lot.

Like Mikael Sandberg likes this

Also Looks like this "Development section" is located in lower part of issue, named Activity, in Activity section, there is a sub_section called source tab within Activity section, open source tab, on the right side of source tab, there is a development section,; and on the left side of source tab, there is an admin section.

So If I want to see this source tab, I need admin privilege, right?

Is this correct??
If yes, I have no admin section, also I have no source tab within Activity section,

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

7,020 views 5 13
Read article

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