youngmon/atlassian-qna huggingface dataset:
Send email notification when new attachment is uploaded
Asked by Quang Nguyen:

I am trying to create an automation that sends the Assignee a notification email when a new attachment is added to their issue. This should trigger when an attachment is added to the issue directly, and when an attachment is added to a comment on the issue.

If it an attachment to the issue, the email should read: "For {{link to issue.id}}, {{John Doe}} added the attachment {{FileName.extension}}"

If it is a comment, the email should read: "For {{link to issue.id}}, {{John Doe}} commented with the attachment {{FileName.extension}}"

I've tried searching for this but all the results I got were of people wanting to send the actual attachment via email. I only want to send the name of the attachment and a link to the issue.


Answers:
author: Bill Sheboy
body: Hi [@Quang Nguyen](/t5/user/viewprofilepage/user-id/5277828)

Did you try this with the Issue Commented trigger? When I did that, I saw the name of the attached file in the comment body. Perhaps try writing that to the log to see the format of the name for your use, as it could be parsed out using text functions or a regular expression.

Kind regards,  
Bill


author: Quang Nguyen
body: Managed to figure out the first part:

When value changes for Attachment:

```
For <a href="{{issue.url}}">{{issue.key}} - {{issue.summary}}</a>, {{initiator.displayName}} added the attachment {{attachment.filename.last}}.
```

Still trying to figure out the comment part, specifically how to detect when an attachment is added to a comment.
How to set the summary of linked issue to a text custom field within the other linked issue?
Asked by ???? ?????:

Hello,

I want make automation that will fill a text custom field with the summary information of it's linked issue.

for instance:

I have Initiative name: Initiative 1

and it's linked to an Epic, for instance by linked issue type: Epic of initiative.

I want that "Initiative 1" will be filled at "Parent Name" custom field within the Epic.

I tried using on the action item in setting:

{{issue.issuelinks.first.inwardIssue.summary}}

but it didn't work at all. Do you have any other suggestion? does it possible![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/272699i8D8EC289057BF4B2/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Ste Wright
body: Hi [@???? ?????](/t5/user/viewprofilepage/user-id/5240834)

You should be able to do this without a smart value when the issue link is added from the **Initiative**level, not the Epic:

* **Trigger:**Issue Linked
* **Condition:** Issue Fields Condition
  * Field = Issue Type
  * Condition = equals
  * Value = Initiative
* **Branch:** Related Issues
  * Type = Linked Issues
  * Link Type = \<link type\> - *the link type from Initiative to Epic*
    * **Branch-Action:** Edit Issue
      * Field = Parent Name
        * COPY - *access this option via the breadcrumbs (3-dots icon) next to the field*
          * Issue to copy value from = Trigger Issue
          * Field to copy value from = Summary

---

If it's the opposite way around, and the Epic is where the link is added, there shouldn't be a need for the Branch as the action is happening to the trigger issue:

* **Trigger:**Issue Linked
* **Condition:** Issue Fields Condition
  * Field = Issue Type
  * Condition = equals
  * Value = Epic
* **Action:** Edit Issue
  * Field = Parent Name
    * Value = *{{issue.issuelinks.first.inwardIssue.Summary}}*

---

Let us know if these work for you!

Ste

comments: author: ???? ?????
body: Thanks alot! it was a good advice. Really helpful :)
Pushing an Atlas update to a JIRA comment?
Asked by Menotti Minutillo:

We are experimenting with the Atlas \<\> JIRA integration. While I like the idea of using Atlas for summary level updates, it would be exceptionally useful to at least mark a comment in the linked JIRA issue when the Atlas project has been updated.

Why a comment? Because it triggers notifications to people who might be on the JIRA issue but not following the Atlas project.

The automation workflows don't seem to allow this unfortunately. Any workarounds?


Answers:
author: Curt Holley
body: Surely the simplest solution here is; Education!  

Let the people know that following the right stuff in Atlas is the way to ensure you are kept in the loop.  
Make sure the appropriating linking is in place so that from a Jira issue, they can follow the links and find the Atlas project it is related to.


author: Ste Wright
body: Hi [@Menotti Minutillo](/t5/user/viewprofilepage/user-id/5283270)

Not seen Automation for Atlas as of yet unfortunately, but you could make the suggestion through here: <https://jira.atlassian.com/secure/Dashboard.jspa>

