youngmon/atlassian-qna huggingface dataset:
Separating queues by internal vs external
Asked by Francesca Naudi:

I have one service desk project that will deal with requests from internal employees and requests from clients outside the company. IS there a way to separate tickets into two different queues, one queue for requests coming from internal employees and one queue for requests from clients?

Thanks


Answers:
author: Marc - Devoteam
body: Hi [@Francesca Naudi](/t5/user/viewprofilepage/user-id/5420804)

Welcome to the community.

Yes, if you have information on the issues that separates issues created by internal or external users.

queues in a JSM project are based on issue information in basic or JQL, just as searching, so you need a differentiator to accomplish this.

comments: author: Francesca Naudi
body: Thank you! I am struggling to find a differentiator that can do that though. Basically requests coming from Jira accounts / emails within my organisation need to go into one queue and those external need to go into another, just can't find the actually way to do this


author: Marc - Devoteam
body: Hi [@Francesca Naudi](/t5/user/viewprofilepage/user-id/5420804)

What you could do is, to create to organisations, one for employees and one for non-employees.

Add all your employees in the employee organisation and all others in the other one

Create an automation rule that sets the organisation of an issue based on the mail domain.

So if the mail domain is your organisation the user requesting is added to your employer org, otherwise to the other org.

You can then base you queues on the organisations


author: Francesca Naudi
body: Hi [@Marc - Devoteam](/t5/user/viewprofilepage/user-id/3796976)

I think that's exactly what I need. Thank you so much!


Tags: cloud

jira-service-management

jira-service-management-cloud
Custom field Automation Assets
Asked by Tiziana Pisenti:

I have 2 custom fields that refer to an assets object.  
The first custom field "Requester" is linked with the Object Type "employee" and with the dropdown you can choose what object you need. In the second custom field "Approver(s) " I need from the same object the information of another attribute. How do I have to set this up?


Answers:
author: Zoey Wang
body: Hi [@Tiziana Pisenti](/t5/user/viewprofilepage/user-id/5175616)

Could you check for me if the object attribute being able to be selected in the custom field "Requester" is being labelled in your Attribute section already?


Tags: cloud

jira-service-management

jira-service-management-cloud
How do I create an API key with permission to query Assets?
Asked by Joshua Bennett:

I am trying to query Assets. I have a legitimate API key created in the Atlassian admin centre. However, I am getting forbidden when querying it.

How do I create a valid key for querying Assets? There doesn't seem to be anywhere within Assets to do it, and the creation of the key in Atlassian doesn't seem to have the capacity to assign permissions.

The Jira specific API doesn't seem to work either.

I've been querying the documentation on this but can't seem to find anything.

I am a global admin on Jira and Atlassian with permission to update Assets.


Answers:
author: Mark Segall
body: Hi [@jb](/t5/user/viewprofilepage/user-id/5353995) - Assets are handled by the same API key as the rest of Jira. However, there are a couple things that you could look at:

1. Make sure you're using the assets API which is distinct from the Jira API  
   <https://developer.atlassian.com/cloud/assets/assets-rest-api-guide/workflow/>
2. The account will need to have appropriate permissions to the relevant object schema(s):

   ```
   https://YOURINSTANCE.atlassian.net/jira/servicedesk/assets/configure/object-schema/SCHEMAID
   ```

comments: author: Joshua Bennett
body: Hi, thanks for your response. You're saying that Assets are used querying the Jira API key - isn't that distinct from the Atlassian API?

The Atlassian API I genereally use for stuff like user management etc, and I create the keys in admin.atlassian.com

The Jira API I use to query ticket etc and I create in by going to the below link from my user settings.

<https://id.atlassian.com/manage-profile/security/api-tokens>

When I use the api I use the query Jira (tickets etc) I get unauthorized.

Using the Atlassian API Iget 'forbidden'.

Am I getting confused here?


author: Mark Segall
body: While the endpoint for Jira Assets is different, your authentication for each should be able to use the same token. The link I provided above is the best I can recommend for helping troubleshoot the issues. It includes a link to this page that provides more detail around authentication:

<https://developer.atlassian.com/cloud/jira/service-desk/basic-auth-for-rest-apis/>


Tags: api

asset-management

assets

cloud

jira-service-management

jira-service-management-cloud
Dark mode - How to change the color theme of the embedded code editor?
Asked by Pascal Tanzer:

I cannot use the embedded code editor in dark mode, because the colors of cursor, selected text etc. are too similar.

Is there a way to select a different color theme for the embedded editor?

