youngmon/atlassian-qna huggingface dataset:
'Branch creation' trigger runs on commit
Asked by Daniel Domberger:

I've got an automation rule that transits a ticket to \`In Progress\` whenever a new branch is created. This worked fine until a few days(?) ago when it started to behave strangely. It now looks like it gets called every time we push a new commit to an already existing branch.

The usual workflow is like this:

Branch gets created =\> automation moves ticket to \`In Progress\`

PR is opened =\> automation moves ticket to \`In Review\`

Now if I push a commit to a branch with a ticket, that is in review, the audit log tells me that \`Branch created\` rule got triggered and the ticket is actually moved to \`In Progress\`. As a workaround I've now added a condition to check if the status is not \`In Review\` like this:

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

But there seems to be something strange here as I wouldn't expect the \`Branch created\` trigger get called on a new commit push to an already existing branch.


Answers:
author: Bill Sheboy
body: Hi [@Daniel Domberger](/t5/user/viewprofilepage/user-id/1329264)

I didn't see any defects for this in the public backlog, and I suggest asking your site admin to submit a ticket to support: <https://support.atlassian.com/contact/#/>

Best regards,

Bill

comments: author: Daniel Domberger
body: Thanks a lot. Will do.


author: Sanath
body: Hey, [@Daniel Domberger](/t5/user/viewprofilepage/user-id/1329264) I see that you've marked the answer as accepted. Did someone from Jira support fix it for you? Can you share the steps here so others could benefit?

If not, why is this accepted?


author: Sai Krishna
body: Hi [@Daniel Domberger](/t5/user/viewprofilepage/user-id/1329264)

I'm facing a similar issue where every new commit is triggering the "Branch created" rule on Automation.

Were you able to find any solution for this ?

Thanks!
Make JSD Daily
Asked by SUNMI HELP DESK:

We want to make a daily report automation function, which can launch daily reports regularly every day.  
The content of the daily newspaper gives you:  
1. Project name  
1) Support person: name  
2) Unfinished ticket: quantity  
Then repeat


Answers:
author: nmenere
body: You can create a rule for this like:

* Schedule trigger - daily
* Lookup issues - unfinished tickets
* Send Email:
  * specify To
  * reference the the issue count using **{{lookupIssues.size}}**

The missing part is if you had to dynamically lookup the Support person or Project.

Cheers,

Nick
Check time and day of week as condition?
Asked by Mark Haller:

Can I use IF / ELSE blocks with time/date/day of week? If so, how?

When a critical ticket is created

... Then if I'm Monday to Friday, and it's 9AM to 5PM, then I want to assign ticket, and notify in Slack channel with a certain message

... Else I don't want to assign the ticket, and I want to notify in Slack channel a different message

I saw a convoluted solution to do this with JQL - so you get your run on ticket create, and if the priority is critical but then your IF is JQL with the query in - but it's not working consistently, as the trigger timea and JQL and more just aren't working together. So I'd prefer to just use simple smart values and IF/ELSE instead.

I've got this but it's obviously a formula fail!

![](https://i.imgur.com/tLBnWtG.png)


Answers:
author: Bill Sheboy
body: Hi [@Mark Haller](/t5/user/viewprofilepage/user-id/502503)

I believe that you can do this with RegEx comparisons. Also, you may also want to account for the time zones, such as from the reporter.

![Created in weekday time range.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/134113i7AF351817F7097A5/image-size/large?v=v2&px=999 "Created in weekday time range.PNG")

Here are the details, if my image is not clear, using If/Else, with an Advanced Compare Condition with two clauses.

For the day of week use:

* First Value: {{issue.created.convertToTimeZone(issue.reporter.timeZone).format("E")}}
* Condition: exactly matches regular expression
* Regular expression: (Mon\|Tue\|Wed\|Thu\|Fri)

For the time range use. Please adjust your time range as desired:

* First Value: {{issue.created.convertToTimeZone(issue.reporter.timeZone).format("H")}}
* Condition: exactly matches regular expression
* Regular expression: (9\|1\[0-7\])

Please watch out for typos when entering RegEx values, as it appears the rule editor can hang when it has a problem parsing them to publish the rule.

Best regards,

Bill

comments: author: Darryl Lee
body: This is really really good stuff [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313). Bookmarking for future possible use.


Tags: jira-server
Public holidays as non-business days - Email Reminders
Asked by Sarath:

Hello I'm using automation for jira (server) plugin to send reminders as and when tickets reach 20 business days past a date field. For that I'm using following condition

```
{{issue.fields.customfield_1234.diff(now).businessDays}}
```

From the documentation I read that only weekends can be excluded from business days. But I'm looking if there is a way to exclude public holidays (selected dates 1/1/21 ; 2/15/21, etc).

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


Answers:
author: Bill Sheboy
body: Hi [@Sarath](/t5/user/viewprofilepage/user-id/212690)

That feature idea appears to be in the backlog: <https://codebarrel.atlassian.net/browse/AUT-1623>

Until that gets implemented, you may need to compute the business days diff by hand by checking for the holidays being in the date range. If you are using Jira Cloud, the Create Variable action could help provide some working storage.

As another alternative, you could use a scheduled rule which updates in-progress issues once per day, accumulating holidays which have passed since starting work. Then subtract that number from your business days calculation before checking for the 20 day threshold.

Best regards,

Bill
How to concatenate two attribute values to set a third attribute value in Insight object
Asked by Shaun McGuire:

Using Insight Cloud:

I have an Employee ObjectType. I have three field in addition to the standard name field.

First Name

Last Name

Email Address

I am setting up an automation in the Object Schema to do the following:

On CREATION and / or UPDATE of an Employee Object, the name attribute and the email address are updated as follows:

name = (First Name) space (Last Name)

email address = (Firstname).(LastName)@domain.com

When I edit the THEN portion of my automation, I select Action = Atrribute Value and I input the Attribute Name I want to update. I don't know what to put into the Value field. Whatever I enter there just gets input as typed into the Attribute value.


Answers:
author: Gareth Cantrell
body: Hi [@Shaun McGuire](/t5/user/viewprofilepage/user-id/4276881)

You can use placeholders in the automation rule to achieve this, for example, in the Attribute Value action, use the placeholders as follows (as documented [here](https://documentation.mindville.com/display/INSCLOUD/Insight+Automation#InsightAutomation-AttributeValue)):

**Attribute Name**: Name

**Value**: ${First Name} ${Last Name}

comments: author: Shaun McGuire
body: Thank you VERY MUCH for this answer. What is NOT clear in the documentation or original video is that you are using curly brackets, not just regular parentheses. Is there any documentation that talks about specific things like using ${fieldName} in expressions?


author: Gareth Cantrell
body: [@Shaun McGuire](/t5/user/viewprofilepage/user-id/4276881) as you mention, it seems the Cloud documentation is not very clear on this.

The [server documentation](https://documentation.mindville.com/display/INSSERV/Insight+with+Placeholders) is much better at addressing how to use place holders.


Tags: cloud

insight
Jira Automation - Status Transition error "Destination status could not be resolved"
Asked by Michael Dobbs:

We're attempting to automate a status transition of a particular issue type when an update is sent via Salesforce. The actual transition does appear to work but we're getting an error in the log.

Rule and error attached.![AutomationRule.png](https://community.atlassian.com/t5/image/serverpage/image-id/133170i2AF06CC4A0590DC8/image-size/large?v=v2&px=999 "AutomationRule.png")

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

My suspicion is that the error is occurring due to the number of times the issue has entered this state (Reopened - 4) and it's actually a bug with the report. But am I missing something?

Note: the issue does actually successfully transition to Reopened.

We are using Jira Cloud.

Kind regards and many thanks for any feedback.


Answers:
author: Danyal Iqbal
body: You need a global Transition to the reopened status, for this automation rule to work as desired.

comments: author: Michael Dobbs
body: Thanks for your feedback Danyal.

Forgive me but I'm not familiar with the concept of a "global" transition?  
Is it simply the case that any status is permitted to transition to it?

If so, then i'm not sure why it would only be a log error and not actually fail completely.

Kind regards


author: Jack Brickey
body: agree. and the fact that the transition did actually occur tells me that either the automation worked or the issue was already in the status associated w/ reopened transition. I might consider improving your conditions a bit to align w/ your workflow. If you have an "All" transition into the status that is associated with reopening then it is pretty easy - just add a field condition to check that you are not already in your target open status. if you are not using an "all" transition then you need to consider the from statuses that you could be in when this rule triggers.


author: Michael Dobbs
body: Thank you for the suggestion Jack,  
I ended up adding a != Open status to the IF which appears to have resolved the issue.

Many thanks for your help.


author: Jack Brickey
body: As stated it appears that the transition is working correct? If so then I think it is just a false error which I have seen before when the automation doesn't run cleanly. With that said I would recommend you do a couple of controlled tests on this just to try to understand the error. It would be interesting to use the log event action to capture of the incoming status.

comments: author: Michael Dobbs
body: Thanks Jack,

I will set a log event to capture the incoming status.  
In theory it will always be transitioning from a Closed status due to the workflow of the issue.

Kind regards
Setup proper Active sprint with Parallel sprints enabled
Asked by Mateusz Przyby?ek:

Hi,

We have enabled Parallel sprints in our Board.

Additionally we use Automation for JIRA to inject Bugs automatically into one of your sprint.

Unfortunately, the automation task selects the wrong sprint from two active ones in parallel.

How can we determine which sprint should be chosen?


Answers:
author: Bill Sheboy
body: Hi [@Mateusz Przyby?ek](/t5/user/viewprofilepage/user-id/3693797)

Please post an image of your rule to provide some context for the community to suggest ideas.

The criteria you use to trigger creating the defect (bug) may provide what you need to find the sprint. Seeing the rule and its conditions will help confirm this.

Thanks, and best regards,

Bill

comments: author: Mateusz Przyby?ek
body: Here you have

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

How to choose proper active sprint in Automation when two of them are active in parallel?


author: Bill Sheboy
body: Hi [@Mateusz Przyby?ek](/t5/user/viewprofilepage/user-id/3693797)

Thanks for that additional information... Now the question is **how do you decide which sprint to put an issue into when multiple ones are running?** The automation rule can only select correctly when it has the same information/choice-making you use.

For example, if you are running parallel sprints for two teams and your teams use Components to indicate "team 1" and "team 2", the rule could use Component to decide. And, to successfully select the sprint the parallel sprints need distinct names. If they cannot be distinguished by your criteria, what you ask may not be possible.

Thanks,

Bill


author: Mateusz Przyby?ek
body: In my case all bugs jump info one of running sprints. But still I cannot choose which one in Automation. There is just option "Active sprint"


author: Sam Harding
body: Hi [@Mateusz Przyby?ek](/t5/user/viewprofilepage/user-id/3693797)   

One way to achieve this would be to specify the sprint in the 'Addition Fields' JSON in the 'More Options' section. Here you can specify the exact sprint using its id. It would look like this:  
![Screen Shot 2021-03-08 at 3.30.35 pm.png](https://community.atlassian.com/t5/image/serverpage/image-id/133371iAC15FB4778983662/image-size/large?v=v2&px=999 "Screen Shot 2021-03-08 at 3.30.35 pm.png")

More information on finding out your sprint id can be found here [https://community.atlassian.com/t5/Jira-questions/Where-is-the-sprint-id/qaq-p/37947.](https://community.atlassian.com/t5/Jira-questions/Where-is-the-sprint-id/qaq-p/37947.?)  

The issue with this approach is that when you start new sprints, you would need to configure the rule to update the sprint id each time. This is unavoidable, as [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) says, there is not enough information about the selection criteria for the rule to determine which is the correct sprint to put it into without having that manually configured sprint id every time there is a new sprint.

Hope this helps

Sam


Tags: jira-cloud

parallel-sprints
Can ownership of an automation rule be assigned to a group?
Asked by Gregory Gadow:

When creating a project automation rule, an owner must be supplied, because this owner is sent notifications should the automation fail. I would like to have these notifications sent to a distribution list rather than a single individual. I cannot find any way to redirect the failure notifications, and I cannot figure out how to assign ownership to a group rather than an individual user.

Is what I want possible, and if so, how can I do it?


Answers:
author: Darryl Lee
body: One idea, although it burns a license, is to create a Service Account that is linked to a distribution list, and make that account the owner of the rule.

One advantage of a Service Account though is that you can use it for other things, like generating API tokens for use in Automation Rules or Opsgenie integration without tying it to a single user who may eventually leave the company:

<https://community.atlassian.com/t5/Jira-Software-questions/Is-it-possible-to-access-Jira-API-via-Automation-for-Jira/qaq-p/1579920#M116734>

comments: author: Gregory Gadow
body: I will look in to this, thanks.


author: Bill Sheboy
body: Hi [@Gregory Gadow](/t5/user/viewprofilepage/user-id/4288651) -- Welcome to the Atlassian Community!

It appears that feature is in the backlog and not yet available:

<https://codebarrel.atlassian.net/browse/AUT-2009>

<br />

Best regards,

Bill

comments: author: Gregory Gadow
body: Thanks for the quick response. I think that Darryl Lee's idea of attaching a group email to a service account might be the ticket around this.


Tags: cloud
'unauthorized' when trying git push
Asked by Alashazam:

Hello,

I have setup a repository with access from 2 laptop

one works fine, and the second with a second account cannot perform a git push

and returns this message:

*Unauthorized*   
*fatal: Could not read from remote repository.*

*Please make sure you have the correct access rights*   
*and the repository exists.*

The account has 'write' access to the repository, and an access key setup

ssh is working

$ ssh -T git@bitbucket.org  
authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled

$ git --version  
git version 2.27.0.windows.1

what did I do wrong?


Answers:
author: Alashazam
body: It took me a while,

But I fixed it, the problem was that my gui git was too old

So I have updated to latest Git for Windows v2.43.0

(incidentally, then was impacted by this other issue

[https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor).](https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor)

but once this was fixed, the git push worked as expected


Tags: bitbucket-cloud

cloud

git

push
Repository is over the size limit (4 GB) and will not accept further additions
Asked by Idris AIT MOULAY:

remote: Repository is over the size limit (4 GB) and will not accept further additions.  
remote:  
remote: Learn how to reduce your repository size: <https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/#Rewind-history-to-undo-large-commits>.

To [https://bitbucket.org/\*/\*.git](https://bitbucket.org/*/*.git)  
! \[remote rejected\] master -\> master (pre-receive hook declined)  
error: failed to push some refs to '[https://\*@bitbucket.org/\*/\*.git](https://*@bitbucket.org/*/*.git)'

I can not push due to reaching the sit limit of the repo.  

there same info about repository from my machine.  

\`\`\`  
$ git count-objects -vH  

count: 0  
size: 0 bytes  
in-pack: 173220  
packs: 1  
size-pack: 95.57 MiB  
prune-packable: 0  
garbage: 0  
size-garbage: 0 bytes  

<br />

There no way to run git gc into my remote repository ?


Answers:
author: Syahrul
body: G'day [@Idris AIT MOULAY](/t5/user/viewprofilepage/user-id/5216468)

I have triggered Git GC on the affected repository, and the size has been reduced to 130 MB after it is complete.

Hope this helps.

Regards,  
Syahrul


Tags: atl-rvw

bitbucket-cloud

cloud
Email on suppression list
Asked by Abhijeet Singh:

There are 4 emails potentially in the suppression list , I was transferring my domain and during the migration my emails were messed up which could have resulted in a permanent failure error.

Request members of the community to help here please.

Emails : \[redacted\]

cc [@Andy Heinzer](/t5/user/viewprofilepage/user-id/541137) / [@Patrik S](/t5/user/viewprofilepage/user-id/4603309)


Answers:
author: Andy Heinzer
body: [@Abhijeet Singh](/t5/user/viewprofilepage/user-id/5421341) I found there was a suppression to multiple user accounts that share your domain. There appears to have been a bounced message to your address on:
> 2024-01-29T02:38:17.000Z 550 Requested action not taken: mailbox unavailable

I have cleared the suppression on our side, but this response from your mail server is why it was added to the suppression list. Might be something to share with your mail administrator.

Andy


Tags: bitbucket-cloud

cloud

jira
How to point my domain to bitbucket static website
Asked by sandeep-corp:

I tried to update the DNS setting of my domain to point it to my bitbucket.io page but on hitting the domain i see a Atlassian 404 page, which indicates that the DNS settings are correctly pointing to Bitbucket but not loading my bitbucket.io page.

Can anyone help here? Could it be because my domain is missing an SSL certificate?


Answers:
author: Saxea _Flowie_
body: Hi [@sandeep-corp](/t5/user/viewprofilepage/user-id/5421368)

I'm afraid this is not supported yet. There's a feature request here [BCLOUD-11257](https://jira.atlassian.com/browse/BCLOUD-11257).

comments: author: sandeep-corp
body: Got it, thank you for helping.


author: sandeep-corp
body: Hello Community, Any help here?


Tags: bitbucket-cloud

cloud

dns

domain

page

ssl

website
Revoking commit token
Asked by vovavovavova:

Hello, I use bitbucket account on several laptops. Credentials (commit token and repo url) is stored in certain credential manager dependent on operation system.

I want to remove the commit token to make it unable to commit and pull, and create new one - for security reasons. I can't find in UI where I can do that. Please help me.


Answers:
author: Syahrul
body: G'day [@vovavovavova](/t5/user/viewprofilepage/user-id/1254250)

We don't have a commit token, so I suggest try looking into all of the following available Access tokens in Bitbucket cloud:

* [Repository Access Token](https://support.atlassian.com/bitbucket-cloud/docs/revoke-a-repository-access-token/)
* [Project Access Token](https://support.atlassian.com/bitbucket-cloud/docs/project-access-tokens/)
* [Workspace Access Token](https://support.atlassian.com/bitbucket-cloud/docs/workspace-access-tokens/)

Let me know how it goes.

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
Self Hosted Runner | Logs Cleanup
Asked by cloud_admin:

Hi Team,

I am managing a Linux shell self-hosted runner and constantly need to expand the allocated disk space. I'm struggling to pinpoint which files or folders can be regularly cleaned up to ensure that I can redeploy existing pipelines while removing unnecessary files generated during the build process.

Can you provide guidance on identifying and managing these files effectively?


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

If the runner directory on this machine is for example **/home/ubuntu/atlassian-bitbucket-pipelines-runner**, then the runner is going to create directories during every build inside

```
/home/ubuntu/atlassian-bitbucket-pipelines-runner/tmp/b609961f-891e-c872-c36b-f3f2c315d186/
```

where **b609961f-891e-c872-c36b-f3f2c315d186** will be the UUID of your own runner. The runner will try to clean these directories after every build. If it fails, you can also delete the directories inside this location, if no build is running at that moment.

The **runner.log** file is located in this directory as well, but I see that after deleting it, it is not recreated automatically on the next build. If an error occurs with the runner, the first thing we need to look into is the runner log. So, if you delete this file and also close the terminal session where the runner runs, there will be no logs to investigate what is happening in case of an error. I will ask the development team whether there is a way to work around this issue and I will get back to you. In the meantime, I would recommend not deleting this file for now.

Since this is a Linux Shell runner, it is also possible that the commands from your bitbucket-pipelines.yml file's script generate files outside the directory I mentioned earlier. If that is the case, the runner is not going to delete these files. You will need to check your build's commands and your project's configuration to see if the build generates files outside the directory I mentioned.

Kind regards,  
Theodora

comments: author: cloud_admin
body: Hello Theodora,

Upon inspection of the mentioned folder, only log files were discovered. It seems these files are being cleaned as part of the build process. However, I am still uncertain about the reason for the continual increase in file size. Any files generated during the pipeline are solely copied to the BITBUCKET_CLONE_DIR directory.

What additional cleanup measures can be undertaken?


author: Theodora Boudale
body: Hi [@cloud_admin](/t5/user/viewprofilepage/user-id/5421038),

I'm not sure which files you are referring to by "the continual increase in file size".

Have you checked which files take up a lot of space on that server and increase in size?

Is it the runner.log file? If not, is it any other runner-related file, and if so, which one?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud