youngmon/atlassian-qna huggingface dataset:
setting up an approver automatically after a ticket is created in jira
Asked by SAI TEJA N:

I am familiar with this portion on setting up an approver in jira service desk , but what I am trying to accomplish is to get an approver automatically set up after a ticket is created in jira.


Answers:
author: Jack Brickey
body: Hi [@SAI TEJA N](/t5/user/viewprofilepage/user-id/5420315) , is your goal to define the approver based upon some criteria that set when creating the issue?

comments: author: SAI TEJA N
body: yes Jack, based on the reporter I need to assign it automatically to the manager. In our case there is only one manager, and every request needs to go to him for approval.


author: Jack Brickey
body: If you check the Automation Templates area you will find a rule to assign approver based on Request type. You can take that template and switch out the condition to align with your needs.


author: SAI TEJA N
body: I have tried doing that Jack, I have created a trigger flow in the automation section. But I am confused like how can I configure approver based on the reporter. that is If a reporter is creating an ticket it should automatically update its approver instead of reporter manually entering it. My end goal is to automatically update the approver based on the reporter creating the task. here approver is the reporters manager. Thank you so much. I am sorry for too many questions.


author: Jack Brickey
body: Feel free to share your rule if you like. Here is a quick e ample I created. You need to set up an If/Else block to assess the reporter and assign the reporter. Please note this is not very scalable. You could create groups (one for each manager) and place users in those groups. Then your condition could assess if the reporter is in a group then assign the manager/approver.

![IMG_3585.jpeg](https://community.atlassian.com/t5/image/serverpage/image-id/303903iC531F0B7E6D3A607/image-size/large?v=v2&px=999 "IMG_3585.jpeg")


author: SAI TEJA N
body: Thank you so much Jack. I don't have access to the Jira portal currently. we are working for a client, but I will try to implement this steps next time I connect with him Jack. Thanks again.


author: SAI TEJA N
body: Hi [@Jack Brickey](/t5/user/viewprofilepage/user-id/853369) I could understand we can create a group and assign the users and trigger the automation and what if the manager changes in future Jack.


Tags: jira-service-management
Auto populate Team field when created a ticket
Asked by Thierry Bouvet:

Hello everybody,

I want to auto populate the Team field in Jira Service Management when a client has created a new ticket.

The team is depending on the demand type.

For example :

* if demand type is "xx" : Team = a
* if demand type is "yy" : Teams = b

Can you help me please ?


Answers:
author: Marc - Devoteam
body: Hi [@Thierry Bouvet](/t5/user/viewprofilepage/user-id/5351076)

Where have you created the Team?

Is this an Advanced Roadmap (Plans) team, or a team created from the Teams menu in the main toolbar?

If this is the later, this won't work.

When is the demand type set on the ticket, on creation?

Then create an automation rule.

* Trigger: Issue Created
* IF/ELSE condition
* in the IF condition, check value of the field demand equals XX
* Edit action, this is a advanced JSON action  

  example:  

  {  
  "fields": {  
  "customfield_10100":"773"  
  }  
  }  

  Where the custom field id is the id of the field Team in the system and the value 773 the value of the team created.

Repeat in an ELSE clause for the other team with the same steps, using the other team values.

comments: author: Thierry Bouvet
body: Hi [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976)

Thanks for your reply.

It's a Team created from the Teams menu in the main toolbar.

Demand type is set on the creation :

![2024-02-02_07h52_45.png](https://community.atlassian.com/t5/image/serverpage/image-id/303945iF27FD3C9FD236423/image-dimensions/119x270?v=v2 "2024-02-02_07h52_45.png")

Can you explain me how to do an ELSE clause please ? I don't find this option in cloud automation.

Thanks


author: Marc - Devoteam
body: Hi [@Thierry Bouvet](/t5/user/viewprofilepage/user-id/5351076)

As condition there is an IF/Else option, this is the option to use.

<https://support.atlassian.com/cloud-automation/docs/jira-automation-conditions/#If-else-block>


author: Thierry Bouvet
body: Thanks [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976)

All is ok !


Tags: cloud

jira-service-management

jira-service-management-cloud
Use smart values to cut '{' from text
Asked by Clemens R?tze:

I would like to use smart values to cut text between '{' and '}' from a description.

To start simple I tried this:

{{issue.description.replaceAll("{","")}}

But it is not working. It works with other text than {. Is there a notation to use { in smart values?


Answers:
author: Rudy Holtkamp
body: Hi [@Clemens R?tze](/t5/user/viewprofilepage/user-id/5176895) ,

I did not try it myself, but I think you need to escape the {, by using \\{.

```
{{issue.description.replaceAll("\{","")}}
```

comments: author: Clemens R?tze
body: That's it, thanks.

In case anyone is wondering, that's my final value:

{{issue.description.replaceAll("(?\<=\\{)(\[\^ \]\*)(?=\\})","").replaceAll("\\{}","")}}

Using this I can cut all formating stuff like {color:#172b4d} that would otherwise end up in an email containing the issue description using Jira automation.


author: Marc - Devoteam
body: Hi [@Clemens R?tze](/t5/user/viewprofilepage/user-id/5176895)

You might need to address the { as "\\{\\", this ass it is a special char.

comments: author: Rudy Holtkamp
body: Is the second \\ needed? Seems like you are escaping the "


author: Marc - Devoteam
body: I know, that I have to use the same for trying to replace \\\\ with nothing.

"\\\\\\\\"


Tags: automation

cloud

jira-service-management

jira-service-management-cloud

jira-software-cloud

smart-value
i could not loginto my bitbucket account
Asked by ramanareddy:

i could not loginto my bitbucket account


Answers:
author: Ben
body: Hey Ramana,

Could you please provide more information as to what error you are seeing? I have checked your workspace and can see that your account is ACTIVE and there doesn't appear to be any other account issues that I can see from my end.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Using Workspace SSH Key to push commits
Asked by chris_flynn:

I've added an SSH public key to the Workspace settings and the private key has been installed on the build server. The build pipeline is able to clone the code and build it successfully. However, when the pipeline updates the version in the pom.xml file and tries to push back to the remote repo it gets an error message due to the Branch restriction settings. Where do I set the repo permissions for the SSH Keys set in the Workspace settings?


Answers:
author: chris_flynn
body: Hi [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344) , thank you for your response. Sorry for my delayed answer, I didn't get a notification about your comment.

Does that mean that SSH keys defined in the Workspace settings can only be used as access keys?

comments: author: Erez Maadani
body: I think I missed the \`pipeline\` part...

As mentioned before, access keys are read only.

Pipelines' SSH keys should allow you to push \& pull w/o an issue, as long as branch permissions are disabled. From <https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/> :
> You should be able to push and pull to your Bitbucket Cloud repo with no problems. But, if you need to use SSH, for example, to use a bot account, or when branch permissions are enabled, see [Set up an SSH key](https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html).

Which branch are you trying to push to and does it have branch restrictions?

BTW, an alternative solution would be to raise a PR from your pipeline and merge it automatically using rest API.


author: Erez Maadani
body: If the ssh key belongs to a (functional) user, you can change the permissions from the settings -\> User and groups access.

If it's an access key, it's a read only access. See here: <https://support.atlassian.com/bitbucket-cloud/docs/add-access-keys/>

comments: author: chris_flynn
body: Hi [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344) , thank you for your response. Sorry for my delayed answer, I didn't get a notification about your comment.

Does that mean that SSH keys defined in the Workspace settings can only be used as access keys? If the SSH key belongs to a (functional) user then it would have to be defined in that users Personal settings, not the Workspace settings.


Tags: bitbucket-cloud

cloud
Git 2.38.0 broke Bitbucket
Asked by smblair:

Earlier today, I updated git from 2.37.1-1 to 2.38.0-1 as part of monthly patching. Following that, Bitbucket was upgraded from 8.4.1 to 8.5.0. It failed to start with Spring framework errors. Restoring Atlassian from last night's backup did not fix it. After reviewing the Atlassian logs and yum.log, I reverted git, git-core and perl-Git, all of version 2.38.0 to 2.37.1. Bitbucket now works fine. I installed yum-versionlock and pinned them until another version appears that can be tested or some resolution is found here. Version 2.38.0 breaks both 8.4.1 and 8.5.0.

Anyone else experience this?


Answers:
author: blacky1707
body: see: <https://jira.atlassian.com/browse/BSERV-13520>


author: Christian Glockner
body: Hi,

What you're experiencing is the reason why Bitbucket Server 8.5 does not support anything newer than git 2.37, see <https://confluence.atlassian.com/bitbucketserver/supported-platforms-776640981.html#Supportedplatforms-dvcsDVCS>

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: bitbucket-server

server
Giving a user access to a repo
Asked by kelley_canon:

How can I grant access to a repo in Bitbucket? I believe I am an admin for the repo but can't find a way to add another Bitbucket user so that he can at least view the repo.


Answers:
author: Patrik S
body: Hello [@kelley_canon](/t5/user/viewprofilepage/user-id/4743645) ,

Thank you for reaching out to Atlassian Community!

If you are a workspace or repository admin, you can add a member to a repository by following the below steps :

* Access the repository in the Bitbucket UI
* In the left panel go to **Repository Settings**
* Select the **User and Groups access** option, under General
* Click on the **Add members** button in the top right corner
* Provide the e-mail address of the person you want to add and select the level of access in the drop-down menu.

Once you follow those steps, the user will receive an e-mail with an invitation to your repository. This e-mail will contain a link for the user to accept the invitation. Once the invitation is accepted, the user will be given access to the repository.

For more details on how to grant access to users and groups in a repository, you're also welcome to check out the documentation below :

* <https://support.atlassian.com/bitbucket-cloud/docs/grant-repository-access-to-users-and-groups/>

Thank you, [@kelley_canon](/t5/user/viewprofilepage/user-id/4743645) .

Kind regards,

Patrik S


Tags: bitbucket-administration

bitbucket-cloud

cloud

user
How can I remove a 3rd party integration?
Asked by TwisterMc:

I connected GatsbyCloud to my BitBucket account and now I need to disconnect the two.

Gatsby tells me "You can go in to bitbucket and uninstall the 'Gatsby Cloud' app and auth, then reconnect through Gatsby Cloud" however I don't see a Gatsby Cloud app anywhere in BitBucket.

Anyone have any ideas?


Answers:
author: TwisterMc
body: Well, I found my answer... sort of. You can remove app authorizations under your perusal profile in BitBucket and to fix authorization issues in Gatsby, you can go under the workspace settings.


Tags: app

bitbucket-cloud

cloud
DockerHub integration
Asked by sparkgo:

Hi there

I'm trying to setup my docker hub build automation.

The build can't get access to private repo to download dependencies, and to solve it, docker hub states to use their own public rasa key:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC65L3Lx3HtoqxYJdfkBnF1wrMC55gCOLRiUGslxGZtAVdADb0sz9s2rjEkKi6EzrnQEX6SNoDz3XGunF01LBiEyhkGOmuarLR3+lHzqysi7n4SQUXrVDljO1HQKLrK4cV/Dd4cN9WLo2vqOoGCjBy7bmn/qlnDDmdWfvDue2at/PRipYqPUF0OKuth63zgjBjcycFVsmTn9gDJkhUd9y5Q/NWB/z5gYnKv0GHW2f+XxyfMNE/RzIyIuwus5xSJq6tieyzvM/Zl27HCbzEVd6Q7b2207QZvH9hDtJ2XJuMfqFtlfaG9Y7mp6DXEDIkSfd3ZFCGW6IvoQv0YGGuE+QGr

When I try to use this key in my bitbucket account, i'm getting this message:

Someone has already added that key as an access key to a repository.

Can you help me ?

Thanks


Answers:
author: Patrik S
body: Hello [@sparkgo](/t5/user/viewprofilepage/user-id/3705670) ,

Thank you for reaching out to Atlassian Community.

Could you please give us more details about what exactly integration you are trying to do with Dockerhub?

Are you trying to download a private docker image from within your Bitbucket Pipelines build?

If yes, then you would have to first execute the **docker login**command as part of your build, providing your docker account credentials, as in the below example :

```
docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
```

In this example, it's assumed that you have created two [environmental variables](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/) in your bitbucket pipelines containing your docker account username and password.

After the docker login command is executed, you should be able to **docker pull** any private image part of that docker account into your bitbucket build.

Thank you, [@sparkgo](/t5/user/viewprofilepage/user-id/3705670) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud

docker
How to get the Delete Branch checkbox to stay checked?
Asked by Robert Gelb:

When I am creating a PR, there is a \`Delete Checkbox\` checkbox. I've read that once you check it, it will remain checked for the next PR. It does not.

How do i get this checkbox to stay checked? I always want to delete the branch once PR has been merged.

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


Answers:
author: Patrik S
body: Hello [@Robert Gelb](/t5/user/viewprofilepage/user-id/5041136) ,

Welcome to Atlassian Community!

I'm afraid we currently don't have the functionality to set a default (enabled or disabled) to the checkbox "Delete source branch" when creating a Pull Request.

The good news is that we already have a feature request to implement this, which is being tracked in the ticket below :

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

I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) in mind.

Thank you, [@Robert Gelb](/t5/user/viewprofilepage/user-id/5041136) !

Kind regards,

Patrik S

comments: author: Robert Gelb
body: [@Patrik S](/t5/user/viewprofilepage/user-id/4603309)The feature request has 74 upvotes and it's been sitting there without being assigned to anyone since February.


Tags: bitbucket-cloud

cloud
Pipelines fails during deploy
Asked by Gennaro:

Hi,

during my deploy of develop branch on staging environment i receive this error:  
![Schermata 2022-10-18 alle 17.26.32.png](https://community.atlassian.com/t5/image/serverpage/image-id/221390i5D47F1413607F478/image-size/large?v=v2&px=999 "Schermata 2022-10-18 alle 17.26.32.png")

the only error I can see is this:![Schermata 2022-10-18 alle 17.28.35.png](https://community.atlassian.com/t5/image/serverpage/image-id/221391iC2D75F0389A1B9A8/image-size/large?v=v2&px=999 "Schermata 2022-10-18 alle 17.28.35.png")  
Any Ideas of what I can do?


Answers:
author: Patrik S
body: Hello [@Gennaro](/t5/user/viewprofilepage/user-id/5056842) ,

Welcome to Atlassian Community.

From the screenshot you have shared, it seems your build is trying to SSH to an external server to execute the deployment, but the SSH command is timing out.

One of the most common causes of this is that the external server is behind a firewall which is blocking the pipeline's IPs from connecting to it.

In this case, I would suggest making sure the following IPs are whitelisted in your firewall and have the connection allowed to your remote server :

* <https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/#Valid-IP-addresses-for-Bitbucket-Pipelines-build-environments>

Thank you, [@Gennaro](/t5/user/viewprofilepage/user-id/5056842) .

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud
Is it possible send pipelines artifacts to slack?
Asked by Oleksandr Sorochynskyi:

Hello. I use bitbucket-pipelines for android deployment.

And I want to send builds artifacts to slack.

Is it possible?

<br />

My pipelines:  

```
pipelines:

  branches:

    dev:

       - step:

           name: Install test gradlew

           image: android-30

           script:

              - ./gradlew :app:assembleTestRelease

           artifacts:

             - android/app/build/outputs/apk/test/release/**
```


Answers:
author: Igor Stoyanov
body: [@Oleksandr Sorochynskyi](/t5/user/viewprofilepage/user-id/5056684) hi. Thanks for your question.

You may try to investigate our[pipe slack-notify](https://bitbucket.org/atlassian/slack-notify/src/master/) with providing [custom constructed payload.](https://api.slack.com/block-kit)

Or as an idea you could store your arifacts on [s3 using aws-s3-deploy pipe](https://bitbucket.org/atlassian/aws-s3-deploy/src/master/), and then include link to that artifact to the [slack-notify](https://bitbucket.org/atlassian/slack-notify/src/master/) message

Regards, Igor


Tags: artefact

bitbucket-pipelines

cloud

deployment

slack
Pushing Zipped files into bitbucket
Asked by Ashalina Z:

Hi all,

New to the community.

I have a folder that contains number of files that take lot of space.

These files are changed and push everyday as part of the development work.

Is that a good idea to zip these files before I push them back to external repo?

And is zipping safe for files data?

Also, when I pull the external repo to my machine, will the zipped files that were pushed be in the same state?

Thanks


Answers:
author: Erez Maadani
body: Hey [@Ashalina Z](/t5/user/viewprofilepage/user-id/5056824)

I recommend you have a look at the git-LFS feature: <https://support.atlassian.com/bitbucket-cloud/docs/use-git-lfs-with-bitbucket/>

The zipping depends on the file types and used algorithm: text files size can be reduced significantly while binaries usually don't.

Zipping is usually safe, but you should still check all your envs: dev, CI, CD, etc'. Some envs might have different zip clients/versions which might affect the zip/unzipping of the files.

My personal recommendation: don't push large files to your repo without using git-lfs. These files will be kept in your history even after you delete them which will quickly inflate your repo size and will cause issues when cloning the repo. If you don't want to work with git-lfs, consider using DB or uploading the files to binary repository.


Tags: bitbucket-cloud

cloud
All local data is gone
Asked by ScrepY:

I deleted the remote repository, then created a new one, clicked the get button in the sourcetree program, and all the local files are gone. Is there any way to get them back?((


Answers:
author: Theodora Boudale
body: Hi [@ScrepY](/t5/user/viewprofilepage/user-id/5056676),

In rare cases, we may be able to restore repository content as long as the repo deletion happened within the last 7 days.

I checked our logs and I found one repo belonging to your workspace that was deleted the day you made this post. However, I see that the repo you recreated with the same name has now source code in it.

Can you please confirm if you have been able to restore the content?

Kind regards,  
Theodora

comments: author: ScrepY
body: Yes, that's right. Thank you for your reply!


author: Erez Maadani
body: Did you commit your local files?

What do you get when running \`git log\` and \`git reflog\`?


Tags: bitbucket-cloud

cloud

sourcetree
Error reading from remote server
Asked by tharun:

Proxy Error {#toc-hId--523265615}
---------------------------------

The proxy server received an invalid response from an upstream server.  
The proxy server could not handle the request *[GET /](https://code.dom1.taus.us.thales/)*.

Reason: **Error reading from remote server**


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

Does your question concern Bitbucket Cloud? I can see that the question has the tag 'bitbucket-cloud', however, your Bitbucket Cloud account doesn't have access to any repositories, so I was wondering if you're using Bitbucket Cloud or Bitbucket Server (self-hosted instance).

Could you please share some details about what you are doing when you get this error, and where exactly you see this error?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
I wanted to setup Bitbucket datacenter on my local kubernetes cluster setup, how it can be done?
Asked by Gaurav Patange:

want to setup manually bitbucket data center in my own local kubernetes setup I have researched but unable to get solution on this


Answers:
author: Yevhen
body: [@Gaurav Patange](/t5/user/viewprofilepage/user-id/5056383) you may want to give <https://github.com/atlassian/data-center-helm-charts> a go.

comments: author: Gaurav Patange
body: we don't have aws instance cluster is on vms


author: Yevhen
body: Helm charts can be installed on any K8s clusters. You just need to make sure you have storage and networking configured.


author: Gaurav Patange
body: actually we have some restrictions of helm and docker pull, so is any alternative other than helm, manual setup docs?


author: Yevhen
body: That's the only supported way to deploy DC apps to Kube. If you can't use Helm at all, perhaps, you can do \`helm template\` save yaml, and then apply it.


author: Gaurav Patange
body: from where I can get the yaml files and does we have any manual process documentation


author: Yevhen
body: [@Gaurav Patange](/t5/user/viewprofilepage/user-id/5056383) you will need at least basic Helm and K8s knowledge to do that. You can get yaml files by running \`helm template\` against the target Helm chart.


Tags: bitbucket-server

server