youngmon/atlassian-qna huggingface dataset:
Sum Up - Currency Rollup Calculation from Task to Epic
Asked by Marina Koga:

Hi ,

Could anyone please advise what am I doing wrong?

The idea is to be triggered everytime Budget Consumption is updated on a Task level and updated to Parent Epic_Budget Consumption...

![Capture1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/275359iA29153CE8039EBCB/image-size/large?v=v2&px=999 "Capture1.PNG")

**Trigger details**

![Capture2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/275361i9D04CDCD07209D20/image-size/large?v=v2&px=999 "Capture2.PNG")

**Lookup issues**

![Capture3.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/275362i0C96A139B4A2AA6C/image-size/large?v=v2&px=999 "Capture3.PNG")

**Edit Issue Field**

**![Capture4.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/275363i9AE02AC85974F429/image-size/large?v=v2&px=999 "Capture4.PNG")**

Currently, as a result when Budget consumption updates on Task it clears the field in Epic. Will this have to do with OOTB setup?

![Capture5.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/275364i5748F5E43E24607E/image-size/large?v=v2&px=999 "Capture5.PNG")

Many Thanks

Marina


Answers:
author: Curt Holley
body: I think in the edit issue field you want to have {{lookupIssues.Budget Consuption.sum}}

comments: author: Marina Koga
body: Thanks for you comment, is the below aligned to your suggestion? If so , this current rule is not rolling up to parent (epic) as expected. Are you able to confirm? Many Thanks

![lookup.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/276795i2B1BB787BF318163/image-size/large?v=v2&px=999 "lookup.PNG")


author: Curt Holley
body: [@Marina Koga](/t5/user/viewprofilepage/user-id/5215604) You don't want to put {{lookupIssues.Budget Comsumption.Sum}} as the JQL for the lookup. You need to put that in the Edit Budget Comsumption action.   
You put the JQL that will provide the content in the look up


author: Hauke Bruno Wollentin
body: In your branch rule you need the smart value *{{triggerIssue.\[...\]}}* instead of *{{issue.\[...\]}}* to get access to the fields of your Task and not your branch Epic.

comments: author: Marina Koga
body: Thanks Hauke,

Are you able to confirm if the below setup is as per your suggestion? This still not working and i believe i am missing something (being new on this, appreciate your help and patience).

Many Thanks

Marina![Issue.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/276799iB85A4746802A9758/image-size/large?v=v2&px=999 "Issue.PNG")


author: Hauke Bruno Wollentin
body: I'm not 100% sure since I never had the case you described, but in the official documentation I can't find any function ".sum" like you used.

But still there are some math functions available that you could try out.

<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/>

To be honest, since we have bought ScriptRunner I typically use Groovy to perform such calculations, but maybe it is possible by Jira Automation + Smart Values at all.
How do I get pull request reviewers without sending additional requests?
Asked by Jonathan Zavialov:

I am sending a request to this endpoint:

<https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests>

to get a list of pull requests for a repository. Each pull request in this list does not contain the **reviewers** array. The docs say "For performance reasons, the API only includes this list on a pull request's `self` URL". Is there any way to modify my request so it returns this list, so I can avoid having to send additional requests?


Answers:
author: Ben
body: Hi Jonathan,

Unfortunately, this is not possible - you would need to query each individual PR for this information.

We have an active [feature request](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) ticket logged with our developers to implement this, however. Please feel free to **Watch** this to receive future updates related to it and **Vote** for it to improve its visibility with regard to customer demand:

* <https://jira.atlassian.com/browse/BCLOUD-22700>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: api

bitbucket-cloud

cloud

pull-request
Changes since last review? greyed out
Asked by Alex Oren:

The new "Changes since last review" option is always greyed-out for me, even when I see in the "overview" tab and the "commits" tab that there are additional commits.

Can it be that rebases confuse it?  
We often rebase because of merge conflicts.


Answers:
author: Patrik S
body: Hey [@Alex Oren](/t5/user/viewprofilepage/user-id/5131904) ,

thank you for reaching out to Community!

We've created a support ticket for you to investigate this issue further. You should be receiving the ticket link soon in your mailbox. Let us know in case you don't receive it so I can share the link here (the ticket is only visible to you and the Atlassian staff).

Thank you, [@Alex Oren](/t5/user/viewprofilepage/user-id/5131904) !

Patrik S

comments: author: Mike Dezube
body: Encountering the same issue, can you add me to the support ticket to follow along? Or any updates on this?


author: Mark C
body: Hi [@Mike Dezube](/t5/user/viewprofilepage/user-id/5565132)

You can reach out to us by raising a support request here: <https://support.atlassian.com/contact/#/>

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
How properly to create custom dependency cache with file checksum-based hashing?
Asked by etreskovskis:

I am trying to use the caches key option to create a custom dependency cache with file checksum-based hashing according these examples:

<https://support.atlassian.com/bitbucket-cloud/docs/cache-and-service-container-definitions/#Caches>

<https://bitbucket.org/blog/announcing-smarter-caches-bitbucket-pipelines>

```
definitions:
  caches:
    pip: ~/.cache/pip
    virtualenv: venv
    proxies: $BITBUCKET_CLONE_DIR/artifacts/proxies
    googleapi:
      path: services/google_api/dependencies
      key:
        files: [ $BITBUCKET_CLONE_DIR/services/google_api/dependencies/dependency.json ]


```

however the step always fails with error:

**Cache "googleapi: services/google_api/dependencies": Cache key files could not be found.**   
HOW to solve this issue? Tried different options to provide different format paths for the \`path\` variable  

It works ONLY in this way:  

```
definitions:
caches:
pip: ~/.cache/pip
virtualenv: venv
proxies: $BITBUCKET_CLONE_DIR/artifacts/proxies
googleapi: $BITBUCKET_CLONE_DIR/services/google_api/dependencies
```


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

I believe the issue is that you're using an absolute path for the **key file.** Cache directory paths can be absolute, or relative to the clone directory, but the path to the key files needs to be relative to the clone directory.

Could you try the following definition?

```
definitions:
  caches:
    pip: ~/.cache/pip
    virtualenv: venv
    proxies: $BITBUCKET_CLONE_DIR/artifacts/proxies
    googleapi:
      path: services/google_api/dependencies
      key:
        files: [ services/google_api/dependencies/dependency.json ]
