youngmon/atlassian-qna huggingface dataset:
Automation Rule: Issue in retrieving execution status for "Test Execution" type
Asked by Sibi Alby:

Hello!

We have a scenario of reporting Execution status for newly created "Test Execution" type. This execution type can have more than one Tests associated. This "Test Execution" is getting imported to Jira using an XML.

I am setting up an automation rule to report the number of test cases passed or failed to MS teams.

I have given the rule as below:

![Picture1.png](/t5/image/serverpage/image-id/334012iC9154D2AB506C208/image-size/large?v=v2&px=999 "Picture1.png")![Picture5.png](https://community.atlassian.com/t5/image/serverpage/image-id/334018iF5D6B0D6123CEBB2/image-size/large?v=v2&px=999 "Picture5.png")

However, the {{Test Execution Status.count}} is always retrieved as 0 and reporting in MS team as shown below (with 0 total tests even though the number of Tests are more than 1).![Picture6.png](https://community.atlassian.com/t5/image/serverpage/image-id/334020iB2C9D46FB896C525/image-size/large?v=v2&px=999 "Picture6.png")![Picture7.png](https://community.atlassian.com/t5/image/serverpage/image-id/334022iBFD96204DE1B9FE7/image-size/large?v=v2&px=999 "Picture7.png")

"Test Execution" issue will be created every time after the DevOps execution (triggered from GitLab) completed but not the Tests.

Whereas, when I change the rule to below, it retrieves

{{Test Execution Status.count}},

{{Test Execution Status.statuses.get(0).statusCount}} and

{{Test Execution Status.statuses.get(1).statusCount}} correctly. But when new issue is created during actual run, the below rule is not working and it reports 0 in MS teams since the below one is applicable only for transitioning the issue status which is not working while creating new issue.

Can anyone please help me to fix this automation rule please?![Picture4.png](/t5/image/serverpage/image-id/334015iE0178C524F7168B8/image-size/large?v=v2&px=999 "Picture4.png")

Please let me know if you need additional information on the same.

Thanks a lot for your time and many thanks in advance!


Answers:
author: Bill Sheboy
body: Hi [@Sibi Alby](/t5/user/viewprofilepage/user-id/5538570) -- Welcome to the Atlassian Community!

First thing, which version of Jira are you using: Cloud, Server, or Data Center? You have tagged your question for Jira Cloud, but your rule image appears to be for Server or Data Center.

Next, which marketplace app are you using to manage tests and test results? This is relevant because not all apps / addons have fields / data which can be accessed from automation rules. To learn if your fields are available to rules, please use this how-to article: <https://confluence.atlassian.com/automation/find-the-smart-value-for-a-field-993924665.html>

Kind regards,  
Bill


Tags: atlassian-support

cloud

help

issue

jira

priority

rule

support

urgent
Copy Insight custom field values from Child issues
Asked by Vasanta Kumaar:

Hi,

We are trying to copy multi-select insight custom field values from the child issue to the parent link issue. We tried to implement it via Automation but were not able to achieve it. Is it possible to use ScriptRunner, it would be helpful if anyone share sample code.

Thanks,

Vasantakumaar


Answers:
author: Rick Westbrock
body: Can you share one or more images showing how you have configured your automation rule and the error you get when the rule executes?

comments: author: Vasanta Kumaar
body: Hi Rick,

We erased it because it was not working; and it work, only when the issue is linked. Additionally, when a new issue is linked, the field value is replaced with the new value, which should not happen.

Thanks,

Vasantakumaar


Tags: jira

scriptrunner
{{pullRequest}} smart values are empty
Asked by Emily Pinhasi:

we have jira cloud and bitbucket

the integration is working fine - i can manage and see the details of the branch and pull requests in jira as needed

in the automation rules, I would like to get teams notification when a pull request is created for a specific destination branch, but all the values i get for the {{pullRequest}} smart values are empty, so no trigger and the msg is actually empty

(the notification in teams works fine)

rule configuration I tried:  
jql to filter key=XXXX (one that i know has a pull request, and i can see it in jira)

send teams msg with info:

{{pullRequest.destinationBranch.url}}

{{pullRequest.destinationBranch.repository.name}}

{{pullRequest.destinationBranch.repository.url}}

{{pullRequest.createdDate}}

{{pullRequest.state}}

{{pullRequest.url}}

{{pullRequest.destinationBranch}}

the msg is sent but the info is empty

any idea what im doing wrong?


Answers:
author: Jehan Bhathena
body: Hi [@Emily Pinhasi](/t5/user/viewprofilepage/user-id/5536671)

Can you add a screen shot of your automation rule's trigger and the action that you've mentioned.

As per <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/>
> These smart values are only available for the Pull request created, Pull request declined and Pull request merged triggers

Also, to debug is a certain value is present would recommend using the 'Log Action' action to see if thr smart value actually has a value or not.

comments: author: Emily Pinhasi
body: tries the log-action, same result - empty values

my trigger at the moment is a scheduled trigger, where the jql: key=\<my issue that has pull request merged\>, and i trigger it manually from "run rule"

the log-action:

{{pullRequest.destinationBranch}} {{pullRequest.destinationBranch.url}} {{pullRequest.destinationBranch.repository.name}} {{pullRequest.destinationBranch.repository.url}} {{pullRequest.createdDate}} {{pullRequest.state}} {{pullRequest.url}}

and in the log i get empty msg.

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


author: Jehan Bhathena
body: Thanks for the image [@Emily Pinhasi](/t5/user/viewprofilepage/user-id/5536671)

You will have to update your automation trigger as <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/>

Try setting it to Pull request created, Pull request declined and Pull request merged and then retry please.


author: Emily Pinhasi
body: oh I see the problem, thank you very much

changed my trigger, waiting for someone to merge a pullrequest :)


author: Jehan Bhathena
body: Great,

If the automation works after the change, please mark this thread as Accepted, so that it's more visible to the rest of the community


Tags: pull-request

smart-value
Send a single email notification for unassigned issues
Asked by John Cross:

I would like to use automation to send out an email at 9am each day as a reminder when there are any issues in a specific project that have not yet been assigned.

I have the basics working, but my problem is that an email is sent for each issue that is unassigned - I only want to send one email out.

The rule looks something like this:

\[WHEN: 9am each day\]  
JQL: updated \<= startOfDay(-1d) AND statusCategory != Done  

\[IF: all match\]  
Assignee = empty  

\[THEN: send email\]

I have tried playing with entity properties but it seems to send multiple emails the first time and then never run again. I need it to run daily, but only send one email.

Any help appreciated!!

john


Answers:
author: Stephen_Lugton
body: [@John Cross](/t5/user/viewprofilepage/user-id/5080807) rather than using automation for this you can use subscriptions on a filter.

So first off create a filter:

* updated \<= startOfDay(-1d) AND statusCategory != Done AND assignee is EMPTY

Then under Filter Details add a subscription - you can either get everyone who you want to see the scheduled subscription notification to create a personal subscription, or you can create a group with everyone you want to receive the notification.

comments: author: Jacques
body: I agree with [@Stephen_Lugton](/t5/user/viewprofilepage/user-id/5180770) ... Using a subscription is a much better solution than overloading automation with this. Some more details on filters and subscriptions can be found in [this article.](https://www.atlassian.com/blog/jira/jql-the-most-flexible-way-to-search-jira-3-of-4)


author: John Cross
body: Yep - this did the trick! So simple :)


author: Duc Thang TRAN
body: Hello [@John Cross](/t5/user/viewprofilepage/user-id/5080807)

Here is my suggest :

* You can add the condition directly to the JQL query: updated \<= startOfDay(-1d) AND statusCategory != Done AND assignee is empty.
* For one mail with all issues : you can use the "Lookup issues" action and with associated smart values (more infos <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/>)
* like in this example :

![Capture d??cran 2024-07-03 123027.png](https://community.atlassian.com/t5/image/serverpage/image-id/333244i3DDE9EAEF5CFE298/image-size/large?v=v2&px=999 "Capture d??cran 2024-07-03 123027.png")

Hope this can help you
Iterate through Releases and send a scheduled email
Asked by Robert Newton:

Looking for help in a task to create a scheduled automation that iterates through each of the unreleased releases/versions, queries for the stories associated with each release, and then sends out a separate email for each release.

The trouble I'm running into is that there doesn't seem to be a way to iterate through releases in automation. The following JQL can be run to grab all of the stories

```
fixVersion in unreleasedVersions() and project = MyProject
```

But how does one grab the unique fixVersions from all the stories gathered here?


Answers:
author: Darryl Lee
body: Hey [@Robert Newton](/t5/user/viewprofilepage/user-id/5534812) - yeah I think the problem is that JQL only is capable of returning issues. So you may have to go to the Jira REST API.

There's details on how to do this here:

* [Automation for Jira - Send web request using Jira REST API](https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828)

And then you could hit this endpoint to get all the versions:

* [Get project versions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-versions/#api-rest-api-2-project-projectidorkey-versions-get)

And (assuming you're on Cloud), you can then iterate through all of the versions using [Advanced Branching.](https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935)

So you should be able to iterate through {{webResponse.body}} for each {{eachVersion.id}} and do a [Lookup Issues](https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues) for each version and generate a notification.

Well, in theory. Give it a spin, let us know if you run into any issues.

comments: author: Robert Newton
body: [@Darryl Lee](/t5/user/viewprofilepage/user-id/1365322)Thanks Darryl, this was exactly what I needed. I wasn't aware that the API existed to pull information like releases.


author: Darryl Lee
body: Ah yeah, it's a bit tricky, but Releases are tied to Versions, so hopefully that API has what you're looking for.

<https://support.atlassian.com/jira-software-cloud/docs/enable-releases-and-versions/>
Cannot Create New Bitbucket Workspace
Asked by Dryst:

I logged into my Atlassian account and attermpted to create a new Bitbucket.org workspace. It fails repeatedly with this text:

Something went wrong on our end. Please try again. If this keeps happening, [contact support](https://support.atlassian.com/contact/). (Issue ID for Atlassian use: 776a61f3cb7f4df190c838c96bf100d9)

I get no support, and I am referred here for help.

What is going on?


Answers:
author: Ben
body: Hi Dryst,

It appears your personal workspace is in the process of deletion - so this could be why you're receiving the error message.

Could you attempt to create a new user account using an alternate email address and create a workspace by following our documentation:

* <https://support.atlassian.com/bitbucket-cloud/docs/create-your-workspace/>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Deleting the Bitbucket account but keeping the Attlasian account
Asked by Tijana Vujcic:

Hello,

I have used a wrong account to try logging into an existing bitbucket repository, and in result it created a Bitbucket account under this wrong Atlassian account. I need to keep the Atlassian account as access to tickets.

I am not using Bitbucket under it so it should not be linked, and I want to delete it but from what I see in the community there is no other way to do it but to ask here as the question and see if someone is going to pick it up.

Can someone resolve this please?

Kind regards,

Tijana


Answers:
author: Ben
body: Hi [@Tijana Vujcic](/t5/user/viewprofilepage/user-id/5590569)

Normally, the process would simply be to delete the user account.

Your user account is managed by an organisation, however - so cannot be deleted from our end or from your end.

You will need to reach out to an organisational admin to get this user account deleted.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Tijana Vujcic
body: Hi [@Ben](/t5/user/viewprofilepage/user-id/4537226) ,

Can me or my admin remove Bitbucket as a Product from my account, without deleting the account itself?

Kind regards


author: Ben
body: Hi Tijana,

Yes, by removing product access - this will not delete your Atlassian account as a whole.

Cheers!

- Ben (Bitbucket Cloud Support)


author: Ivan Milosavljevic GET
body: Hey Ben,

Product iself is unmanaged - it's a free instance regsitered by a non-org admin user, using a managed account.

Therefore product access cannot be managed from org admin side. Can Atlassian remove it at the request of org admin of the managed account?


author: Ben
body: Hi [@Ivan Milosavljevic GET](/t5/user/viewprofilepage/user-id/5291881)

As you are the org admin, and there is no other way of deleting the account from the admin side - I have deleted Tijana's account on my end.

My next step was going to actually be to raise a ticket on behalf of the customer, but that's no longer necessary since you responded here :)

The account takes 30 days to fully delete, so you may see a lingering presence of it in some places up until that 30 days has passed.

Cheers!

- Ben (Bitbucket Cloud Support)


author: Ivan Milosavljevic GET
body: Hi [@Ben](/t5/user/viewprofilepage/user-id/4537226) , thats great, I was worried they are completely interconnected and cant be separated. I appreciate your effort, you're a star!

A side question, is it possible to do the same for users who have registered unmanaged Trello by accident, in similar circumstances?

I will ofc open a support ticket with more details, just want to confirm the possibility is there.


author: Ben
body: Hi [@Ivan Milosavljevic GET](/t5/user/viewprofilepage/user-id/5291881)

No worries! Happy to help :)

I'm not too sure about Trello, to be honest - I would suggest raising a ticket with the Trello team for more information:

* <https://support.atlassian.com/contact/#/>

Have a good week ahead!

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: atlassian

bitbucket-cloud

cloud
Help Needed with Bitbucket Two-Step Verification for Deployments
Asked by Iskandar Muhd:

Hi all,

I'm trying to create a new pipeline, but Bitbucket is prompting with the message: *"Two-step verification is required to enable Deployments."*

After following the steps, including scanning the QR code on my phone and entering the verification codes, I'm still being prompted with the same message. It seems I'm stuck in a loop.

Has anyone else encountered this? Any help would be appreciated!

Thanks in advance.


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

Bitbucket Cloud uses Atlassian accounts (the ones for <https://id.atlassian.com/>) for authentication, and at the moment it is possible to set up 2FA in two places at the moment:

* On the Atlassian account, from this page: <https://id.atlassian.com/manage-profile/security>
* On the Bitbucket account, from this page: <https://bitbucket.org/account/settings/two-step-verification/manage>

For Pipelines, it is necessary to enable Bitbucket 2FA (and not the Atlassian account's 2FA). I can see in our system that this is enabled for your Bitbucket account now, I'm not sure if you enabled it before or after you posted your question.

Can you please confirm if you have managed to enable Pipelines, or if you're still experiencing issues?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Can you create a branch without being about to write to it directly?
Asked by Sam Leibowitz:

We have a repo in Bitbucket that has a branch restriction where developers cannot write directly to branches called \*-development. The intention was to force developers to open a feature/work branch instead, and then open a pull request from there.

Unfortunately, that currently means that nobody can *create* a branch called \*-development, either.

Is there a way to allow users with write access to the repo the ability to create a new branch, but then not have the ability to commit directly to the branch?


Answers:
author: Saxea _Flowie_
body: I'm afraid this is not possible; the restriction prevents both operations. What I've typically seen done is assigning a group with someone like the project lead who can still have write permissions to create the branches. Depending on the workflow, it might be worth automating it. We provide a [Bitbucket app](https://marketplace.atlassian.com/apps/1231101?tab=overview&hosting=cloud) to automate PR workflows, which might be useful in your case.

comments: author: Theodora Boudale
body: Hi Sam,

Saxea _Flowie_ is right, this is not possible at the moment. I just wanted to add we have a feature request that you can vote for and where you can add your feedback:

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

Kind regards,  
Theodora


author: Scarlett Jones
body: You should be able to still create a branch, even with a branch rule that you cannot make changes directly to the branch. How did you implement it?  

I suggest to use branch permissions and prevent "Changes without a pull request". You may also want to consider preventing "Deletion" and "Rewriting history" along with this.

comments: author: Scarlett Jones
body: Keep in mind though I am thinking of Bitbucket data center. I don't know if this is different in cloud.


Tags: bitbucket-cloud

cloud
Why I can?t clone my local repository in bitbucket by Code Composer Studio?
Asked by DANIEL KALEB RUIZ CASALES:

I want to clone my local repository in bitbucked but when I try by HTTPS the CCS ask me a passwork that I dont know. I supouse that is the pasword of my Bitbucket acount, but cant achiev when wrote the password of my Bitbucket acount


Answers:
author: Theodora Boudale
body: Hi [@DANIEL KALEB RUIZ CASALES](/t5/user/viewprofilepage/user-id/5590109) and welcome to the community!

Your account's password can be used only for logging in to the website from browser.

If you want to clone a repo with basic authentication over HTTPS, you can generate an app password and use that instead of a password in your client:

* <https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>

The username should be the one listed here (after you log in):

* <https://bitbucket.org/account/settings/>

Please feel free to let me know how it goes and if you need further assistance!

Just a heads up, I removed the screenshots from your post to protect your privacy, as they were displaying your username and repo details.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Help me to find the Billing History for my bitbucket.
Asked by Arthur Harutyunyan:

Hi Community,

Could you please help me to understand how can I find the billing history of my Bitbucket Cloud ?

I could manage to do it for Jira, but it seems like it is impossible to have it for Bitbucket.

Thanks,

Arthur


Answers:
author: Kleber Pauta - ReleaseTEAM
body: Designated Billing and Technical Contacts can log into their My.Atlassian accounts and download quotes and invoices, make payments, add PO numbers, delete quotes, and make changes to existing/open quotes.

Log into your My.Atlassian account and click the Orders tab in the navigation bar.

In the Quotes tab, you can download a PDF quote or invoice, make a credit card payment, add a PO number, make changes to the quote, or delete the quote altogether.

In the Invoices tab, you can see an order's details by clicking the \>, or download a PDF of the paid invoice by clicking the Invoice link in the Actions tab.


Tags: bitbucket-cloud

cloud
Pipeline Artifacts with wildcards for shared pipeline templates
Asked by Fernando Mota:

I am attempting to create a shared pipeline template that can be referenced and used by our repositories. The template should be as flexible as possible to account for the different types of projects/modules. I have a "Java project build" step where it uses maven or gradle to build the project and at the end of the step, I want the build artifacts to be passed on to future steps.  

```
script:
  - ./mvnw -B clean verify
artifacts:
  download: false # Do not download artifacts in this step
  paths:
    - "**/target/**"
```

<br />

The intention of the above step snippet is to build a maven project and then find all of the build artifacts for the maven project. Typically for maven projects, they would be in a "target" directory so this wild card "\*\*/target/\*\*" should be doing just that.   

In practice, this does not seem to work for a project structure as such:  

```
- .mvn/
- src/
- target/
- .gitignore
- bitbucket-pipelines.yml
- mvnw
- mvnw.cmd
- pom.xml
```

I expected the target directory and all of it's content to be captured in the pipeline run but is not.

This is one project use case but it should also find multi-module projects with multiple target directories.

Any help is appreciated.


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

The path you are using, **"\*\*/target/\*\*"** , is going to match any folders named **target** that exist within another folder in the clone directory. So, folders like **dir1/target/\*\*** , **dir2/target/\*\*** , etc. It is not going to match a folder named **target** that exists in the clone directory.

If you want to match the latter as well, you can adjust your definition as follows:

```
script:
  - ./mvnw -B clean verify
artifacts:
  download: false # Do not download artifacts in this step
  paths:
    - "**/target/**"
    - target/**
```

I have tried that in a repo of mine and it works. Does it work for you as well if you make this adjustment?

Kind regards,  
Theodora

comments: author: Fernando Mota
body: This seems to work fine.  

The python glob documentation states that the double asterisk will match 0 to more directories. I assumed that **"\*\*/target/\*\*"** would also capture **"target/\*\*"** . I tested this using the python glob package as well. Perhaps there are glob implementation differences?  

Regardless, your recommendation will work for my use case.  

Thank you!


author: Theodora Boudale
body: Hi Fernando,

Thank you for your reply and you are very welcome!

I'm not familiar with the python glob package, the implementation may be different.

I talked with one of my colleagues, and you can also use the following in the artifact path in the yml:

```
paths:
  - "**target/**"
```

This is going to match both the **target** directory inside the clone directory, and also directories like **dir1/target**, etc.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud