youngmon/atlassian-qna huggingface dataset:
Initiative sets in canceled - also all tickets related get the same status
Asked by Stefano De Santis:

I need a global automation that if I set the status "canceled" to an initiative then all the children, both work packages and epics and stories, take the status canceled


Answers:
author: Manoj Gangwar
body: Hi [@Stefano De Santis](/t5/user/viewprofilepage/user-id/5303184)

You can create an automation like below example:

**Example of Automation Rule Configuration:**

* **Trigger:** Issue Transitioned

  * Status: Canceled
* **Condition:** Issue Fields Condition

  * Field: Issue Type
  * Condition: equals
  * Value: Initiative
* **Action:** Branch rule / related issues

  * Branch: Children
* **Action within Branch:** Edit Issue

  * Field: Status
  * Value: Canceled

comments: author: Trudy Claspill
body: Adding to this...

[@Stefano De Santis](/t5/user/viewprofilepage/user-id/5303184)

Do you use only Company Managed projects in your instance or do you also use Team Managed projects?

If you use Team Managed projects do you expect the issues in those projects to be transitioned also?


author: Stefano De Santis
body: I want to spread the rule also to Team Managed projects. Thank you


author: Trudy Claspill
body: I do not believe you can use a Global rule to change statuses on issues in Team Managed projects.

Within an Automation rule when you use a Transition Issue action and select a specific status, in the backend the automation rule is finding the unique ID associated with that Status.

Company Managed projects use globally defined status values, so the "Canceled" status in them is the same single Status in the backend.

Team Managed project have project specific statuses. Even if the Team Managed project uses a status named "Canceled" it is a different status the the "Canceled" status used in Company Managed projects and different from any "Canceled" status used in another Team Managed project. The backend ID for each of those Canceled statuses will be different. A Global automation rule won't be able to determine which one it should actually use.

You mentioned "initiatives" as the trigger issue.

Are you using a Premium or Enterprise subscription where you have extended the Issue Type Hierarchy to include level(s) above Epics for Initiative and potentially other issues? That would add another wrinkle to the use the creation of the rule(s) since the issue hierarchy can't be extended directly in Team Managed projects. Instead you have to have the issues for those additional levels in a Company Managed project, and make the TM issues children of those CM project issues.

I think that you would have to have multiple rules, with rules specifically for each Team Managed project.


author: Stefano De Santis
body: I use an Enterprise subscription


author: Trudy Claspill
body: Are you cross-project-parenting the issues so that Team Managed project issue might be descendants under Initiatives?
Restricting creating branch by push
Asked by Wiryono:

Hi is there a way to restrict pushing new branch unless specify in the branch permission ?

<br />

Lets say I have this branch specify in the branch restriction

main

test

dev/\*

feature/\*

release/\*

How do I make sure they not pushing "my-custom-unknwon-branch" to this repo


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: If you were on Bitbucket *server* you could add a custom server side pre-receive hook.

Since you're on Bitbucket cloud there is no such mechanism in place.

There is a 10-year old feature request - <https://jira.atlassian.com/browse/BCLOUD-10471> - for allowing server-side pre-receive hook. You are welcome to vote for and watch this issue.