```

Kind regards,  
Theodora

comments: author: etreskovskis
body: Great! It worked!!!  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/331947iFCB4AE61084B64AB/image-size/large?v=v2&px=999 "image.png")


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

cache

cloud
That SSH Key is Invalid
Asked by Gary Preston:

I'm trying to add an SSH key (stored on my NitroKey3) for bitbucket access, but receive the error "That SSH key is invalid".

It seems to only happen when I try to paste in a key starting with:

sk-ssh-ed25519@openssh.com

Yet the docs state ed25519-sk keys are supported by bitbucket, under "bitbucket supports the following key types":-

<https://confluence.atlassian.com/bitbucketserver/ssh-user-keys-for-personal-use-776639793.html>

The key works fine for SSH between different hosts and also added without issue to GitHub. Is the bitbucket documentation wrong? Are ed25519-sk keys not supported?

Is there anyway to contact support from a free account?


Answers:
author: Theodora Boudale
body: Hi Gary and welcome to the community!

The documentation you linked is for Bitbucket Data Center only. Bitbucket Cloud does not support ed25519-sk keys at the moment. The supported keys for Bitbucket Cloud are listed on this page:

* <https://support.atlassian.com/bitbucket-cloud/docs/configure-ssh-and-two-step-verification/>

We have a feature request that you can vote for here:

* <https://jira.atlassian.com/browse/BCLOUD-20297>

Regarding how to reach support: customers with access to Free workspaces are entitled to community support only. We do have Atlassian staff checking community questions as well.

Your account has access to a workspace on a paid billing plan though, so you can also raise a ticket with the support team for issues concerning this workspace or your account. You can create a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Get build status of master branch in ScriptRunner
Asked by Borislav Stoilov:

Hello, I am creating a merge check that will block the merge button in case there is a ongoing build on master.  

I am trying to do this in script runner but since its running in Groovy sandbox I can't perform http request to the bitbucket rest API and fetch the status.  

How can I achieve this??


Answers:
author: Yannis Argyropoulos __ScriptRunner - The Adaptavist Group__
body: Hi [@Borislav Stoilov](/t5/user/viewprofilepage/user-id/5528544)

A custom Merge Check with this script should do the job :  

\`\`\`\`

import com.atlassian.bitbucket.hook.repository.RepositoryHookResult  
import com.atlassian.bitbucket.build.BuildState  
import com.onresolve.scriptrunner.canned.bitbucket.util.BitbucketPageUtils  
import com.atlassian.bitbucket.build.status.RepositoryBuildStatus  
import com.atlassian.bitbucket.repository.Ref  
import com.atlassian.bitbucket.repository.RefService  
import com.atlassian.bitbucket.repository.ResolveRefRequest  
import com.atlassian.bitbucket.build.status.BuildStatusRepositorySearchRequest  
import com.atlassian.sal.api.component.ComponentLocator  
import com.atlassian.bitbucket.build.status.RepositoryBuildStatusService  
import com.atlassian.bitbucket.repository.Branch  
import static com.atlassian.bitbucket.repository.StandardRefType.BRANCH

<br />

def repositoryBuildStatusService = ComponentLocator.getComponent(RepositoryBuildStatusService)  
def refService = ComponentLocator.getComponent(RefService)

def resolveRefRequest = new ResolveRefRequest.Builder(mergeRequest.pullRequest.toRef.repository)  
.type(BRANCH)  
.refId(mergeRequest.pullRequest.toRef.id)  
.build()

def branch = refService.resolveRef(resolveRefRequest) as Branch  
log.info("Will scan for builds on branch ${branch}")

<br />

def buildSearchRequest = new BuildStatusRepositorySearchRequest.Builder(mergeRequest.pullRequest.toRef.repository)  
.ref(branch as Ref)  
.build()

Iterable\<RepositoryBuildStatus\> builds = BitbucketPageUtils.pagedIterable(repositoryBuildStatusService.\&search, buildSearchRequest)  
def buildInProgrsess = false

log.info("found ${builds.size()} builds")  
builds.each {  
if (it.state == BuildState.INPROGRESS) {  
buildInProgrsess = true  
log.info("Blocked by Build on commit ${it.commit} with status ${it.state}")  
return  
}  
}

if (buildInProgrsess) {  
RepositoryHookResult.rejected("Rejected because build is in progress on destination branch", "Detailed information about merge rejection.")  
}

<br />

\`\`\`\`


Tags: bitbucket-data-center

data-center

merge

pull-request

script-runner

scriptrunner

server
How will the new ci/cd runtime (microVM, runc) affect self hosted runners?
Asked by Raffael Herrmann:

After reading the [latest blog post](https://bitbucket.org/blog/announcing-our-new-ci-cd-runtime-with-up-to-8x-faster-builds) on the new ci/cd runtime, I feel a little bit lost...

The new runtime is based on microVM/runc. The old runtime has already been discontinued as of September 2024.

However, there is no indication either in the blog article or in the documentation as to what impact this will have on self-hosted runners? (Especially the Docker Linux runner.) Is there any further information here?

[@Edmund Munday](/t5/user/viewprofilepage/user-id/4953583) can you share some details?


Answers:
author: Theodora Boudale
body: Hi Raffael and welcome to the community!

This blog post concerns Pipelines builds that run on Atlassian's infrastructure. This change will not impact self-hosted runners.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Bitbucket Pipeline "docker: command not found"
Asked by Luigi Loria:

After following the article "[Run Docker commands in Bitbucket Pipelines](https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/)" I came up with this sample pipeline I'm trying to build for a Python repository.  

```
image:

   name: python:3.10-slim

pipelines:

  branches:

   '**':

     - step:

         name: Test Docker Commands

         runs-on:

            - 'self.hosted'

            - 'docker'

            - 'linux'

         services:

            - docker

         script:

            - export DOCKER_BUILDKIT=1

            - docker version

definitions:

  services:

     docker:

        memory: 2048
