youngmon/atlassian-qna huggingface dataset:
{{issue.issuelinks.outwardIssue.key}} not working during issue create
Asked by Rajendra Borde:

I want to send an email with a list of linked issues when a new issue is created. The issue being created has a linked issues (blocks).

I've setup a simple workflow - When issue created, then send email.

In the body of the email, I'm using {{issue.issuelinks.outwardIssue.key}} to list out the linked issues. But the linked issues don't show up in the email I get after the issue is created.

I'd appreciate any pointers to how I can get this to work.


Answers:
author: Bill Sheboy
body: Hi [@Rajendra Borde](/t5/user/viewprofilepage/user-id/4385021)

You are using the issue created trigger, so there could be a timing issue where the data is not yet available when the event occurs. (This is a known problem for automation.)

The work-around to solve this is to add a [Re-fetch action](https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Re-fetch-issue-data) immediately after your trigger and before any other rule components. This will slow down the rule and reload the issue before proceeding.

Kind regards,  
Bill

comments: author: Rajendra Borde
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Thank you for the the response. I've tried adding the Re-fetch action immediately after my create issue created trigger and before the send email component. Unfortunately it didn't work. I've tried adding several re-fetch actions blocks and multiple email components but no luck. If I change the trigger to transition issue, it works.


author: Bill Sheboy
body: Would you please post images of your complete rule which does not work as you expect, and of the audit log showing the execution details? That may provide some context to uncover what is happening. Thanks!

Also, are you using Jira Cloud or Server/Data Center?
[Automation] Problems with accessing root data for "webhookData" from list
Asked by pavlova_iryna:

Hi,

I am trying to setup a webhook for Git pipelines and post their status in MTeams chat. My problem happens when I iterate through list of "builds" and try to access parent value.

```
{{webhookData.project.web_url}} WORKS

{{#webhookData.builds}}
    {{webhookData.project.web_url}} DOES NOT WORK
{{/}}
```

Is it a bug? Or am I doing something wrong?


Answers:
author: Bill Sheboy
body: Hi [@pavlova_iryna](/t5/user/viewprofilepage/user-id/1097599)

When you note this "does not work", what are you observing? What is in the audit log for the rule?

And when you iterate over the values in a list that way, you do not repeat the top-level: just the child attributes. For example (*and I have not tested this as I do not know the response data structure*):

```
{{#webhookData.builds}}
    {{project.web_url}}
{{/}}
```

You may want to log all of the webhookData to see what the structure actually contains.

Kind regards,  
Bill

comments: author: pavlova_iryna
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) ,

The structure is definitely correct. I additionally verified it with the "Log" action.

Your example references an element in list iteration, which should be with the full name as:

```
{{webhookData.builds.project.web_url}}
```

But I need precisely a property one level upper.


author: Bill Sheboy
body: What I was describing was *when you use a list iterator* with smart values, only the child attributes (smart values) are referenced. Please see this documentation for examples with issue fields: <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#Combined-function-examples>

You note the structure is correct, so if the iterator is not working I suggest working with your site admin to submit a ticket to Atlassian support for assistance. Your team can do that if you are are on a paid license of Jira: <https://support.atlassian.com/contact/#/>


author: pavlova_iryna
body: Ah, I see it now. Thanks a lot for the clarification!
Assign Global Sprint to multi project Issues
Asked by djones:

Hi,

I have a Engineering Board which has 10 projects aligned with it. In ENG board I have created Sprint as "Early Deployment".

Now I want to make a script which if anybody creates issue in any of these 10 projects, Sprint "Early Deployment" is updated in Sprint field.

Note that this Sprint "Early Deployment" is just placeholder for Scrum Board and so its not active sprint or it will never be a Active sprint.

When I try to edit Sprint field in Automation, it doesnt show this Sprint name, it just gives Active or Next Sprint from any of the 10 projects.


Answers:
author: Pramodh M
body: Hi [@djones](/t5/user/viewprofilepage/user-id/4171767)

Get the Sprint ID as shown below

![Sprint ID.png](https://community.atlassian.com/t5/image/serverpage/image-id/172571i5ACFD5CF777A3916/image-size/large?v=v2&px=999 "Sprint ID.png")

Once you have the Sprint ID, Update the Automation Action to Update the Sprint Field in Advanced Section as below

```
{
   "fields": 
   {
      "sprint": 7
   }
}?
```

where 7 is the Sprint ID

Please let me know if it worked for you, Also the Actor should have Permission to add the Sprint to an Issue. Make sure Automation for Jira App has the permission

Thanks,  
Pramodh

comments: author: Pramodh M
body: Ref Links are below :-)

<https://community.atlassian.com/t5/Jira-questions/Automation-for-Jira-Cloud-Future-Sprints/qaq-p/1530986>

<https://community.atlassian.com/t5/Jira-Core-Server-questions/How-to-find-the-Sprint-ID-Number-on-JIRA-server-for-current/qaq-p/1009916>

Thanks,  
Pramodh


author: djones
body: Hi [@Pramodh M](/t5/user/viewprofilepage/user-id/3691224) ,

Thanks for quick solution, this really worked well. I didnt think using Sprint ID instead of name.

Thanks a lot once again.


author: Pramodh M
body: Welcome ?

Thanks,

Pramodh
When update pull request bamboo is not trigged
Asked by Jessy Giacomoni:

Hi everyone,

I create a pull request from bitbucket.org. Create a bamboo plan branch it's ok.

But when I update this branch (or I made the pull request) bamboo is not trigged, but bitucket see no build about this commit.

But how to trig automatically bamboo when branch has a new commit...

Thanks,


Answers:
author: Patrik S
body: Hey [@Jessy Giacomoni](/t5/user/viewprofilepage/user-id/5443427) ,

thank you for reaching out to Community!

The behavior you are looking for can be achieved by configuring a webhook in Bitbucket Cloud to trigger a bamboo build. A webhook will essentially trigger a request to an external server (Bamboo in this case) whenever there's an event in the bitbucket cloud repository, such as a new push to a branch, or a new pull request is created.

The events that will trigger a webhook can be selected when creating the webhook on the Bitbucke cloud repository. Those events can also be edited later on the repo's webhook page.

The following article provides detailed instructions on how to integrate your Bitbucket Cloud repositories and your Bamboo instance through webhook:

* [Atlassian Support Bamboo 9.5 Documentation Triggering builds Data Center 9.5 Triggering a Bamboo build from Bitbucket Cloud using Webhooks](https://confluence.atlassian.com/bamboo/triggering-a-bamboo-build-from-bitbucket-cloud-using-webhooks-873949130.html)

If after going through that article you have any questions, feel free to ask.

Thank you, [@Jessy Giacomoni](/t5/user/viewprofilepage/user-id/5443427) !

Patrik S

comments: author: Jessy Giacomoni
body: Hi, thanks for this answer,

It's ok for me !

thanks,

Jessy G.


Tags: bamboo

bitbucket-cloud

cloud
Bitbucket pipelines self-hosted runners in AWS
Asked by Sudhir VR:

Can I create Bitbucket pipelines with self-hosted runners in AWS ECS or Fargate?


Answers:
author: Syahrul
body: G'day, [@Sudhir VR](/t5/user/viewprofilepage/user-id/5443339)

Welcome to the community.

It should be possible in ECS, but I am unsure if it's on Fargate. Since it's a 3rd party hoster, we don't have expertise on whether it's possible.

With that in mind, based on a similar thread discussion [here](https://community.atlassian.com/t5/Bitbucket-questions/Re-Re-Does-the-BitBucket-Pipeline-Runners-work-on-AWS-ECS/qaq-p/1785073/comment-id/65264#M65264), there could be some constraints running Pipelines runners on AWS ECS, specifically with running a docker-in-docker service container that requires privileged mode.

So, as long as AWS ECS allows a docker-in-docker service container with privileged mode, you can use Pipelines runner there.

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
Bitbucket pipeline interaction with the self-hosted runners created in the AWS EC2 private?
Asked by Sudhir VR:

How does the Bitbucket pipeline interact with the self-hosted runners created in the AWS private subnet? Should I create the EC2 instance behind a public-facing NLB (Network load balancer)?


Answers:
author: Syahrul
body: G'day, [@Sudhir VR](/t5/user/viewprofilepage/user-id/5443339)

Welcome to the community.

Unfortunately, we can't advise much on this since it's a 3rd party hoster. However, I believe trying with and without public-facing NLB won't harm you to see if Runner could communicate with Bitbucket.

The general idea is that as long as Runner can communicate with Bitbucket cloud via HTTPS, it should be possible. You might want also to check the list of IPs to allow:

[IP addresses to allowlist in your corporate firewall](https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/)

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
Can I commit to the same branch after my PR is merged to develop
Asked by Shivansh Kaldaik:

Hy, I have a doubt. Let us say I create a PR in bitbucket with a branch named branch_123.

I got the approvals and I merged this PR to develop.

Now if I do another commit to the same branch after my PR is merged, will it affect my previous PR and can I create a new PR with the new changes in the same branch.

Thanks


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: I understand that you want to push another commit to a branch that has already been merged to a target branch.

While it is certainly not best practice, I believe this is possible. From a technical perspective in Git, a branch is essentially a lightweight *movable* pointer to a specific commit in the version history. Branches in Git make use of pointers that automatically advance to the latest commit when new changes are made.

Here is some sophisticated ASCII art of how that looks like

```
                 H (feature, after merge to release)
                / .
       A---B---C   .       (feature)
      /         \   .
-----D---E---F---G--(I)      (release)
```

Commit 'H' is just another commit to which branch 'feature' points to. You could create another PR from the updated 'feature' branch (H) to 'release' which, when merged, would create commit (I). The release branch would 'point' to commit (I)


author: Jessy Giacomoni
body: Hi,

No, if your branch has been merged, this will have no influence on your old request.

Best regard


Tags: unknown-hosting-type
Couldn't log you in error message
Asked by minggang_chen:

![Screenshot 2024-03-03 at 16.56.42.png](https://community.atlassian.com/t5/image/serverpage/image-id/309826iC6E8BD7374B34B97/image-size/large?v=v2&px=999 "Screenshot 2024-03-03 at 16.56.42.png")

Hi

I keep getting this error when I try to get into Bitbucket. I have no problem with getting into other products like Trello. Could I please get some help on this issue?

Regards

Cecil


Answers:
author: Patrik S
body: Hey [@minggang_chen](/t5/user/viewprofilepage/user-id/5443228)

welcome to the Community!

Your account was in an inactive state due to the long period of inactivity, which was preventing you from logging in.

I went ahead and set the account to active again, so you should be able to log in as usual.

Could you please try again and let us know how it goes?

Thank you, [@minggang_chen](/t5/user/viewprofilepage/user-id/5443228) !

Patrik S

comments: author: minggang_chen
body: Hi Patrik

Appreciated! It works now, thank you.


author: Laurie Sciutti
body: Hi [@minggang_chen](/t5/user/viewprofilepage/user-id/5443228) and welcome to the Community! Your account may be inactive so you'll need Atlassian Support assistance. Maybe [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) or [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) can assist.


author: Ste Wright
body: Hi [@minggang_chen](/t5/user/viewprofilepage/user-id/5443228)

Have you tried using a different browser, or incognito mode?

Ste

comments: author: minggang_chen
body: Hi Stephen

Thanks for helping me. Yes, I have tried Safari and Chrome on MacOS. I have also tried Edge and Chrome on Windows. Cleaning all the browser cache and the incognito mode didn't help either. I have also tried social login via Gmail and login with username and password. I got the same error message.

Regards

Cecil


Tags: bitbucket-cloud

cloud
A problem with authorization while cloning repo to local storage.
Asked by Gugo:

I just started to learn Git and make a clone of repo.

I have an error in terminal:

"remote: Invalid credentials

fatal: Authentication failed for '<https://bitbucket.org/......git/>' "

Troubleshooting section in manual doesn't help solve the problem.

Username and password are correct.

What is the reason?

Thx


Answers:
author: Gugo
body: Problem solved, but only after assigned the app password.


Tags: bitbucket-cloud

cloud
Jenkins integration turns Bitbucket base url from https to http
Asked by ThomasK:

In the Jenkins plugin the Bitbucket base URL is specified with HTTPS as [https://bitbucket.myco.com and](https://bitbucket.myco.com?and) the verification test works fine. However, in the pipeline job, Jenkins is trying to checkout the code as <http://bitbucket.myco.com/scm/PROJECT/REPO.git>. In our env, http access is not forwarded to https so the checkout is blocked.

It's very frustrating as the plugin seems to make up the url wrong even though the Bitbucket server url is specified as <https://bitbucket.myco.com> in the Jenkins system configuration pertains to the plugin, and it seems to be some simple config issue. Cannot figure out if the issue is on the Jenkins side or on the Bitbucket side (probably the API might be returning wrong url to the plugin). Any ideas on how to force Jenkins to use the specified base url?


Answers:
author: ThomasK
body: Checked the output of this endpoint later and realized that the API is returning "http" urls: GET /rest/api/1.0/projects/PROJECTKEY/repos/REPONAME

So this is no fault of Jenkins plugin :-)

How to resolve this on the Bitbucket side? The base url is https, and API doesn't honor that. There is an AWS ALB in front of this service the https is terminated at the LB level, and the root cause could be that. Any ideas on how to force the API to generate https urls?


Tags: bitbucket-data-center

data-center
Error cloning a repository
Asked by sclemens:

I am moving to a new laptop. On my old laptop I can clone repositories without a problem. Moving to the new laptop I attempt to clone a repository and I get the error.

fatal: Bitbucket DC OAuth Client ID must be defined

I do not see this when cloning from my old laptop. I am able to login to the repository without an issue. I've been able to connect SourceTree to the repository with an access token, but I get the same error in SourceTree when trying to clone. Seems like my new laptop is missing something but I don't have any idea of what it could be.


Answers:
author: Saxea _Flowie_
body: Hi [@sclemens](/t5/user/viewprofilepage/user-id/5442747) ,

You could try to debug on the machine that works and see the details about the authentication and then compare to your new machine.

This doc provides info about [debugging](https://confluence.atlassian.com/bbkb/troubleshooting-ssh-issues-302811847.html) the connection.


Tags: bitbucket-data-center

data-center
Cannot allow push to repository via API for a specific user
Asked by Hansi B.:

Hi there,

via the API, I want to restrict pushing for new repositories to specific groups and users. This works nicely for most cases - as described in [the API documentation](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-branch-restrictions/#api-repositories-workspace-repo-slug-branch-restrictions-post ), I can restrict pushing, e.g., for user *ABC* and group *XYZ* using

```
{
"branch_match_kind": "glob", "pattern": "main",
"kind": "push",
"users": [ { "username": "ABC" } ],
"groups": [ { "slug": "XYZ" } ]
}
```

However, there is one user for whom this does not work - the administrative "Jenkins" user. For him, I get an error

```
"error": {"message": "write or admin access required: jenkins"}
```

I would have thought this means that "Jenkins" requires specific access to the repository, but even giving him admin permissions on the repository did not help. At the same time, I *can* allow pushing for "Jenkins" manually in the GUI (even without the admin permissions).

I am wondering if this has to do with my limited admin status in our company workspace - while I am an admin in the specific project where I want to import the repositories, I have few permissions beyond.

I am using an AppPassword that has *Write* +*Admin* access both for "Projects" and "Repositories" (and *Read* access for "Workspace membership").

Any ideas anyone?

Cheers

C.


Answers:
author: Theodora Boudale
body: Hi [@Hansi B.](/t5/user/viewprofilepage/user-id/5442562) and welcome to the community!

This error shows when the user you are trying to add does not have at least write permissions to the repo. I believe you are using the wrong username. I checked the workspaces you have access to, and although there is a user with Name 'Jenkins' in one of them, the username of this account is different.

If you have access to this account's credentials, you can log in to <https://bitbucket.org/> with that user's email and password and find the username here: <https://bitbucket.org/account/settings/>. If you don't, you can ask the person who set up this account to check.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora

comments: author: Hansi B.
body: Thank you, that was indeed the problem. An admin has provided me with the **uuid** of the "Jenkins" user, and using that works:

```
{
"branch_match_kind": "glob", "pattern": "main",
"kind": "push",
"users": [ { "uuid": "{abcdef-xyzxyzyxz-123etc}" } ]
}
```


author: Theodora Boudale
body: That's good to hear, thank you for the update. Please feel free to reach out if you ever need anything else!


Tags: bitbucket-cloud

cloud
I need to run git GC on one of my repositories
Asked by Iv?n Arvizu Bejarano:

I need to run git GC on one of my repositories, How can I contact support for get this done?


Answers:
author: Mark C
body: Hi [@Iv?n Arvizu Bejarano](/t5/user/viewprofilepage/user-id/5442630)  

Welcome to the community.  

If your workspace is on a paid plan, you can raise a support request through this link: <https://support.atlassian.com/contact/#/>

Otherwise, you can provide your repository URL here and I'm going to run Git GC (Garbage Collection).

<br />

Regards,  
Mark C

comments: author: Iv?n Arvizu Bejarano
body: My repository is <https://bitbucket.org/REDACTED/>


author: Mark C
body: Hi [@Iv?n Arvizu Bejarano](/t5/user/viewprofilepage/user-id/5442630)  

I went ahead and ran GC against your repositories.  

Let me know if you have any further questions.  

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Bitbucket Slack Notifications
Asked by ahmadh:

Hi, I already setup the slack integration since 2021, but it doesnt' work recently (it doesn't send any notif if there are changes from git push, commit etc). When I try to add subscription to new slack channel I got this error

![bitbucket-slack.png](/t5/image/serverpage/image-id/309659iC5987B15696BBF5D/image-size/large?v=v2&px=999 "bitbucket-slack.png")

I can get the list connected repo from slack channel using \`/bitbucket list\` command.

Any solution for this? Thank you


Answers:
author: ahmadh
body: I think I found the issue: because I'm using free subscription and, I already used too many webhooks, I can't send any message tho

![limited-message.png](https://community.atlassian.com/t5/image/serverpage/image-id/310222i67E84A6D46DAE51B/image-size/large?v=v2&px=999 "limited-message.png")

comments: author: Ay?eg?l Yavuz G?k??o?lu
body: Hi [@ahmadh](/t5/user/viewprofilepage/user-id/5442447)

We have Bitbucket apps for Slack with a generous free plan.

You can check them:  

<https://actioner.com/app-directory/bitbucket-pipelines-15> To run pipelines in Slack \& get status and Bitbucket events notifications in Slack

<https://actioner.com/app-directory/bitbucket-pull-request-management-16> To get PR notifications (new PR, comment, build status, new commits) in dedicated PR channels

Feel free to reach out if you have any questions,

Best,

Ay?eg?l @Actioner team


Tags: bitbucket-cloud

cloud

slack
Clone repo with repository specific token
Asked by Oleh735:

Hi I have **self hosted** bitbucket server(Atlassian Bitbucket v8.14.1) and i'm trying to clone repository with **repository specific token** using this command

```
git clone https://x-token-auth:<TOKEN>@<my-host>/<workspace>/<repository>.git
```

Could someone explain to me what should i use as a '**workspace'** because when use project name or my user name i'm getting 'Not Found' error.


Answers:
author: Aman Shrivastava
body: Hi Oleh735,

It appears that you are trying to clone the repository using the incorrect clone URL. Workspaces are a notion found in Bitbucket cloud, not in Bitbucket DC/Server.   
In BitbucketDC/Server, you may obtain the clone URL of any repository by browsing it and clicking the clone button.  
Please review the [HTTP access tokens](https://confluence.atlassian.com/bitbucketserver0814/http-access-tokens-1305643361.html) KB article which outlines multiple ways for cloning a repository using the access token.  

Regards,  
Aman


Tags: bitbucket-server

clone

server

token
Hi, I would like to download commit history for all the users in my repos. How can i do that quickly
Asked by Arun Sharma:

Please help us in getting commit history


Answers:
author: Theodora Boudale
body: Hi [@Arun Sharma](/t5/user/viewprofilepage/user-id/4390897),

You can get this info with Git commands in a clone of a repo.

Make sure you run first a **git fetch** in the clone to get any updated refs.

Then you can run the following command to get all commits with author a specific email

```
git log --author=someuser@example.com --all
```

If you'd like to get this info for multiple repos, you would need to run this in the clone of each repo.

Please feel free to reach out if you have any questions.

Kind regards,  
Theodora


author: Nikola Perisic
body: Hello [@Arun Sharma](/t5/user/viewprofilepage/user-id/4390897)

The summary from page: [https://stackoverflow.com/questions/25133600/how-to-download-source-code-for-a-particular-commit-in-bitbucket#:\~:text=To%20download%20a%20particular%20commit,click%20zip%20under%20download%20column](https://stackoverflow.com/questions/25133600/how-to-download-source-code-for-a-particular-commit-in-bitbucket#:~:text=To%20download%20a%20particular%20commit,click%20zip%20under%20download%20column).

"To download a particular commit in Bitbucket go to : Repositories -\> Select repository click on Downloads --\> Branches. You will find all the commits made to the repository. Select which commit you want to download. To download as a zip file, click zip under download column."


Tags: bitbucket-cloud

cloud