Atlassian [proposes a work-around](https://jira.atlassian.com/browse/BCLOUD-10471?focusedId=3407404&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-3407404) of using custom merge-checks based on the Forge platform. I think you could create a custom merge-check that check the PR source branch pattern and veto the PR if the PR source branch pattern is not valid, i.e. 'my-custom-----'

This is not exactly what you are asking for, but it would discourage users to push random branch names because the PRs that they create, won't get merged.

Merge-checks allow you to display a message, which you could use to 'educate' the person that pushed the custom branch name.

Hope that helps

Best, Ulrich

// [Izymes](https://marketplace.atlassian.com/vendors/1210584/izymes-pty-ltd)


Tags: bitbucket-cloud

cloud
I can't install Angular inside my pipeline
Asked by Yossi Geretz:

I am trying to execute the following command so that I can build my Angular application within the pipeline:

- npm install -g @angular/cli

But this throws an error:

+ npm install -g @angular/cli npm

ERR! code EUNSUPPORTEDPROTOCOL npm

ERR! Unsupported URL Type "npm:": npm:string-width@\^4.2.0 npm

ERR! A complete log of this run can be found in: npm

ERR! /root/.npm/_logs/2024-09-25T19_58_43_985Z-debug.log npm

ERR! code EUNSUPPORTEDPROTOCOL npm

ERR! Unsupported URL Type "npm:": npm:string-width@\^4.2.0 npm

ERR! A complete log of this run can be found in: npm

ERR! /root/.npm/_logs/2024-09-25T19_58_43_985Z-debug.log

Here is the yaml:

(The indentation got lost on the paste.)

- step:  
name: Web Admin Portal Deployment  
caches:  
- node  
script:  
- cd Admin  
- npm cache clean --force  
- npm install -g  
- npm install -g @angular/cli  
- ng build --configuration staging  
- cd dist/lightning-admin  
- pipe: atlassian/aws-s3-deploy:1.6.1  
variables:  
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID  
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY  
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION  
S3_BUCKET: 's3-web-stg-0'  
LOCAL_PATH: '/dist/lightning-admin/'


Answers:
author: Yossi Geretz
body: This might be a clue. I threw a command in there to output the version of node:

node -v

v8.9.4

Yikes! That's quite old! On my workstation I am running v20.15.1

How can I get a more recent version of Node installed in the pipeline?


Tags: angular

bitbucket-cloud

bitbucket-pipelines

cloud

node.js
use bitbucket api to get and create repository
Asked by huanqiu:

I want use python to get and create repository, and i have create a new App passwords with full auth. I always get wrong status code 401, please help me.

my python code:

username = "xxx"

app_password = "xxx"

bitbucket_api_url = "<https://api.bitbucket.org/2.0/repositories/>"

def check_bitbucket_repo(repo_slug):

response = requests.get(urljoin(bitbucket_api_url, f"{bitbucket_workspace}/{repo_slug}"), auth=(username, app_password)) #, proxies=proxies #return response.status_code == 200

if response.status_code == 200:

log_message(f"Repository {repo_slug} exists in Bitbucket")

return True

else:

log_message(f"Repository {repo_slug} does not exist in Bitbucket. Status code: {response.status_code}")

return False


Answers:
author: huanqiu
body: new question, i use right username and app_password, the 401 issue is fixed, but i got status:404 when i create repository

Failed to create repository test-bitbucket . Status code: 404

You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated.


Tags: bitbucket-cloud

cloud
Use the Variable in definitions
Asked by Mohan Kona:

I'm trying to send variable to image in services, bit it seems like the variable is not being accepted and it throws error in the line where image with variable is defined.

Please find the yaml file below

```
image: image:latest definitions: steps: - step: &udpateEnvVariable name: Populate Environment script: - export ENV=dev - if [ "$FRONTEND_IMAGE" = "release" ]; then export ENV=qa; elif [ "$FRONTEND_IMAGE" = "daily" ]; then export ENV=dev; else export ENV=dev; fi services: frontend: image: name: image_name:$IMAGE options: docker: true pipelines: custom: dummy: - variables: - name: IMAGE default: daily allowed-values: - daily - release - misc - step: *udpateEnvVariable - step: name: Dummy services: - frontend script: - echo "ENV is $ENV" 
```

and below is the error thrown

![Screenshot 2024-09-24 at 16.24.14.png](https://community.atlassian.com/t5/image/serverpage/image-id/349023iE9978849C750F187/image-size/large?v=v2&px=999 "Screenshot 2024-09-24 at 16.24.14.png")


Answers:
author: Aron Gombas _Midori_
body: I don't think that the YAML above is valid at all. Validate this with an online validator before anything else.

YAML is very sensitive to indentation and line-breaks, those have important meaning.

comments: author: Mohan Kona
body: I couldn't paste the code in yaml format, but to make it simple, i'm trying to provide service value as a variable, something like  

```
definitions: 
 services:
  frontend:
   image:
    name: $docker_image
```

OR

```
services:
  - $docker_image
```


author: Aron Gombas _Midori_
body: The variable in this case is a regular Bitbucket pipeline variable?

Also, I don't know, but I guess it is rather likely that variable names are case-sensitive.


author: Mohan Kona
body: no, the variable here is the user defined one.


Tags: bitbucket-cloud

cloud
payment couldnt process or Bitbucket (workspace-id-redacted)
Asked by Rupesh Rokade:

Hi Team,

I received the mail form atalassina stating payment for Bitbucket (workspace-id-redacted) due to a problem with your payment details.

Can you please help me on this. As after checking we unable to make the payment.

Regards,

Rupesh Rokade


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

I see that you have contacted our Customer Advocate team as well for this issue. The payment failed because there was an issue with the credit card on file. You will need to contact your credit card provider for more info on how to resolve the issue.

If you have any further questions, you can reach out via the support ticket you created.

Just a heads up, I removed the workspace ID from your post to protect your privacy.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

not-applicable

subscriptions-and-billing
error: src refspec master does not match any
Asked by Christophe Verdot:

I have a lot of repo on bitbucket and never had an issue but today, when trying to create a new one, i seem to cannnot set a default master branch, i set it in the repo creation but when i try to push my local code to the repo i get the following:  

```
git push origin master 
error: src refspec master does not match any 
error: failed to push some refs to 'https://bitbucket.org/******/frontend.git'
```

<br />

If i go to my repo setting i see the master as default but let's say i try change the repo name, i get an error related to the default branch (see attached screen).  

Any idea what is happening? This seem very new, never had such issue before.

<br />

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


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

Have you added the changes in the local repo with the following command?

```
git add .
```

After that, did you commit the changes with the following command?

```
git commit -m "some commit message"
```

I can reproduce the error if I attempt to push from a local repo that doesn't have any commits yet.

Do the following commands show any commits and branches respectively, if you execute them in the directory of you local clone?

```
git log
```

```
git branch
```

Regarding the inability to change the repository details from the website, this is because of a bug that occurs when the repo is empty:

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

Once commits are pushed to the repo, you will be able to change the repo's details.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Can you use workspace variables in a custom pipe without passing the variable name?
Asked by Kimberly Anderson:

We're trying to use a custom pipe that builds its own workspace variable names. In the past, we've always declared the deployment and workspace variables in the variables block for the pipe and we've just been able to use them by name. Is there another way to do it that doesn't require passing the names? We're okay with the pipe getting access to all workspace/deployment variables.

Thanks!


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

This is possible the following way:

1. You will need to describe the variables in the pipe.yml file of the pipe's repo
2. Then, you will need to load them in the pipe

An example of this can be found in the following pipe:

* <https://bitbucket.org/atlassian/aws-cloudformation-deploy/src/master/>

The variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION can also be configured as workspace, repository, or deployment variables and then it is not necessary to use them in the pipe's variables block.

For that to work, the variables are described in the pipe.yml file of the repo:

* <https://bitbucket.org/atlassian/aws-cloudformation-deploy/src/8a0b36184b9b04229a50d3852186c9e0c5f0ed41/pipe.yml#lines-5>

And then they are loaded in the pipe in the main.py file (line 529):

* <https://bitbucket.org/atlassian/aws-cloudformation-deploy/src/8a0b36184b9b04229a50d3852186c9e0c5f0ed41/pipe/main.py#lines-529>

Please note that this will work if you later refer to the pipe in the bitbucket-pipelines.yml of another repo with **- pipe atlassian/aws-cloudformation-deploy:0.20.1** , so the format should be **- pipe: BB_workspace/BB_repo:tag**.

It will not work if you refer to the pipe by using theDocker image with **- pipe: docker://docker_acct/docker_repo:tag**.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

pipes

variable

workspace
Bitbutcket Download
Asked by Daniel Painter:

Looking for a way to save our Bitbucket data/environment - so wondering if there is a backup or download process.

Company is going through a small hibernation; trying to cut down all costs for next 6-months.

Want to understand if there is a way to download or backup our Bitbucket environment so we can temporarily close our account. But have a way to reload our environment / saved data back into Bitbucket when we get going again.

Thank you

VR


Answers:
author: Lukas Angst
body: Hy Daniel

If you just use the number of accounts for the standard plan, you could reduce the number of accounts under 5. I imagine you will not need the build minutes in this 6-months, but don't know about the file storage.  
This way you could still leave Bitbucket open, but need to introduce all the accounts again in 6 months. At least all your other settings were preserved.

Best regards

Lukas

comments: author: Theodora Boudale
body: Hi Daniel,

I just wanted to add to Lukas' reply that you'll also need to downgrade your workspace's plan to the Free one, after you remove users, so that you don't get charged.

Bitbucket doesn't have a way of automatically downloading all your data. You can get the core Git repo by running a **git clone** with the **--mirror** flag for each repo, but this is **not** going to download metadata like pull requests, comments, etc.

Removing users from your workspace so that it has up to 5 users, and then downgrading the billing plan to Free is going to keep all your workspace data. And when you are ready to get going again, you can upgrade the billing plan and add more users.

A workspace's billing plan can be changed the following way:

1. Go this page: <https://bitbucket.org/account/workspaces/>
2. Select **Manage** for the workspace you want to check that info for. The **Manage** link is only visible if you are a workspace admin.
3. Select **Plan details** from the left sidebar.
4. On this page, you will see an option to change the billing plan.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Reject deployment
Asked by Dmitriy Kagarlickij:

I have added \`trigger: manual\` to my Deployment to manually check Build results before running deploy

In BitBucket UI I can only see \`Deploy\` button, but what if I want to reject it - how could it be done?

Thanks!


Answers:
author: Theodora Boudale
body: Hi Dmitriy,

There is no option to reject or skip a manual step. We have a feature request for the ability to skip steps that you can vote for and watch here:

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

Do you have additional steps, after the deployment one, that you want to run?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How can I embed a Jira issue collector in Bitbucket?
Asked by Kevin Paulus:

We used to be able to embed a Jira issue collector script in the Announcement Banner for Bitbucket (Add-On by Sweet Bananas) however, that add-on has become monetized and we are not playing along. The Built-in announcement banner displays the script. What other options are available?


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Create a [simple Bitbucket server plugin](https://developer.atlassian.com/server/framework/atlassian-sdk/atlas-create-bitbucket-plugin/) and add the issue collector script as a web-panel in atlassian-plugin.xml like so

```
<atlassian-plugin ... plugins-version="2">
<web-panel location="bitbucket.notification.banner.header" key="kevins.test">
<context>atl.general</context>
<resource name="view" type="static"><![CDATA[<script ......></script>]]></resource>
</web-panel>
</atlassian-plugin>
```

The issue collector tab is shown on any bitbucket page.

Tip: place the collector tab as vertical, horizontal version may be hidden by the BB page header

Let me know if you run into any trouble


Tags: bitbucket-data-center

bitbucket-server

data-center

server
"Users" vs "Project permissions"
Asked by Christopher Gilroy:

I don't believe I'm actually handling this properly, although maybe I am and it's the business model of Bitbucket, but what is the difference between adding (and paying for) "Users Access" and then adding users (and they don't need to exist in the "Users" section to the actual project permissions?

I suppose the simplest question is, I understand if I were to make actual "user" accounts I would/should pay for that. I'm hazy on whether I should be paying for all these individual project contributors that we add, who have existing Bitbucket accounts...


Answers:
author: Rik de Valk
body: Hi [@Christopher Gilroy](/t5/user/viewprofilepage/user-id/5599311) and welcome to the community,

On Public repositories, you can collaborate with as many users as you like without paying for any (additional) licenses.

Having to actually add (paid) users to your workspace is only needed if you work with Private repositories and need more than 5 collaborating users.

See <https://support.atlassian.com/bitbucket-cloud/docs/manage-your-plan-and-billing/> and <https://support.atlassian.com/bitbucket-cloud/docs/grant-repository-access-to-users-and-groups/>

Have a nice day!

Rik


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

I just wanted to clarify that this is no longer the case:
> On Public repositories, you can collaborate with as many users as you like without paying for any (additional) licenses.
>
> Having to actually add (paid) users to your workspace is only needed if you work with Private repositories and need more than 5 collaborating users.

Since October 31st, 2023, we began counting all workspace members as billable users. More info here:

* <https://community.atlassian.com/t5/Bitbucket-articles/Questions-on-Bitbucket-Cloud-billing-model-changes/ba-p/2491442>
* <https://bitbucket.org/blog/billing-model-change>

A billing plan is associated with a workspace. Workspaces on the Free plan can have up to 5 users with access.

If you have a workspace on the Standard or Premium plan, we only charge for the users who have access to this workspace. You can find the number of users that count towards your workspace's plan the following way:

1. Go this page: <https://bitbucket.org/account/workspaces/>
2. Select **Manage** for the workspace you want to check that info for. The **Manage** link is visible only if you are a workspace admin.
3. Select **User directory** from the left sidebar. On that page, you can see the number of the workspace's users.

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

Kind regards,  
Theodora


author: Christopher Gilroy
body: Got it. Thanks for the quick reply!


Tags: bitbucket-cloud

cloud
Crucible replacement?
Asked by Garvin Tarr:

Our development team uses Crucible in-house with the database on a SQL Server 2014 instance. As this SQL version has recently reached end-of-life we are looking to retire the server. Before simply migrating to a new version of SQL Server for just Crucible and one other app, we were wondering what other code-review products are available and what others' experience is in moving or migrating. We are hoping to move to a cloud-based solution.


Answers:
author: Gunner Franklin
body: *** ** * ** ***

BRING BACK ZOMBIE CAFE ON IOS AND ADROID!!!! Please come on it's the greatest mobile game of all time


Tags: fisheye-crucible-server

migration-customer-care

server
SVN branches are not visible
Asked by Kalle Tuulos:

I have just installed Fisheye+Crucible (as docker container "atlassian/crucible") for evaluation. We are evaluating this as start with one product which has code on two SVN repositories.

Both SVN repositories have "trunk" branch and many other branches, as development is being done in branches. On repository configuration, SVN URL is entered exactly as what "svn info" command gives as repository root.

The problem is, that older SVN branches (those which had activity before installing Fisheye+Crucible) are not visible on Repositories-\>\[repo name\]-\>Activity-\>Branches.

How those older SVN branches can be scanned into system?


Answers:
author: Paul Collins
body: I suspect the problem is not the age of your svn branches but the overall structure of your repo. FishEye has "SVN Symbolic Rules" under "SCM Details" settings that control where it looks for trunk and branches.

The default structure used by FishEye is one where there's a directory containing just three directories: "trunk", "tags", and "branches'. Each non-trunk branch is a subdirectory of the "branches" directory. If your repo has all the branch directories as siblings to your trunk, the default rules won't work. The good news is that "Symbolic" means there's a way to configure FishEye to understand a lot of different repo structures.

It's important that you \*don't\* tell FishEye that the parent to all the branches is "trunk". See the warning here: <https://confluence.atlassian.com/fisheye/subversion-960155467.html>

Then look here for the description of how to set up your SVN Symbolic Rules.

<https://confluence.atlassian.com/fisheye/svn-tag-and-branch-structure-960155478.html>

There is a date cutoff option somewhere. That might be useful just to do a shallow test setup to make sure your symbolic structure works. I think to get my large repo in I had to adjust Java memory settings to keep it from running out.

I think I did this once 10 years ago and don't remember how it works myself. But it worked. Good luck!


Tags: fisheye-crucible-server

server
crucible????
Asked by 1:

S-JIS??????SW???SVN????

SVN??????crucible?????????????

crucible??????????S-JIS???????????????????


Answers:
author: Rick Li
body: ????????????????????????

crucible??????????????UTF-8??????

???Shift_JIS????????????????? **SCM Details** ????????????????

?????????????

* [Configuring a Different Charset in Fisheye/Crucible](https://confluence.atlassian.com/fishkb/configuring-a-different-charset-in-fisheye-crucible-308609343.html)

??????????


Tags: fisheye-crucible-server

server