```

But I get the following error:

    bash: docker: command not found

Is there something I'm missing or misunderstood? Thank you in advance


Answers:
author: Ben
body: Hi [@Luigi Loria](/t5/user/viewprofilepage/user-id/5528429)

The reason that you are seeing this error message is that docker is not included as part of the build image you are using (**python:3.10-slim**), I've tested this by running the image locally and attempting to perform docker commands and received the same error message:

```
> docker run -it --entrypoint=/bin/sh python:3.10-slim
> docker info
/bin/sh: 1: docker: not found
```

You will need to first [install Docker](https://command-not-found.com/docker) as part of your script before attempting to run Docker commands (or use a different build image that includes Docker).

We have documentation that covers this in greater detail that you may find below:

* <https://confluence.atlassian.com/bbkb/bitbucket-pipelines-command-not-found-error-1267761733.html>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-pipelines

cloud
All My Repos just gone
Asked by ServeMeAndroidTeam:

I do not know what is happened I just find I was busy with other works and back to check my account and to get some codes but I found all repos just gone

I do not get any notification or migration process I do not know what is happened


Answers:
author: Ben
body: G'day!

Welcome to the Bitbucket Cloud community!

Please rest assured that you have likely not lost your data, as Bitbucket Cloud would not delete repository data for any reason other than via manual user intervention.

What has likely occurred is that you are looking at the wrong workspace. We changed the UI last year to [only show a single workspace at a time](https://bitbucket.org/blog/improving-navigation-for-bitbucket-users) rather than a workspace overview, so please follow the steps within this [article](https://confluence.atlassian.com/bbkb/workspace-has-disappeared-incorrect-workspace-loaded-1319573739.html) below:

1. Firstly, check the path for your repository by executing the following command so that you may locate the correct workspaceID:   

   ```
   git remote -vvv
   ```

2. Log in to Bitbucket and click your avatar in the top-right corner, then select the **All Workspaces**option from the dropdown
3. Check the list of workspaces in this list and compare these to the location of the repository reported by the above command, then click on the correct workspace that holds this repository

If you are still unable to locate your repository, please let me know what timezone you are in so that I may raise a support ticket on your behalf.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: ServeMeAndroidTeam
body: yes you are right I was looking in the wrong workspace

thanks a lot


Tags: bitbucket-cloud

cloud
Manually skip or trigger stage deployment
Asked by megha:

Hi team,

Right now, I run a few steps and then deploy to staging and then to production in a sequential manner.  
I want to deploy to staging sometimes but not always i.e. I want to skip the deployment to staging.   
The deployments of both staging and production are manual trigger but right now, I can't deploy to prod unless n until I have deployed to staging.   
I want to know how can I achieve this i.e. deploying to production without deploying to staging using master branch only.


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

Welcome to the community!

Unfortunately, it's not possible to skip manual steps or trigger a step based on a specific condition at this moment. We do have an existing feature request currently that you can track them at:

* <https://jira.atlassian.com/browse/BCLOUD-20833>

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
Permission to branching model hierarchy
Asked by Rodrigo Olivares B2:

We use branching model and permissions with proyect level configuration.

We are trying to allow to developers only create and commit into branches like "feature/ISSUE-CODE-..."

We are trying to acomplish that using, on project permissions:

* "\*", nobody access
* "feature/\*" write: developer-group, write with PR: anyone with access

Users in "developer-group" can't commit neither using console or bitbucket web.

How we can acomplish that?

NOTE: we've already applied this setup

<https://confluence.atlassian.com/bbkb/restrict-creation-of-branches-to-certain-patterns-1272283176.html>


Answers:
author: Patrik S
body: Hello [@Rodrigo Olivares B2](/t5/user/viewprofilepage/user-id/1690994) ,

and welcome to the Community!

I wasn't able to reproduce the issue you are facing, as when I set the following branch restriction rules :

![Screenshot 2024-06-25 at 4.05.18?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/331722i64F189D914EAD94A/image-dimensions/426x151?v=v2 "Screenshot 2024-06-25 at 4.05.18?PM.png")

It allowed my user only to commit to branches matching the feature/\*, while it was blocked for other types of branches. Could you confirm if you have a different configuration (in my example, I've used my user, but that could also be a user group)?

Also, you mentioned configuring this at the project level, but it may be the case that there are some other rules at the repository level (Repository Level \> Branch Restrictions) that could be playing a role in this. So I would recommend checking if there is any other more strict branch restriction at the repo level on that particular repository you identified developers were not able to commit.

It's important to note as well that in addition to being allowed in the branch restrictions, the user group must also have at least write access to the project/repository in question to make new commits. In this case, could you please confirm if the user group you're using for the test has write access granted in the project (*Project Settings \> Project permissions*) to which the testing repository belongs?

If you have any questions, feel free to ask.

Thank you, [@Rodrigo Olivares B2](/t5/user/viewprofilepage/user-id/1690994) !

Patrik S


Tags: bitbucket-cloud

branch-permissions

cloud
Request Garbage Collection
Asked by Supun De Silva:

One of the repositories I am working on was at 3.84GB; therefore, I went ahead and removed some large files using BFG Repo-Cleaner and pushed the changes to BitBucket. Afterwards, the repository showed a size of 4.42GB on BitBucket. When searching as to why that happened, I saw some other threads saying that garbage collection might need to be run on BitBucket's side to bring down the repository size. Would it be possible to run garbage collection on the repository starting with "training-large"?


Answers:
author: Ben
body: Hi Supun,

I have executed a gc against that repository and it has reduced from 4.4GB to 592MB.

It is normal for repository sizes to inflate after using the BFG tool, as this creates dangling commits/blobs that must be targetted with a gc to remove. This will run on an automatic basis once a certain number of garbage is present, but you may also ask support at any time to execute this for you from our end manually.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Supun De Silva
body: Thank you!


Tags: bitbucket-cloud

cloud
2FA security bug on login?
Asked by travistst:

Why did i just have to setup 2FA again? I already had 2FA setup. I logged in today and got prompted to setup 2FA again. So i proceeded to see what would happen. Setup was successful and i was also able to use a key from old 2FA setup to login to my account. Now i have 2 2FA codes i can use to get into my account. Looks like a security bug.


Answers:
author: travistst
body: Hello, I see "*essentially you will first need to authenticate with your Atlassian Account before you are able to authenticate with your Bitbucket Cloud account.*" That doc was last updated 15 Sept 2023? How did i not get a prompt to enable the other 2FA before yesterday? Multiple web logins since 15 Sept 2023 and not until yesterday do i get prompted with a confusing request to enable another 2FA.

That doc seems focused on if users forgot or don't know one of the other factors. As of today i have to go through 3 steps. This is what my login flow looks like now:

1. Visit atlassian to view my bitbucket, click login
2. Enter username and password
   1. redirect to 2FA
3. Enter 2FA code
   1. redirected to another 2FA
4. Enter a different 2FA code
5. Access repository

The link says i can disable one, but how do i know which one i should disable without dissecting all atlassian resources or compromising security? How do i directly login to my bitbucket instead of having to go through redirects and enter 3 forms of auth? Is there a specific link i can visit to get past this when i just want to login to bitbucket? It seems more like a engineering bug with the work around being this confusing UX. Did someone just push the code to prompt for the extra 2FA yesterday?

comments: author: travistst
body: No response to the direct questions? I guess "*We received your request. Help is on the way! An Atlassian Support Engineer will review the post and respond on this thread within 2 business days.*" is also just words that don't mean anything.


author: Ben
body: Hi travistst,

There are 2 layers of MFA present here, one layer is at the Atlassian account level and the other is at the Bitbucket Cloud account level - more information may be found below:

* <https://confluence.atlassian.com/bbkb/how-to-disable-reset-2fa-on-bitbucket-cloud-and-atlassian-account-1236932929.html>

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
We are unable to identify our company admin owner
Asked by Brandi Olchak:

We are unable to identify our company admin owner and believe it to be someone who is no longer with the company. How can we find who is listed as admin owner, to confirm. Then in turn assign admin ownership to the correct person.


Answers:
author: marc -Collabello--Phase Locked-
body: You need to contact Atlassian support directly, this forum can't help you.


Tags: bitbucket-cloud

cloud