An alternative might be via API, and whilst I don't believe this is available either right now, it's said to be on the mid-term roadmap according to [this comment](https://community.atlassian.com/t5/Atlas-questions/Is-there-API-endpoints-to-download-Atlas-content/qaq-p/2257833#M288)

Ste
Wanted a popup message to the user when the user triggers the rule manually.
Asked by Ankur Patel:

I am trying to create a jira automation rule where I wanted a pop up or some message box displaying to the user saying that specific jira automation rules has been triggered manually.  

Like a message to the user that specific rule has been triggered successfully so that user will know that rule is triggered and he/she will not trigger the rule one more time.


Answers:
author: Ben van den Berg
body: [@Ankur Patel](/t5/user/viewprofilepage/user-id/5282915)

Currently, all our Jira Cloud instances display a pop-up message in the bottom right corner of the page, stating, "**Your automation rule is in progress**", as depicted in the screen clip below. It seems the message remains visible for a while but not consistently until the rule execution has been completed.

![2023-08-04_18h21_12.png](https://community.atlassian.com/t5/image/serverpage/image-id/273323i6BE15B11AFF5FB8F/image-size/large?v=v2&px=999 "2023-08-04_18h21_12.png")  
It would be great if we could customise that pop-up message, or at least if Atlassian includes the automation rule's name/title with the message. It is not currently possible to change or customise the pop-up message, but it is better than nothing.  
I hope this helps a bit.


author: Dan Tombs
body: Hi Ankur,

Unfortunately a pop up message in not possible with native automation. There is however the automations tab when viewing an issue that shows you all automations that have run and the status when run. It is quite handy when trying to figure out if there were any issues.

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/272691iF8A00E5898C889BB/image-size/large?v=v2&px=999 "Capture.PNG")![Capture2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/272690iE146705421D78E9E/image-size/large?v=v2&px=999 "Capture2.PNG")
Auto Transition Jira Issue when Merge Event is sent from gitlab
Asked by Remigius Chidiebere Mgbekwute:

I am trying to automate the transition of issues(i.e. from SELECTED_FOR_DEVELOPMENT to IN_REVIEW) when a merge request is created on gitlab. Currently I have set up the webhook url to the gitlab repo and the event is being sent by gitlab and received by jira.

However I get this error "No issues from the webhook", which I think is because there is no specific field called issue in the webhook payload. So how can I have the issue value gotten off one of the field of the payload. i.e source_branch. If there is a better approach to this am willing to try as well  
Thanks  
![Screenshot 2023-08-02 at 01.01.39.png](https://community.atlassian.com/t5/image/serverpage/image-id/272601i1C6EC0114A9C7A4C/image-size/large?v=v2&px=999 "Screenshot 2023-08-02 at 01.01.39.png")![Screenshot 2023-08-02 at 00.57.02.png](https://community.atlassian.com/t5/image/serverpage/image-id/272600iAF936966EC1F092E/image-size/large?v=v2&px=999 "Screenshot 2023-08-02 at 00.57.02.png")


Answers:
author: Jehan Bhathena
body: HI [@Remigius Chidiebere Mgbekwute](/t5/user/viewprofilepage/user-id/5282466) ,

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/273421iB80087EC31B7460B/image-dimensions/347x139?v=v2 "image.png")  
Perhaps this trigger can help you?

---

If the above trigger doesn't suit your requirement, you can add the issue key at the end of the webhook, as shown below :  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/273422i404F640A6912A3E9/image-dimensions/398x75?v=v2 "image.png")
Jira Product Discovery automation to check for populated fields
Asked by Jim Smith:

In JPD you can't write in validations in the workflow...at least not yet. So, I'm thinking that Jira Automation can help here?

The scenario is that when the field, "Program Incrementor" value is changed, verify that xxx fields are not empty. If xxx fields are empty, then display a notification or an error message etc. and prompt for the fields to be populated.


Answers:
author: Ste Wright
body: Hi [@Jim Smith](/t5/user/viewprofilepage/user-id/5282142)

You can't use Automation to block a field change, but you could reverse the change?

The rule might look something like this...

* **Trigger:** Field Value Changed
  * Field = Program Incrementor
* **Condition:** JQL Condition
  * JQL - *"Field 1" is EMPTY OR "Field 2" is EMPTY OR "Field 3" is EMPTY*
* **Action:** Edit Issue
  * Field = Program Incrementor
    * Value = *{{fieldChange.fromstring}}*
* **Action:** Send Email
  * To = Initiator
  * Subject/Content = Explain why the edit was reversed/rejected

\^ I added the email action so a user whose modification is reversed knows why :)

Ste

comments: author: Jim Smith
body: [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470) Thank you! that actually will work quite well!


Tags: jira-cloud
Epics are being closed even when there is issuetype-Spike under To Do status
Asked by Jiten Khanna:

So there is already an Automation rule for the below but now I need to include issuetype-Spike in this as the Epics are getting closed by the rule even the issuetype- Spike is in To Do status, please advise.

#### STATUS DONE - Epics transition to Done when all child issues are Done {#toc-hId-260944685}


Answers:
author: John Funk
body: Hi Jiten,

Can you share your full rule here?

comments: author: Jiten Khanna
body: Sure, here is the snip![Epics Done.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/272446i4094696F573BC1C4/image-size/large?v=v2&px=999 "Epics Done.JPG")


author: Jiten Khanna
body: So I have added the issuetype now on both the JQL's but if you can confirm that is correct what I did


author: John Funk
body: That should work - give it a try and see.


author: Jiten Khanna
body: As of now no issues so I believe this would work :)


Tags: cloud
"How to Schedule a Trigger Eight Weeks from a Start Date"
Asked by ???_Jongun Choi_:

I want to execute a trigger when 8 weeks have passed from the start date. How should I do it?


Answers:
author: John Funk
body: Hi Jongun - Welcome to the Atlassian Community!

Create an automation rule with a Scheduled trigger to run once a day. Then add a JQL query to the trigger for Project = ABC and Created = -8w

comments: author: Bill Sheboy
body: Hi [@???_Jongun Choi_](/t5/user/viewprofilepage/user-id/5281747) -- Welcome to the Atlassian Community!

Adding to John's answer:

Did you want to do this from the "Start Date" or from the "Created" date for any issues?

Is the "Start Date" always filled in for your issues?

Kind regards,  
Bill
Automate Removing Story Points from 'Duplicate' resolution from stories
Asked by Jiten Khanna:

1. When an issue has story points and the resolution is set to "Duplicate" then the story points should be removed and set to blank  
2. When an issue has story points and the resolution is not set to "Duplicate" then the story points should be unaffected


Answers:
author: Frederik Vantroys
body: Hi [@Jiten Khanna](/t5/user/viewprofilepage/user-id/5280817) ,

This is a pretty straightforward automation:

- Make new rule

- condition : issue field condition

"resolution" Is "Duplicate"

- Action : edit issue , edit field

set field "Story Points" (set to field remains empty)

The second part of your question doesn't need work since the rule will only trigger when a resolution is set to duplicate


Tags: cloud
Need help with automation
Asked by BebeJ Recipe:

I have a recurring ticket created and need to automate it. Meaning whenever a new Sprint is created the recurring ticket should be added automatically or it should pop-up

Can someone please help me here?


Answers:
author: Frederik Vantroys
body: Hi [@bebe3](/t5/user/viewprofilepage/user-id/388533) ,

You can indeed make a new automation with "When sprint created"

- \> you make a new issue, fill in some data

- give in the sprint as a smart value with sprint.id

