youngmon/atlassian-qna huggingface dataset:
How to create an automation that edits Fix Version when a Sprint is started?
Asked by Nyssa Watkin:

Hi I'm looking for some help in creating an automation for the following:

If an issue is in a Sprint and that Sprint is started I want to populate the Fix Version with the latest unreleased version (or a specific version).

Some things to note about our set up:

We have Squads that work across multiple Projects - but all of these projects share the same Cross-Project Release which I want populated with the Fix Version.

I have tried setting this up and get an error saying:

*"The rule has been configured with components that require issues to be provided by the trigger. To run these components you must add a branch for this sprint or JQL. The following components require issues: Issue condition, Edit issue"*

Here's what I've got:

![Capture.PNG](/t5/image/serverpage/image-id/113269iA944FE33B63D2BAD/image-size/large?v=v2&px=999 "Capture.PNG")


Answers:
author: Kristin Lyons
body: Set it up like this:

![Screen Shot 2020-10-07 at 3.19.47 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/113323iCAE77453578527D7/image-size/large?v=v2&px=999 "Screen Shot 2020-10-07 at 3.19.47 PM.png")

comments: author: Nyssa Watkin
body: Yes, that worked! Thanks so much.


Tags: cloud
JSON Syntax for linking task to Epic based on populated field in Epic
Asked by Melissa Horvath:

Hi there!

Looking for some advanced JSON help here. When a task is created i want to automate the linkage of that task to an Epic based on a value in a custom field called "Product Groups". Thus the automation has several "Current" trees which will list each specific value of the Product Groups custom field and if the current task's field value matches the value currently being asked about for the Epic, the task will get the Epic link for that specific Epic.

Thanks for the help in advance!  
Melissa


Answers:
author: Bill Sheboy
body: Hi [@Melissa Horvath](/t5/user/viewprofilepage/user-id/1632008)

To help the community offer suggestions, would you please post an image of your rule, and note what is not working? Thanks!

Best regards,

Bill


Tags: cloud
Test cycle creation via API
Asked by Prasad Rajassekaran:

I am trying to create test cycle in zephyr from python scripts but getting multiple errors while making an API call. Could someone correct me where I am going wrong?

\*\*Note:\*\*

The tested credentials in my code are valid.

\*\*With Encoding:-\*\*

import base64  
from json import dumps  

import requests  

newCycleValues = dumps({  
"clonedCycleId": "",  
"name": "Foo",  
"build": "",  
"environment": "",  
"description": "",  
"startDate": "",  
"endDate": "",  
"projectId": "1234",  
"versionId": "1234",  
"cloneCustomFields": False  
})  

baseURL = '<https://foo.foonet>'  
createCycleURL = baseURL + '/rest/zephyr/latest/cycle'  
headers = {"Authorization": "Basic " + str(base64.b64encode(bytes('foo' + ":" + 'boo', 'utf-8'))), "Content-Type": "application/json"}  

x = requests.post(createCycleURL, data=headers, json=newCycleValues)  

print(x.text)  
print(x.status_code)

\*\*Error:-\*\*

{} 403

\*\*Without Encoding:-\*\*

import base64  
from json import dumps  

import requests  

newCycleValues = dumps({  
"clonedCycleId": "",  
"name": "Foo",  
"build": "",  
"environment": "",  
"description": "",  
"startDate": "",  
"endDate": "",  
"projectId": "1234",  
"versionId": "1234",  
"cloneCustomFields": False  
})  

baseURL = '<https://foo.foonet>'  
createCycleURL = baseURL + '/rest/zephyr/latest/cycle'  
headers = {"Authorization": "Basic " + 'foo' + ":" + 'boo', "Content-Type": "application/json"}  

x = requests.post(createCycleURL, data=headers, json=newCycleValues)  

print(x.text)  
print(x.status_code)

\*\*Error:-\*\*

{} 403


Answers:
author: nmenere
body: Hi [@Prasad Rajassekaran](/t5/user/viewprofilepage/user-id/4112472) ,

This community space is for the Automation capabilities within Jira. You may have better luck contacting Zephyr or trying another space.

Cheers,

Nick \[Atlassian - Automation Group Product Manager\]


Tags: cloud

jira-server

zephyr
Syncing a field (when changed) from initiative to epics
Asked by ShaneNickersonNeustar:

Can this be done using automation for JIRA?


Answers:
author: Egl? Pie??
body: Hi,

This can be resolved by this scheduled rule below. Here check if there are Epics, Stories, Tasks, Bug under initiative which does not contain fixVersion on Initiative. You could make it for Epics only also.

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

If you want not to use schedule rule but triger it by updating fixVersion on Initiative. Use this rule with JQL issuekey in childIssuesOf("{{triggerIssue.key}}") and issuetype != Sub-task :

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


author: Mikael Sandberg
body: Yes, it can be done, as long as you have a link between the initiative and the epics. You would then have a trigger that runs on issue change, and then use the branch rule/related issue component and Linked issues. Then use the action edit issue to copy the field value from the initiative.

comments: author: Don Dresser
body: [@Mikael Sandberg](/t5/user/viewprofilepage/user-id/853579) is that the Parent Link or another link? I've not been able to figure out how to identify this Parent Link field from within automation for jira, do you have any tips? :)


author: Mikael Sandberg
body: The parent link would only look upwards, for example from story to epic or from subtask to story/task. In your case I would use one of the other links types. You can then use the related issues rule, and you could create your own parent/child link if needed.

![Screen Shot 2020-10-13 at 10.16.48 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/114101iF9C331C50DCE75EB/image-dimensions/411x183?v=v2 "Screen Shot 2020-10-13 at 10.16.48 AM.png")


author: Fabian Lim
body: For those who are interested, here is a video turorial that explains it: <https://youtu.be/DcPYrw-Puus>

Just need to follow Mikael's branch changes.


Tags: cloud
Issue Add Flag
Asked by sebastien_gervais:

In JIRA for Automation, can we add an action that would Add a Flag to an issue, on a condition, like the issue has been in a specific status for more than 5 days.


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

Did you figure this out yet? If not, here is a rule that will do what you ask for NextGen:

* Trigger: scheduled daily, with JQL such as statusCategory = "In Progress"
* Condition: advanced compare of
  * First value: {{issue.statuscategorychanged.toDate}}
  * Condition: Less than
  * Second value: {{now.minusDays(5)}}
* Action: edit the issue field Flagged, setting it to TRUE

Best regards,

Bill


author: Andreas Knecht
body: Hi [@sebastien_gervais](/t5/user/viewprofilepage/user-id/64420) ,

We don't quite support this yet assuming this is a next gen project. We've got an issue open to track this though: <https://codebarrel.atlassian.net/browse/AUT-1235>

We'll hopefully get around to implementing this soon!

Cheers,  
Andreas


author: Curt Holley
body: Good idea [@sebastien_gervais](/t5/user/viewprofilepage/user-id/64420)


Tags: cloud
How to upgrade from free version used in Server to paid version in Data Center edition
Asked by Wim Abts:

Hi,

We currently use the free version of 'Automation Lite for Jira' on our Jira Server instance.

We are migrating to Data Center edition and the app now shows up as 'Not datacenter approved'.

We would like to upgrade to the paid version but how do we do that?

Can we just uninstall 'automation lite' and install 'Automation for Jira' and will all existing rules be kept?


Answers:
author: Daniel Eads
body: Hello [@Wim Abts](/t5/user/viewprofilepage/user-id/3794213) ,

The rules you created with the Automation Lite app will be accessible with the standard Automation app in Data Center. You can uninstall the Automation Lite app, install the Automation app (and apply your license for it), and you should be good to go with your existing rules. This will also unlock some additional components which aren't available in the Lite variant of the app.

Cheers,  
Daniel \| Atlassian Support


Tags: cloud
Popup notification
Asked by Stewie:

I'm trying to get popup notifications working with *Automation for Jira.*

The code is as follows:

```
import com.onresolve.scriptrunner.runner.util.UserMessageUtil

UserMessageUtil.warning("TEST")
```

This code *does* work if placed in a Validator script, but not when placed in an *Automation for Jira* script. Is there anyway around this issue? Or is it just not possible?

Many thanks.


Answers:
author: Kristian Walker _Adaptavist_
body: Hi Stewie,

I can confirm that there is no way to display a popup dialogue with **ScriptRunner for Jira Cloud** which you have indicated you are using, as Atlassian does not provide any **Rest API's** for **displaying popup dialogues** and **ScriptRunner for Jira Cloud** can only use the **Rest API's** which Atlassian provides.

However, you could work around this by having your script call the [Add Comment](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-post) API to add a comment when the pop up should be displayed or you could have your script call the [Send Notification](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-notify-post) API to send an email notification when the popup should be displayed.

I hope this information helps.

Regards,  
Kristian

comments: author: Stewie
body: Thanks for the info.


author: JimmyVanAU
body: Hi Stewie,

I'd lean on the side that this doesn't work.

Validators work while a transition in the workflow is being performed - in real time, while a user is looking at a screen.

Automation (in terms of Automation for Jira) happens asynchronously. While this typically happens within seconds and appears instant, it actually listens for events, and then performs actions. Automation for Jira can do things in the background, which makes the ability to display a notification kind of pointless.

Is there any reason you want to pursue use Automation for Jira in particular?

Cheers, Jimmy

comments: author: Stewie
body: Just exploring options. I've parked it for the moment..

Thanks for the reply.


Tags: adaptavist

cloud

jira

scriptrunner
Updating fixVersion using more options custom field updating not working
Asked by Conor Carey:

Hi all, I'm trying to use JIRA automation to update our fix version automatically based on the base branch we merge our feature branch into.

My automation looks like:![Screen Shot 2020-09-28 at 12.40.34 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/112070i1758E25E6303438E/image-size/large?v=v2&px=999 "Screen Shot 2020-09-28 at 12.40.34 PM.png") Does it look like I'm setting this up incorrectly? I also couldn't find any information on putting smart values inside quotes along with a string value as a sort of "Interpolation", so that might be incorrect as well, but really not sure


Answers:
author: Andreas Knecht
body: Hi Conor,

You can just add the Fix Version field using the simple form.

1. Remove everything you have in the 'Additional fields' field
2. Hit 'Choose fields to set' and add the Fix version field
3. Simply paste your smart value into the field

Also make sure please that you don't have spaces in your smart value after and before the curly braces.

Hope that helps!

Cheers,  
Andreas

comments: author: Conor Carey
body: Thank you [@Andreas Knecht](/t5/user/viewprofilepage/user-id/502325)! I think this is the correct answer and I will accept it. Unfortunately it did not work though and I'm wondering if that's because of my smart value.

Do you mind confirming this is set up correctly? I'm having a hard time finding documentation of exactly how to set this up.

The branch substring after - should be some like "1.0.0" and I want to add a V to it so it comes out to "V1.0.0".

I set my smart value up in the image attached.![Screen Shot 2020-09-29 at 6.10.21 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/112503i8A9C04075F0740FD/image-size/large?v=v2&px=999 "Screen Shot 2020-09-29 at 6.10.21 PM.png")
Automate Original Estimation field
Asked by JH:

Hi,

How can I automate the field for original estimate?

I have WBS Gantt to input the start date and end date for a task, and duration is generated.

How can automate original estimate field based on the formula below?

Original estimate = units \* duration \* 8

Where can I can find the value of original estimate (system) in JIRA?

Thank you.


Answers:
author: Sam Harding
body: Hi,

I'm not completely certain of your use case, but if you are wanting to set the 'Original Estimate' value on an issue, that can be done in 'Edit Issue' action, by selecting the 'Original Estimate' field in the drop down:  

![Edit Fields.png](https://community.atlassian.com/t5/image/serverpage/image-id/112539iB7239D74E9FA97E3/image-dimensions/391x274?v=v2 "Edit Fields.png")

The format it takes is a number followed by a unit character (for example, 2 days is 2d, 3 weeks 3w etc). If you have not yet calculated the duration value in your rule, you can use this smart value to generate the equation you are wanting:

```
{{#=}}{{issue.Start date.diff(issue.Due date).days}} * 8{{/}}d
```

By setting this as the value for the 'Edit issue' action, this will set the original estimate on your field to be 8 times the length of your duration, in days. If you wanted to use a different time scale, such as seconds, you could edit the smart value to be .seconds instead of .days, and update the last character to be 's' instead of 'd'.  

I hope that helps, let me know if you were looking for some other information other than this.

comments: author: JH
body: Hi,

Sorry, let me explain again.

I have start date and end date from WBS.

1. What is the smart value i should include to calculate the duration excluding weekend and weekdays?

Then, after I got the duration (at no 1), what is the smart value I should write to have the formula below?Original Estimate = Duration \* Units (from WBS) \* 8

Because I want it to be automatically calculated based on the duration and units and work hour per day.


Tags: addon-jp.ricksoft.plugins.wbsgantt-for-jira
How do you set up a assignee automation based on the reviewer assignee for a pull request?
Asked by Telford Burtts:

In bitbucket when you create a pull request you can assign a reviewer. When I create the pull request I would like the issue task associated with the pull request to transition in the sprint to the reviewer for the pull request.

Is there a way to set this automation up in the new Jira Automation triggers?


Answers:
author: Mo Beigi
body: Hi [@Telford Burtts](/t5/user/viewprofilepage/user-id/1237565),  

Sorry for the late response!  

Unfortunately, there is currently no way to access the reviewers assigned to the pull request as a smart value. These author based values are not exposed yet.  

We are currently gathering interest for this feature request here:  
<https://codebarrel.atlassian.net/browse/AUT-1997>  

Please follow that AUT ticket for future updates.   

Thanks,  
Mo


Tags: assignee

bitbucket

pull-request

review
I am not able to push the file to bitbucket
Asked by ravi:

remote: Invalid credentials  
fatal: Authentication failed for '<https://bitbucket.org>

I signed in with my Gmail, and while pushing my code bitbucket asked me to enter a password I gave my Gmail password. but it doesn't work


Answers:
author: Bao Truong
body: I recommend creating a password for the app since you sign in with your Google account.![Screenshot 2024-01-16 at 14.50.52.png](https://community.atlassian.com/t5/image/serverpage/image-id/300669iE16495330AC772E3/image-size/large?v=v2&px=999 "Screenshot 2024-01-16 at 14.50.52.png")  
Here are the referral links:

**[Create an App password](https://support.atlassian.com/bitbucket-cloud/docs/create-an-app-password/)**

**[Using App passwords](https://support.atlassian.com/bitbucket-cloud/docs/using-app-passwords/)**

comments: author: Theodora Boudale
body: Hi [@ravi](/t5/user/viewprofilepage/user-id/5406246) and welcome to the community!

I can confirm that Bao's reply is correct. Regardless of how you log in to the Bitbucket Cloud website from browser, when you clone, pull, or push to Bitbucket repos with basic authentication over HTTPS, you need to use

* your Bitbucket username, which can be found here <https://bitbucket.org/account/settings/>
* and an app password (see the documentation links that Bao provided)

Kind regards,  
Theodora


author: Bilal Mughal
body: Hi,

It seems you initially used your Gmail account to log in. To access the Atlassian account within the app, kindly use the password linked to your Gmail login for the Atlassian account. Thanks


author: Lovee Eric
body: Hi [@ravi](/t5/user/viewprofilepage/user-id/5406246)

It appears that you were logged in with your Gmail account. To access the Atlassian account in the app, please try using the Atlassian account password associated with your Gmail login.

Thanks

Lovee Eric

Brilyant Inc


Tags: bitbucket-cloud

cloud
assignee.displayName doesn't display Unassigned when the issues isn't assigned
Asked by Neil Jones:

Hi,

When writing a slack or email message from Jira Automation I am trying to display the assigned user or an issue in the email/slack message using {{assignee.displayName}} but if the issue is unassigned is doesn't display anything. Is there a way to get it to display "Unassigned" like it would in Jira?

Thanks

Neil


Answers:
author: Sherry Goyal
body: Hello [@Neil Jones](/t5/user/viewprofilepage/user-id/3636879)

Please try using:

```
{{assignee.displayName | Unassigned}}
```

If displayName is unset, "Unassigned" will serve as fallback value.

Hope this helps.

Cheers  
Sherry(A4j)

comments: author: Patricia Francezi
body: I wish we have more docs about smart values :(


author: Neil Jones
body: This worked perfectly, thanks


author: Gabi Zavilla
body: This doesn't work for me I'm afraid. The assignee is shown but the Unassigned is not. Any ideas why this could be? I looked for an answer elsewhere but there is nothing out there.


author: Lubomir Kosaristan
body: Hi [@Gabi Zavilla](/t5/user/viewprofilepage/user-id/4748189)   

the syntax of example is a bit off, try this: {{assignee.displayName\|"Unassigned"}} it should work (at least it works for me) :)


author: Gabi Zavilla
body: Thank you [@Lubomir Kosaristan](/t5/user/viewprofilepage/user-id/2406791)


author: Gabi Zavilla
body: This worked a perfect treat, thank you again!


author: Patricia Francezi
body: Hi [@Neil Jones](/t5/user/viewprofilepage/user-id/3636879)

What I would do is to perform a condition in the rule (a branch).

If assignee is empty send X message

If assignee is not empty send y message.

Its normal not showing anything, as you are resquesting a value, and in Unassigned issue the information is not really present.

I hope this helps

comments: author: Neil Jones
body: Thanks for the help


Tags: cloud
N?o consigo logar com autentica??o de dois fatores.
Asked by anderson.alves:

Boa tarde,

N?o consigo logar com autentica??o de dois fatores no bitbucket, j? tentei recuperar a senha mas n?o funcionou.

Algu?m consegue me ajudar ?


Answers:
author: Patrik S
body: Hello [@anderson.alves](/t5/user/viewprofilepage/user-id/5405862) and welcome to the Community!

We understand that you are having issues logging into your Bitbucket Cloud profile due to the Two-Step Verification (2SV) requirement.

Please note, users that who have enabled this extra security feature, will be required to go through the verification process upon the expiry of an existing active session or when attempting to log in from a new device.

If you lose access to your mobile device, you can access your account using a one-time link sent to the email address associated with your user profile.

The recovery link will allow the user to temporarily disable 2SV and log in to the account.

To request the recovery e-mail through the login screen you will need to click on **Forgot code \> Send recovery email when prompted for the 2SV code**.

Please note, that there is a 24-hour wait period to receive the email. This 24-hour delay is a necessary measure to protect our customers and their data from social engineering attempts.

Thank you, [@anderson.alves](/t5/user/viewprofilepage/user-id/5405862) !

Patrik S


Tags: bitbucket-cloud

cloud
Missing all repos from Bitbucket
Asked by Francesco Marassi:

I logged into my account first time in more than a year and all my repositories are missing. Now it seems like I'm on a new workspace and I can't access the older one. I checked the email and it's the same, I also used the same login info to access.  

How to recover all my work?


Answers:
author: Ben
body: Hi Francesco,

I'd suggest checking your commit history, and also your git config locally to determine if there are any other email addresses listed here:

```
git log
git config --list
```

I would also suggest checking your remote list and comparing the workspaceID listed here with the workspaceID listed in your current workspaces Workspace Settings:

```
git remote -vvv?
```

The last thing I'd suggest is attempting to login with each and every single email address that you remember being an owner of.

If you are unable to locate the correct workspaceID/access your data, please let me know as I will need to raise a support ticket on your behalf.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Getting invalid credentials error when trying to access repository with sourcetree
Asked by aaronbrockhurst:

Hi

I'm using sourcetree to push commits to our bitbucket repository.

I can commit fine to one repository but I get an invalid credentials when connecting to another repository

I'm using the same account in sourcetree on the same mac and I am am administrator / admin of both repositories.

Completely lost as to what the issue is, especially as I can connect without issue to other repositories


Answers:
author: Theodora Boudale
body: Hi Aaron,

* Do you have access to the affected repo with the same Bitbucket Cloud account or do you have multiple Bitbucket accounts with access to different repos?  

* I assume that the error happens on push (and not on commit, which is a local operation), is this correct?  

* Can you check in SourceTree the Settings for this repo, tab Remotes, does the URL have the following format?  

  ```
  https://username@bitbucket.org/workspace-id/repo.git
  ```

* Is your Bitbucket account added in SourceTree, and if so, which Auth Type did you use?  

* Could you perhaps share a screenshot of the full output of the command, or copy-paste it here (sanitize username, repo name, workspace id, etc before sharing)?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

sourcetree
Not receiving email to complete 2FA email verification process for Bitbucket
Asked by Geoffrey He:

Not receiving email to complete verification process. I have used Twilio Authy for authentication. ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/153708i5E38D54D5A43C65B/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Geoffrey He
body: Found the email, it was rerouted to a different folder


Tags: bitbucket-cloud

cloud