This is the editor i'm talking about:

![Bildschirmfoto 2024-02-02 um 10.00.03.png](/t5/image/serverpage/image-id/303963i3BE67F855782F5FC/image-size/large?v=v2&px=999 "Bildschirmfoto 2024-02-02 um 10.00.03.png")


Answers:
author: Rebekka Heilmann _viadee_
body: Hi [@Pascal Tanzer](/t5/user/viewprofilepage/user-id/5420783) and welcome to the Community,

this is not standard Jira functionality. What Marketplace App are you using? Is it this one?: [HTML editor for Jira issues \| Atlassian Marketplace](https://marketplace.atlassian.com/apps/1230569/html-editor-for-jira-issues?tab=overview&hosting=cloud)

comments: author: Pascal Tanzer
body: Hi [@Rebekka Heilmann _viadee_](/t5/user/viewprofilepage/user-id/5182395) ,

as far as I'm aware there is no Marketplace App installed on our site.

I'm sorry this was my first post and I probably wasn't precise enough. Since I just startet using Jira (JSM). I assumed almost everybody who's administrating Jira knows, this editor.

The Editor is located in JSM \> project settings \> customer notifications \> Edit templates.

The direct link would be:  
**++\[your-site\]++** /jira/servicedesk/projects/**++\[project-key\]++**/settings/customer-notifications/template


author: Rebekka Heilmann _viadee_
body: It's always best to provide context to screenshots as a) there are several places that look similar and b) Cloud is changing daily ;)

I would assume that your Jira is in Dark mode in general, as my Editor appears in "normal" white. There is no feature to set single features/views to a different mode.


author: Pascal Tanzer
body: Yes it is tied to dark mode. I'm stuck to the light mode now, because I can't use the editor like that.  
For reference (the font name is highlighted in both screenshots):

![verdana-dark.png](https://community.atlassian.com/t5/image/serverpage/image-id/306647iE1CD459D1E23C5DE/image-dimensions/226x144?v=v2 "verdana-dark.png")![verdana-light.png](https://community.atlassian.com/t5/image/serverpage/image-id/306648i93957CCE0A6E3460/image-dimensions/208x142?v=v2 "verdana-light.png")


Tags: cloud

jira-service-management

jira-service-management-cloud
Failed repository import
Asked by Mark George:

Hi, I have had a similar issue to this post: <https://community.atlassian.com/t5/Bitbucket-questions/Corrupt-repository-after-import/qaq-p/2153069>

A repository import was started but did not complete. Tried it a few times and received failures each time. The most recent time we tried it, it appears to have had an issue and the repo shows as empty and we can't access it to delete it. We would appreciate it if we could get it deleted.


Answers:
author: Syahrul
body: Hey [@Mark George](/t5/user/viewprofilepage/user-id/5059244)

Welcome to the community!

I have reviewed your request and found out that the import repository is stuck in the import stated, so as you requested, I have proceeded to delete the failed import repository.

I hope this helps.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud
Runners for Windows - how to send build email notifications
Asked by Lou.x.Elston:

Runners for Windows does not have pipes, so there is no email-notify pipe available. How to send notification of a build (success or failed)


Answers:
author: Ben
body: G'day Lou!

Welcome to the Bitbucket Cloud community!

You are able to receive to Pipelines Build notifications to your email by accessing the Repository Source, clicking the ellipsis button "..." and selecting "Manage Notifications from the drop down. Here you can tick "Pipelines".

Unfortunately, at present, this only includes notifications for Failed pipelines and will not email when the build is successful.   
This is possible with our [Slack integration](https://support.atlassian.com/bitbucket-cloud/docs/integrate-slack-with-pipelines/), but is not present natively within Bitbucket Cloud.

I have raised a feature request ticket with our developers on your behalf to implement this, we do not have an ETA for its implementation however you can "Watch" the ticket to receive updates related to it and "Vote" to increase its visibility:  
<https://jira.atlassian.com/browse/BCLOUD-22205>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

email

notification
Run pipeline step on any self-hosted runner regadless of its OS ?
Asked by Romain T_:

Hello,  

I have multiple Windows and macOS machines with runners and I'd like all of them to be able to run a pipeline that do no require a specific OS.  

I thought I could just use *self.hosted* alone, but it didn't work, the pipeline **DebugPipeline**fails with ''Currently no online runner available that matches the required labels"

```
custom:
  debug-mac:
    - step:
        name: 'DebugPipelineMac'
        runs-on:
          - self.hosted
          - macos
        script:
          - echo 'DebugPipelineMac'
  debug-win:
    - step:
        name: 'DebugPipelineWin'
        runs-on:
          - self.hosted
          - windows
        script:
?         - echo 'DebugPipelineWin'
  debug:
    - step:
        name: 'DebugPipeline'
        runs-on:
          - self.hosted
        script:
          - echo 'DebugPipeline'
```

<br />

How can I achieve this ? I used custom pipelines in this example, but ideally I want to use it for pull-requests ones, we tend to have many short terms of them and I'd like to spread the loads on all machines.


Answers:
author: Syahrul
body: Redacted to avoid confusion

comments: author: Romain T_
body: Thank you for you reply [@Syahrul](/t5/user/viewprofilepage/user-id/744536). Unfortunately this doesn't work , because you cannot have multiple platform labels.

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


author: Syahrul
body: Hey [@Romain T_](/t5/user/viewprofilepage/user-id/5038109)

Apologize for the confusion. I made a mistake while reviewing the documentation and test.

Apparently, we don't support multiple platform usage in a single step at this moment. This is due to the differences in each platform build, so we don't have the flexibility to utilize different types of platforms in steps for now.

Since this is a great feature to be added, I have proceeded to raise a feature request on your behalf. Please **Vote** and **Watch** the feature request so that you'll receive an update in the future at:

* [Support multiple runner platform in a steps](https://jira.atlassian.com/browse/BCLOUD-22211)

That said, I am redacting the above answer to avoid confusion.

Again apologize for that.

Cheers,  
Syahrul


author: Romain T_
body: Thank you, I've added details on the issue on how we are using pipelines and that limitations we are facing.


Tags: bitbucket-cloud

bitbucket-pipelines

bitbucket-runners

cloud

server
Bitbucket pipelines to docker on DigitalOcean
Asked by Hamid Farmani:

I'm trying to connect my bitbucket project, to a DigitalOcean droplet.   
This is my pipeline.

\`\`\`

# Template docker-push

# This template allows you to build and push your docker image to a Docker Hub account.  
# The workflow allows running tests, code linting and security scans on feature branches (as well as master).  
# The docker image will be validated and pushed to the docker registry after the code is merged to master.

# Prerequisites: $DOCKERHUB_USERNAME, $DOCKERHUB_PASSWORD setup as deployment variables

image: atlassian/default-image:3  
definitions:  
services:  
docker:  
memory: 3072

<br />

pipelines:  
default:  
- parallel:  
- step:  
name: Build and Test  
script:  
- IMAGE_NAME=$BITBUCKET_REPO_SLUG  
- docker build . --file Dockerfile --tag ${IMAGE_NAME}  
services:  
- docker  
caches:  
- docker  
- step:  
name: Lint the Dockerfile  
image: hadolint/hadolint:latest-debian  
script:  
- hadolint Dockerfile  
branches:  
development:  
- step:  
name: Deploy to droplet  
script:  
- export IMAGE_NAME=$USER/$PROJECT:$BITBUCKET_COMMIT  
- pipe: atlassian/ssh-run:0.2.2  
variables:  
SSH_USER: $SSH_USER  
SERVER: $SSH_SERVER  
COMMAND: \>  
docker stop $CONTAINERS_TO_STOP  
docker run --publish $SERVER_PORT:$SERVER_PORT --detach $IMAGE_NAME  
services:  
- docker  
master:  
- step:  
name: Build and Test  
script:  
- IMAGE_NAME=$BITBUCKET_REPO_SLUG  
- docker build . --file Dockerfile --tag ${IMAGE_NAME}  
- docker save ${IMAGE_NAME} --output "${IMAGE_NAME}.tar"  
services:  
- docker  
caches:  
- docker  
artifacts:  
- "\*.tar"  
- step:  
name: Deploy to Production  
deployment: Production  
script:  
- echo ${DOCKERHUB_PASSWORD} \| docker login --username "$DOCKERHUB_USERNAME" --password-stdin  
- IMAGE_NAME=$BITBUCKET_REPO_SLUG  
- docker load --input "${IMAGE_NAME}.tar"  
- VERSION="prod-0.1.${BITBUCKET_BUILD_NUMBER}"  
- IMAGE=${DOCKERHUB_NAMESPACE}/${IMAGE_NAME}  
- docker tag "${IMAGE_NAME}" "${IMAGE}:${VERSION}"  
- docker push "${IMAGE}:${VERSION}"  
services:  
- docker

\`\`\`

When I push to my development branch, I get the following error:  

unknown flag: --publish  
See 'docker stop --help'.  
Connection to ${IP} closed.  
? Execution failed.

What am I missing/doing wrong here?


Answers:
author: Hamid Farmani
body: I changed this section:  
- pipe: atlassian/ssh-run:0.4.1  
variables:  
SSH_USER: $SSH_USER  
SERVER: $SSH_SERVER  
COMMAND: 'docker stop $CONTAINERS_TO_STOP; docker run --publish $SERVER_PORT:$SERVER_PORT --detach $IMAGE_NAME'

comments: author: AzimLord
body: Can confirm this is working. Not sure why

- pipe: atlassian/ssh-run:0.2.2  
variables:  
SSH_USER: $SSH_USER  
SERVER: $SSH_SERVER  
COMMAND: \>  
docker stop $CONTAINERS_TO_STOP  
docker run --publish $SERVER_PORT:$SERVER_PORT --detach $IMAGE_NAME

Any idea why this is not working?


Tags: bitbucket-cloud

cloud
Bitbucket Access Key Rotation
Asked by Jin Yu Tung:

Given the limitation of the access key that it doesn't require a passphrase and cannot be associated with an account. It can be the case that one still have the read access of the private repository after his/her account revoked. Or worse, the leaked private key can causes an unauthorised third party gains access to the private repository.

Is there a way to

* rotate the access key
* remind the admin/ creator of the key regarding the expiration of the key
* control the creation of the key on an approval basis

?   


Answers:
author: Mark C
body: Hi [@Jin Yu Tung](/t5/user/viewprofilepage/user-id/4844580),

Thank you for reaching out to the community.

Right now, there's no feature to manage repository Access keys' by setting policies such as rotating it periodically, or set an expiration, or controlling the creation.  
We do have an existing feature request similar to it that can be located through this link. - <https://jira.atlassian.com/browse/BCLOUD-21080>  
You can upvote and watch it for now so that you'll be notified of any updates from our team when the feature becomes available on Bitbucket Cloud.

For now, you'll have to manually rotate repository Access keys periodically by removing and generating new SSH keys.

For the workflow recommendation, I would recommend using the user's personal SSH keys instead and then managing their **read** access to the specific repository or workspace user groups.  
This way, whenever a user is revoked, the SSH key will also be revoked.

Hope it helps and do let me know if you have further questions.

Regards,  
Mark C

comments: author: Jin Yu Tung
body: Hi Mark C,   
Is there a way to restrict a user from creating an access key currently?


author: Mark C
body: Hi [@Jin Yu Tung](/t5/user/viewprofilepage/user-id/4844580)  

Right now, only admins can create repository Access keys and there's no feature to restrict admins from creating an access key.  
However, as long a user only has **Read** or **Write** access to the repository, they won't be able to create Access keys.  

Let me know if you have further questions.  

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Not able to add reviewers group dynamically to a PR
Asked by Waqar Humayun:

I have a reviewers group **Group1** and creating a listener for adding this group, dynamically to a PR. However, this does not work for me. I can add users but groups don't work. I am using **addMandatoryGroups("Group1")** method for this purpose.  
For sake of checking I even tried **addDefaultGroups("Group1"** **)**. Still the same effect, group members are not added to the PR.  
Any clue why is it so?


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Hi Waquar,

you may be better off posting the question in the developer community <https://community.developer.atlassian.com/c/bitbucket-development/12>

Make sure to include code snippets and links to the Bitbucket Java API that you're intending to use.


Tags: bitbucket-server

server
Someone has already added that SSH key.
Asked by Gleb Krishin:

Could you help me to fix the error \> 'Someone has already added that SSH key'.


Answers:
author: marc -Collabello--Phase Locked-
body: The error means that someone else is already using this SSH key. You must use a different key.

comments: author: Gleb Krishin
body: Do you know how to understand what account and platform use the same key?


author: Nic Brough -Adaptavist-
body: It doesn't matter, you should not be sharing keys between accounts.

You should create a new key for your new account and use that instead of using a key that belongs to another account.


Tags: bitbucket-cloud

cloud
ESC key discards all your work without a warning
Asked by Lohit Peesapati:

I'm so annoyed because of this! I lost almost 30mins of my work :/ This is a tremendous productivity blocker, and I have seen the same issue raised multiple times in the past 10 years.

1. <https://community.atlassian.com/t5/Bitbucket-questions/BitBucket-comments-ESC-keypress-wipes-text/qaq-p/419227>
2. <https://community.atlassian.com/t5/Jira-discussions/Pressing-ESC-while-editing/m-p/1891946#M15958>

Is using the tilde (\`) key to format the text so uncommon? There's a high chance of pressing ESC instead of the tilde key.


Answers:
author: Ben
body: Hey Lohit,

Welcome to the Bitbucket Cloud community! :)

Thank you for raising this to our attention. I agree that there should be at least a warning dialogue box to prevent users from losing their work accidentally.  
I have logged a feature request with our developers - feel free to "Watch" and "Vote" on this to receive updates/improve customer demand visibility:  
<https://jira.atlassian.com/browse/BCLOUD-22210>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
How to restrict users who can delete repositories in bitbucket cloud?
Asked by Xavi Rod?:

I have read that it is possible to restrict permissions to delete repositories in Bitbucket Server, but does it exist this functionality in cloud version?


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Xavi Rod?](/t5/user/viewprofilepage/user-id/5029027) ,

welcome to the Atlassian communtiy!

Permissions managment are the same for cloud/server versions.

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

Just an Admin can delete a repo. If you need to avoid specific branches deletion please use branch permissions

Hope this helps,

Fabio


Tags: bitbucket-cloud

cloud

delete

repository
How do I call the & call command powershell in windows runners
Asked by lprada:

Hi I need to execute this in a windows runner, how do I put this in my yaml file?

\& 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe'


Answers:
author: Mark C
body: Hi [@lprada](/t5/user/viewprofilepage/user-id/176390)  

As far as I know, you can directly use **MSBuild.exe** without specifying the path.  

May I kindly ask what error/issue you're currently facing?  

Regards,  
Mark C

comments: author: lprada
body: I was able to call the executable, what I need right now is to put the path to the **MSBuild.exe** variable per enviroment**.**Something like this

- $Env:MSBUILD_PATH\\MSBuild.exe

but this does not work.


author: Mark C
body: Hi [@lprada](/t5/user/viewprofilepage/user-id/176390),

I see. I believe you'll have to programmatically add the path to Windows ENV.  
Here's what I found that may be relevant to your use case. - <https://gist.github.com/nicolasdao/b1623cb3220be3b6dc8fe04b2b2bfe32?permalink_comment_id=3997314#gistcomment-3997314>

Regards,  
Mark C


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
how can I import on Bitbucket DataCenter (On premises) my repos in Bitbucket.org (Cloud).
Asked by Raul Polanco:

Trying to clone a test repo I created inside a test project in Bitbucket.org before I clone the actual ones I need to clone. But IM having some issues with accessing bitbucket.org from the command line. Not sure if I have to use a proxy or if my git config or credential manager needs attention on this matter.

This is the message I'm getting from git Bash:  
$ git clone <https://505049190@bitbucket.org/505049190/migration-test.git>  
Cloning into 'migration-test'...  
fatal: unable to access '<https://bitbucket.org/505049190/migration-test.git/':> OpenSSL SSL_connect: Connection was aborted in connection to bitbucket.org:443


Answers:
author: Theodora Boudale
body: Hi Paul!

I can see that you created a support ticket for this issue, one of our engineers has asked if you can provide additional info so we can further investigate this.

I would suggest focusing on the support ticket, to avoid any confusion and miscommunication that may arise from troubleshooting the same issue in two different places.

Once the issue is resolved, feel free to share here the resolution for any other users that may come across your post facing the same issue.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Give UserA "write" access, but UserB is making commits
Asked by jamiek22:

Hi.

I have given UserA "write" permissions on my repo hosted on BitBucket using their email address. But now I am seeing commits by UserB who has a different email address.

When I go to "User and group access" I only see UserA.

How can this be? This has happened on two different occasions; I am hiring one person to work on my project, but they are sub-contracting out the work to someone else (which I do not want).

Thanks.


Answers:
author: Syahrul
body: Hi [@jamiek22](/t5/user/viewprofilepage/user-id/1153146)

G'day.

This can happens if UserA is using git config with UserB email address locally.

UserA is authenticating using the correct original credential.

However, the local git config username (author) is using the UserB email address. So this information is sent to the Bitbucket cloud where we use the commit author to show who made the commit.

Hence, the UI shows UserB made the commit, but if we look at our logs end it should show that the one that made the commit and pushed it over is actually UserB.

You can identify this by asking UserA to run the following commands to show his local git config username and email:

```
git config --list
```

I hope this helps.

Cheers,  
Syahrul


Tags: access

bitbucket-cloud

cloud

git

permission