![image (1).png](https://community.atlassian.com/t5/image/serverpage/image-id/272167i1B5821178E8A6DE7/image-size/large?v=v2&px=999 "image (1).png")
Automation rule to comment on children as per the assignee from parent
Asked by Jiten Khanna:

I have created an Automation rule but somehow it's not providing the same Assignee name for Child issues from issuetype- Initiative# which is parent of Epic rather gives what's in Epic, any suggestions?

![Assignee under Comments.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/272525i2422AF7C9F4A9ECA/image-size/large?v=v2&px=999 "Assignee under Comments.JPG")


Answers:
author: Jiten Khanna
body: ![Fixed Comments Assignee.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/272731iEA019309414FCC54/image-size/large?v=v2&px=999 "Fixed Comments Assignee.JPG")

I managed to fix this as per the above snip


author: Manoj Gangwar
body: Hi [@Jiten Khanna](/t5/user/viewprofilepage/user-id/5280817) ,

When: issue comment

Branch: For subtask

The:n add a comment to issue

Use this under comment field. {{comment.author.displayName}}: {{comment.body}}

comments: author: Jiten Khanna
body: Thank you but I managed to create the Automation rule and it's working :)


author: Jiten Khanna
body: [@Manoj Gangwar](/t5/user/viewprofilepage/user-id/4484987) I have created an Automation rule but somehow it's not providing the same Assignee name for Child issues from issuetype- Initiative# rather gives what's in Epic, any suggestions?![Assignee under Comments.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/272523i6E3ED89D36ECACBB/image-size/large?v=v2&px=999 "Assignee under Comments.JPG")


Tags: cloud
REST Session from username/password?
Asked by Denise Skidmore:

I have a working python script that automatically adds/resolves comments/tasks to our PRs. I authenticate thusly:  
import os  
from oauthlib.oauth2 import BackendApplicationClient  
from requests_oauthlib import OAuth2Session  
from requests.auth import HTTPBasicAuth  
...  
client_secret = os.environ\['lint_client_secret'\]  
client_id = os.environ\['lint_client_id'\]  
client = BackendApplicationClient(client_id=client_id)  
oauth_session = OAuth2Session(client=client)  
_ = oauth_session.fetch_token(  
token_url=OAUTH2_TOKEN_URL,  
auth=HTTPBasicAuth(client_id, client_secret), timeout=300)  
I don't want to store my client secret locally, but I would like to be able to test my script locally, so I'd like to have an interactive mode that takes the username and password from prompts when the bitbucket environment variables are missing.

<https://developer.atlassian.com/cloud/bitbucket/authentication-for-apps/> Doesn't list a grant type that takes username and password. How should I get a request.Session object that logs in with username and password and uses the user's permissions? (I am an admin of my workspace, I expect all REST calls to be valid as my user unless specifically prohibited by merge restriction.)


Answers:
author: Hariharan Iyer
body: Hi [@Denise Skidmore](/t5/user/viewprofilepage/user-id/2945032) ,

If you're accessing bitbucket via a python script, you might consider using access tokens or app passwords as described here - <https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authentication>

HTH!

\~ Hariharan

comments: author: Denise Skidmore
body: App passwords are still secrets the local user may not have. I'm looking for a way for someone to log in with their normal password or maybe the SSL connection that already exists for push/pull activity, not an app specific password.


author: Jim Knepley - ReleaseTEAM
body: To your first question: I like using the [getpass](https://docs.python.org/3/library/getpass.html) library to get things like credentials:

```
client_secret = os.environ.get('lint_client_secret', getpass.getpass())
```

...but you could also use use [input()](https://docs.python.org/3/library/functions.html#input) or the [readline library](https://docs.python.org/3/library/readline.html) if you want to get fancy.

Regarding your second question: I suspect you'd need to use a [custom authentication](https://requests.readthedocs.io/en/latest/user/advanced/#custom-authentication) handler to add the JWT bearer token to a request.

comments: author: Denise Skidmore
body: This extra step has not seemed necessary. The values stored in "secured" environment variables are read by the script just fine. The automated script that runs on the server runs just fine. I'm looking at ways to modify the auth when running it on a dev machine that doesn't have those OS variables.


Tags: bitbucket-cloud

cloud
I accidently tried to write file to my repo that has an illegal WIN10 filename
Asked by pculverhouse:

"WL-INV-04.02.24_2024_00001-source-S2023-0004 - Case 313416, Assignment \\"Imager P1\\", SAP\[4\].pdf"

is causing git to hiccup and not push file changes to my bitbucket cloud. I have tried all the git commands to clean my local index. But this filename stays in the index and i cannot remove it.

My MAC allows the filename with ,"/ characters.

Any ideas on what to do, please?

Phil


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

If the file exists on the last commit of a certain branch, and if this branch is not merged into any other branches, you can reset the last commit with the command

```
git reset --soft HEAD~1
```

++Please note that this means you will lose all changes of the last commit.++

Another option would be to completely remove this file from the repo's history with BFG repo cleaner:

* <https://rtyley.github.io/bfg-repo-cleaner/>

That page includes step-by-step instructions and also an example of how to remove a certain file.

Please also check the section**Your current files are sacred...** ; if you want BFG to to modify also the latest commit of the HEAD, you will need to run it with the option **--no-blob-protection**.

It's important to note that BFG rewrites history, which means that the hashes of the repo's commits will change. It's good to communicate this to any other users who may work on this repo and ask them to take a fresh clone afterwards, so that they don't push back any commits with this file.

As mentioned on the BFG page, please backup the mirror clone before making any changes. I also recommend pushing your changes to a newly created empty repo first so you can check if the repo looks good before pushing to the repo you normally use.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Optional Deployment Environments
Asked by Curtis:

Is there a way to configure a PIpeline where it doesn't require deploying to every deployment environment. For example, if we have 3 dev environments, and want to only go to 1 of them, before moving on to one of the several qa servers.

Currently, I can't get it to progress to allow deployment to a qa server until it has deployed to all dev servers. Is there a way to bypass the standard BItbucket PIpeline deployment flow?


Answers:
author: Theodora Boudale
body: Hi Curtis,

If these deployments are all steps of the same pipeline, I'm afraid that it is not possible to skip one step and continue to the next one.

We have a feature request that you can vote for here:

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

In the meantime, you could create a separate [custom pipeline](https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Custom--manual--pipelines) for each deployment step, and then manually trigger only the custom pipeline you want.

Kind regards,  
Theodora


author: Curtis
body: All the deployment projects can be set as parallel, then there is the option to deploy them in any order. To set deployments as parallel, they must be configured part of the same deployment group.


Tags: bitbucket-cloud

cloud
I Don't have to see the APPS AND FEATURES tab in my workspace settings.
Asked by Poojarani Vhansure:

I Don't Have to see some tabs in my workspace settings. why does this happen? I also have admin access to this workspace.


Answers:
author: Ben
body: Hi Poojarani,

I can see that you are a member of a few **Personal**workspaces, this is an older deprecated workspace type where only the owner of that workspace (the email registered with the workspace at the time of its creation) is able to modify such settings:

* <https://confluence.atlassian.com/bbkb/difference-between-shared-and-personal-workspaces-1141477191.html>

The owner of those respective workspaces will need to change those settings, as even administrators on those workspaces will not have the option to do so. This is different to **Team** workspaces where all admins are considered to be the owners of the content, and can therefore make these changes.

If you still require further assistance, please raise a ticket with our support team in your timezone by using the workspace URL of your company workspace (this is a paid workspace and therefore this entitles you to support directly from our support team), as community is a public forum where the sharing of personal details would not be appropriate.

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

If you are unable to raise a support ticket, please let me know which timezone you are in so that I may raise one on your behalf and get this routed to the correct support team for your region.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
I think my account is inactive
Asked by Brady Candell:

from what I've read in the forums, it looks like my account may be inactive due to years of inactivity. This is the error I'm getting:

We couldn't log you in You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again.

<br />

I have tried resetting the password, deleting my cookies, trying different browsers, rebooting, nothing has worked.


Answers:
author: Thao Vo
body: I have faced this issue when logged into Bitbucket. Could you please help solve this issue? Thanks,

The issue displays an error:

"We couldn't log you in  
You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again."

comments: author: Patrik S
body: Hey [@Thao Vo](/t5/user/viewprofilepage/user-id/5525839) ,

thanks for reaching out!

I've also set your account back to active, as it was dormant given the long period of inactivity.

In the future, we suggest posting a new question with your issue, as we might miss the notification if you respond to someone else's question.

Thank you, [@Thao Vo](/t5/user/viewprofilepage/user-id/5525839) !

Patrik S


author: Patrik S
body: Hello [@Brady Candell](/t5/user/viewprofilepage/user-id/5525505) ,

thank you for reaching out!

Your account was indeed inactive in the backend, as it had not been used for a while.

I've just set it to Active again, so you should be able to sign in successfully now.

Could you try again and let us know if it works?

Thank you, [@Brady Candell](/t5/user/viewprofilepage/user-id/5525505) !

Patrik S


author: Nicolas Grossi
body: [@Brady Candell](/t5/user/viewprofilepage/user-id/5525505) Welcome, If you have an active license you might contact support.atlassian.com


Tags: bitbucket-cloud

cloud