youngmon/atlassian-qna huggingface dataset:
Scheduled FixVersion & Epic Creation Linking
Asked by Justin:

We have a Scheduled cron expression (0 15 3 ? \* MON-FRI) setup to create a FixVersion and Epic (0 20 3 ? \* MON-FRI) every morning. What I'm having trouble with is linking the newly created version with the newly created Epic.

I've tried both 'next unreleased version' and 'last unreleased version' options on the Epic FixVersion field to see if I can get the field to set on the Epic, but nothing happens.

One thing I have noticed is that on the create of the fixversion, the release date isn't being set which may be the culprit. I've tried to set it multiple ways but it never gets populated:

- Leaving as blank (as it states should populate todays date but does not)

- Using the format recommended (format: yyyy-MM-dd) does nothing

- Formatting like the field displays in Jira {{now.format("dd/mm/yy")}} also does nothing

Any help is greatly appreciated!

![setReleaseDate.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/106469i83DB49C74E8243E3/image-size/large?v=v2&px=999 "setReleaseDate.JPG")

![releaseDate.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/106470iC4437EBA05EB3323/image-size/large?v=v2&px=999 "releaseDate.JPG")


Answers:
author: Justin
body: Solved this with using JSON below in case anyone else is trying to do this:

```
{
"update": {
"fixVersions" : [
{
"add": {
"name" : "{{now.format("MM/dd/yyyy")}}"
}
}
]
}
```


author: Justin
body: Was able to solve the issue to populate the Release date now by using this syntax:

{{now.format("yyyy-MM-dd")}}

Still no luck in getting the Epic FixVersion to populate using 'last released version' or next unreleased version'.


Tags: epic

jira
which User Attributes from Atlassian Access can be used in Automation for Jira
Asked by Vinod Honnalli:

Hi,

I am looking for solution to an issue of associating Manager information to the user profile, so that when i raise an ticket from Jira Service Desk portal, manager infomration populates auomatically in the ticket view screen and later i would like to use this information to update "Approvers" field in Jira.

Basically when an ticket is created, i want to send an approval email to manager whose information i want to fetch from Atlassian access, So, can you help me to know what all information i can fetch using "Jira Automation Cloud" from "Atlassian access".

Any help will be highly appreaciated.

Regards,

Vinod


Answers:
author: Fabian Lim
body: Hi [@Vinod Honnalli](/t5/user/viewprofilepage/user-id/3936853)

Looks like there is not much based on their documentation: <https://support.atlassian.com/jira-software-cloud/docs/smart-values-users/>

Regards
JIRA Automation doesnt get triggered when Deployment Status changes
Asked by Abrar Moiz:

I am trying to trigger an automation to add a comment when the deployment starts. The best approach for this was to trigger the automation when there is a change of deployment status to "In Progress".

This however doesnt seem to work -

![image.png](/t5/image/serverpage/image-id/106292iC6910F4E4236FBAA/image-size/large?v=v2&px=999 "image.png")


Answers:
author: tomas
body: Sorry [@Abrar Moiz](/t5/user/viewprofilepage/user-id/4031536) , at the moment we have no explicit support for deployment started.

I have raised a feature request for this functionality <https://codebarrel.atlassian.net/browse/AUT-2028>. Please add your use case to the ticket so it gives our developers more context how it will be used.
Automation Rule that retrieves and writes the linked issues to a Teams webhook
Asked by Garth:

Hello

We have begun to write automation rules in our Jira project.

The latest is for our Release team to notify our stakeholders that we have released and deployed a change that will resolve a linked issue in their project. This is triggered nicely by the transition to Done.

The notification is being written to Teams via a webhook created in a channel.

The notifications are working and we have worked out how to retrieve some of the issue details but cannot find how to retrieve the linked issues.

We currently are simply writing them to the comments field and publishing the last comment. This is obviously double handling and it also won't publish the URL nicely.

Can anyone help with the code needed to be placed in the automation rule to list the linked issues?

Thanks in advance


Answers:
author: Jenni J?rvinen
body: Any idea how to make list of these?  

So instead of printing ABC-1, ABC-2, ABC-3... etc it would print along the lines:  

ABC-1 - Summary - Link

ABC-2 - Summary - Link  

Would that be doable?

comments: author: Leo Nolivaiko
body: [@Jenni J?rvinen](/t5/user/viewprofilepage/user-id/1174725) I'm Looking for the same solution, tried many different approaches and could not make it work yet.


author: Ste Wright
body: Hi [@Garth](/t5/user/viewprofilepage/user-id/3120493)

Do you just want a list of the issueLinks for the trigger issue?

Have you tried:

```
{{issue.issuelinks.inwardIssue}}

{{issue.issuelinks.outwardIssue}}
```

These aren't limited to one key, just all related keys depending on the link direction

Ste

comments: author: Garth
body: Thanks [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470) - Ive made some more progress, thanks for the answer !


author: Garth
body: I have since found

```
{{issue.issuelinks.first.outwardIssue.key}}
which seems to help

If there are two how to I return the second?
Thanks
```

comments: author: Mark Chaimungkalanont
body: Hey there Garth,

You should be able to use a similar format as above to print out the links to all the issues. In the above example, issue.issuelinks is the list of issue links, .first only picks the first issue, so if you omit that, it will try to resolve all the links in the list.

So if you go:

```
{{issue.issuelinks.outwardIssue.key}} -> should output ABC-12, ABC-13
{{issue.issuelinks.outwardIssue.url}} -> should out put links to the above issue

```


Tags: issue-link

ms-teams

webhook
How to build a cron expression for 2nd last Friday
Asked by Neetu Verma:

Hi,

Can someone please help me to build Cron expression for 2nd Last Friday of each month.

I can't seem to to use 6L#2, it says the wrong expression


Answers:
author: Tom Williams
body: [@Neetu Verma](/t5/user/viewprofilepage/user-id/3565499) This site might help you out.

<http://www.cronmaker.com/>

comments: author: Neetu Verma
body: Thank you, I tried but 2nd last Friday is not even an option for cron builder :-) I have added 2 separate rules. Our build is always 2nd last Friday and it gets tricky with those months when we have 5 Fridays.

Thank you so much for helping out.

Thanks

Neetu


author: Curt Holley
body: Wouldn't it be something like the example here: <https://support.atlassian.com/jira-software-cloud/docs/construct-cron-expressions-for-a-filter-subscription/>

i.e.

0 15 20 ? \* 6L

For it to run at 8.15pm on the last Friday of the month

comments: author: Neetu Verma
body: This is for Last friday, I was looking for 2nd last friday


Tags: cron
sum logged hours on feature level
Asked by aya nayman:

hello

we have additional levels of hierarchy in our jira ,

project-\>feature-\>epic-\>story-\>sub task

and logged hourse for stories and sub tasks

is it possible to show the sum of looged hourse on project level ?


Answers:
author: Sam Harding
body: Hi,

Unfortunately this currently is not available, but is something we are looking at adding very soon. Once the work log field is available on lookup issues (see <https://support.atlassian.com/jira-software-cloud/docs/automation-actions/#Automationactions-Lookupissues> for the current list of available fields), then you will be able to do what you are wanting.

Cheers

comments: author: YY Brother
body: Has it been available now?


Tags: sum

worklog
Integrate with ms teams and slack
Asked by Joe B B:

How to integrate with ms teams and slack


Answers:
author: Avinash Bhagawati _Appfire_
body: Hi [@Joe B B](/t5/user/viewprofilepage/user-id/4037679) ,  

Welcome to Community !

You can integrate Automation for Jira with MS teams and slack channels for customized messages to send for any events.

<https://docs.automationforjira.com/knowledge-base/integrate-slack.html>

<https://docs.automationforjira.com/knowledge-base/integrate-ms-teams.html#markdown-support>

Thanks,

Avinash
How to create several tickets in Jira (Cloud) when Confluence page is created using ScriptRunner?
Asked by ilya-popkov:

Hi everyone! I need to create a several Jira tickets using information from Confluence page when Confluence page is created using ScriptRunner. The tricky part is that I'm using Cloud versions of Jira, Confluence and ScriptRunner which has limitations.

If you have any ideas or suggestions, please share

P.S. If you have better idea than using ScriptRunner, please share them too :)


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

Thank you for your question.

I can confirm that you can achieve this requirement using the **ScriptRunner for Confluence Cloud** add on by configuring a **Script Listener** which is configured to create Jira issues when a page is created inside of Confluence.

I can confirm that the documentation page located [here](https://scriptrunner-docs.connect.adaptavist.com/confluencecloud/script-listeners.html#_why_should_you_use_it) details a listener which we have built in that can be configured to create this requirement and may be something that you wish to look at to achieve your requirement.

I hope this information helps.

Regards,

Kristian


author: Yvan Martin
body: Hi [@ilya-popkov](/t5/user/viewprofilepage/user-id/4039413)  

Developer from Automation here,  

We do not currently support being able to trigger automation rules from Confluence at this time. This is something on our radar, but for the time being we don't have a roadmap or timeline at this stage.

We have a public ticket tracking this here: <https://codebarrel.atlassian.net/browse/AUT-269>

Cheers.


author: Curt Holley
body: Hi

If you are using Jira cloud you really should use Jira Automation for this. Much easier and built into Jira. Go to: Project setting/Automation and you should be able to work it out from there

comments: author: ilya-popkov
body: [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535)

I don't see any triggers for Jira/Confluence integration opportunities, except for Incoming webhook probably.

Could you elaborate a little?


author: Curt Holley
body: Sorry, I miss read your question (in haste) see [@Yvan Martin](/t5/user/viewprofilepage/user-id/3630079) answer.

Will be great when this is possible though!
Automation of Sub-tasks
Asked by Kelly Peck:

We currently have recurring tasks and have set these up as Sub-Tasks within Jira Software (server)

I am looking for the functionality that will automatically create a new Sub-Task once last months sub-task has been completed?

We currently have Automation for Jira server (within our DEV environment) but I cannot seem to get this to work for sub-task to sub-task.

It will create sub-tasks off parent issues but not at the subtask level.

Thank you for your help


Answers:
author: Ste Wright
body: Hi [@Kelly Peck](/t5/user/viewprofilepage/user-id/3681515)

It should be possible - I'm using Automation for Jira (Cloud), but the options are broadly the same. This is how I did it:

1. Create a new rule
2. For the Trigger, choose Issue Transitioned - and set appropriate statuses
3. Add a Condition, choose to check for the field Issue Type equalling Sub-task
4. For the Action, choose Clone Issue - setting it for same project / issue type. As part of cloning the issue, you can choose what fields will be set

\^ The action "Create Issue" didn't work here as you can't set the parent to be the trigger issue's parent - but clone utilises the trigger issue's parent and you can still decide what field values will be set like with create.

Let us know if this works for you in Server :)

Ste

comments: author: Kelly Peck
body: Thank you [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470)

This solution worked in Jira Server also.

Thank you I was going wrong with the Create Sub-Task, instead of clone

Appreciate your help

Kelly


author: Ste Wright
body: No worries :) - if this answer works for you, would you be able to press "Accept Answer" so other users know this is the right solution?

Ste


Tags: server
LookupIssue- Is there a way to have 2 result set in one email
Asked by Neetu Verma:

Hi,

I want to use LookIssues to send sprint scope or what is going to get released to my Ops team.

I was able to accomplish adding two JIRA queries to rule and it works.. but how do I segregate the result in my email

Here is my rule, what should I add in email so that the output of these two rules is separated

{{#lookupIssues}}  
\| {{url}} \| {{key}} \| {{status.name}} \| {{issuetype.name}} \| {{summary}}  
{{/}}

{{#lookupIssues}}  
\| {{url}} \| {{key}} \| {{status.name}} \| {{issuetype.name}} \| {{summary}}  
{{/}}

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


Answers:
author: Vincent Baticle
body: Yes I succeed to do it  

1)Create your first jql  
2)Record a new variable (with for exemple {{lookupIssues.size}} to have total number of issues  
3)Create a second Jql  
4)Record again a new variable  
5) etc.. repeat operation as needed  
6) use your variables in your email  

<br />

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


author: Sherry Goyal
body: Hello [@Neetu Verma](/t5/user/viewprofilepage/user-id/3565499)

Thanks for writing to us.

I am afraid thats now how "lookupIssues" works. Second JQL's output will override first JQL output in variable **{{lookupIssues}}**

Either

Go for two separate mails, meaning planing rule:  
*Trigger -\> JQL - 1 -\> Send email action -\> JQL - 2 -\> Send another email action*

This will shootout two separate emails.

OR

Convert it into one JQL, then you can send one combined email.

Hope this answers your query. Maybe you can share mode details around your use case, if you seek more assistance.

More details for [lookupIssues smart values](https://support.atlassian.com/jira-software-cloud/docs/automation-actions/#Automationactions-Lookupissues) and [article for help](https://community.atlassian.com/t5/Automation-articles/Send-a-list-of-issues-in-Slack-with-Jira-automation-s-newest/ba-p/1411819).

Cheers  
Sherry

comments: author: Neetu Verma
body: Thank you Sherry, I went for on email. I would like to use this to send all the JIRA tickets which were worked upon in one sprint.

Is there a way I can sort on using Issue types?

Thanks

Neetu


author: Sherry Goyal
body: [@Neetu Verma](/t5/user/viewprofilepage/user-id/3565499)

I would suggest to add sorting logic as part of JQL like:

```
project = ........? ?ORDER BY issuetype DESC
```

You can use ASC/DESC and output will probably depend on ordering of issue types in the scheme but default one will work just fine. You can try jql in jira search bar and check the order.

To know more on what all we functions we can do on list using smart values are mentioned [here](https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/).

Thanks  
Sherry
How to trigger an automation rule when Parent changes?
Asked by jake:

I want to edit a field when the Parent issue changes, specifically when I associate a Story to an Epic, or move a Story from one Epic to another.

Parent does not seem to be an option for "Fields to monitor" though help specifies that all fields and custom fields are available. Supposedly you can also match field names by regex, but I cannot figure out how to add a regex to this "Fields to monitor" field.

We are using a next-gen project on jira cloud here, if that makes a difference.


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

It is a little different in Next-Gen I've found.

For some reason, the rule does not activate when I change the Epic itself - it is not being counted as an issue update. I have to also update a field during the modification of the Epic - so I added an extra custom field which I modify after changing the Epic (although you could use any standard field too).

Here's how I did it:

1. Create a new field in all issue type(s) under an Epic - eg. a short-text field called "Automate"
2. Go to Project Settings \> Apps \> Project Automation and create a new rule
3. For the trigger, use - Issue Updated
4. Add a condition - Issue Fields Condition. Add the field Issue Type, the condition "does not Equal" and value Epic. This ensures the rule doesn't run when you update Epics.
5. Add the Action - Edit Issue - choose the field you wish to replicate. To change this to copy from the Epic, select the 3-dots icon next to the field and choose "copy from" - choosing "Copy from Epic"
6. Publish the rule

With the extra step of modifying my "Automate" field, it seems to work :)

Ste

comments: author: jake
body: Unfortunately this automation is only updating a single field, and it can keep the field in sync between an Epic and its children after it's initially set (because as you say, the Parent change is the only edit that seems to not be considered an issue update).

Because it's just one field, creating another field that we'd have to edit afterward as a means of kicking off automation isn't very helpful, we can just set our single field manually the first time instead.

I was hoping for some other way to identify modifications to the Parent. Oh well, thank you for the suggestion!
Send Slack message sends too many messages that are the same
Asked by y.perfilov:

Hi there!

I've noticed that there might be a problem (it may be on my end but I've dicided to start from asking the community): the send Slack message action sends as many messages as there are tasks have been found by JQL.   

My aim is to show a list of tasks that are in a status for more than two days.

The automation I've made:

![chrome_KEdYt14k0x.png](https://community.atlassian.com/t5/image/serverpage/image-id/104902i02D043F100CE3A18/image-dimensions/188x253?v=v2 "chrome_KEdYt14k0x.png")

JQL finds 19 issues. So, the goal is to send **one** message to Slack with a list of these issues. Instead, I'm recieving **19** messages to Slack that are the same: there is a list and a custom text.  

Is there a way of making Jira automation to send **one** message to Slack? The automation used to work a week ago. It was sending only **one** message with a list.  

I've tried doing the thing via the condition (if/if/else) as well to no avail...  


Answers:
author: Sam Harding
body: Hi,

The reason this is happening is due to the trigger configuration. The scheduled trigger is using JQL to find issues which match that criteria (project = SH and status = "In review" etc). For every issue that this JQL finds, it will execute the rule, so therefore when it finds 19 issues which match this criteria, it executes this rule 19 times (hence the 19 slack messages). Given you are using lookup Issues to find the issues you are wanting to send to slack anyway, you can simply remove this JQL from the Scheduled trigger (deselecting the 'Run a JQL search and execute.....' option), and the rule should behave as you are wanting.

Let us know if this works for you or if you have any further issues.

Cheers!

comments: author: y.perfilov
body: Thank you! Silly me :D


Tags: slack
I'd like to know what the smart value for a user that has triggered a rule is.
Asked by Daniel Di Martino:

I'm currently using Automation For Jira on Jira Data Center v8.5.4.

When a manually triggered rule is triggered I'd like to set the user that triggered the rule as the reporter of the issue that is being created by the rule. A4J provides "User who triggered the event" in the assignee field although it isn't listed for the reporter. Is there a smart value I can use?


Answers:
author: Ste Wright
body: Hi [@Daniel Di Martino](/t5/user/viewprofilepage/user-id/372428)

Try: **{{initiator.name}}**

Ste

comments: author: Daniel Di Martino
body: Thanks Ste....Know why \[\~**{{initiator.name}}\] doesn't work when written within a comment?**


author: Ste Wright
body: Hi [@Daniel Di Martino](/t5/user/viewprofilepage/user-id/372428)

It works for me - I tested it in Cloud where I used **{{initiator.displayName}}** but it comes up as expected.

I did have to use a branch to make it trigger against the created issue (related issue = most recently created issue), or it would trigger against the issue I manually triggered from.

Ste
Profields automation of date fields with now value
Asked by Alexander Raymukanov:

I try to make new automation (with automation for jira) with action to set custom Profields field "project start date" from now() value when project created.

But in value I can set only some real date or clear value. And I dont understand how to set now(). Maybe there is some workaround , please advise.

![Profields-automation.png](/t5/image/serverpage/image-id/104602iE8A8539E1B829B4D/image-size/large?v=v2&px=999 "Profields-automation.png")


Answers:
author: Fede Baronti -Deiser-
body: Hi [@Alexander Raymukanov](/t5/user/viewprofilepage/user-id/2784592) ,

I'm Federico Baronti from DEISER's Customer Support. Thank you very much for raising this question in the Atlassian Community and thanks for using Profields with Automation as it is one of our most important integrations at the moment.

Unfortunately, this integration does not provide this kind of value set at the moment. Our customers have asked us to add this because it is an important setting to add and, because of that, we have added it to our Public and Collaborative backlog: <https://community.deiser.com/browse/BPROFIELDS-202> Here you will be able to up-vote this improvement (this will show how interested our customers are about this), share it with other colleagues and even comment on it. Hope you do.

Also, please, keep in mind that, in case you have any further concerns, our customer support portal is available for you, and we will be able to answer your queries in a timely manner. You can do so right here: <https://jira.deiser.com/plugins/servlet/desk/portal/1>

Hope this answers your question.

Thanks so much and all the best,

Fede.


author: sreuter
body: [@Alexander Raymukanov](/t5/user/viewprofilepage/user-id/2784592) Here's some general info on how to use the current date / time via a smart value in Automation. <https://support.atlassian.com/jira-software-cloud/docs/smart-values-date-and-time-functions/>


Tags: addon-com.deiser.jira.profields
Unable to update test case status in jira when integrated jenkins with jira using xray plugin
Asked by Ankita Verma:

I am doing jira jenkins integration using jenkins for robot framework aitomation with the help of xray plugin.

Here my I am able to execute the test case status in Jira when I have one test case in jira tagged to an automated test case.

But when I have multiple test cases in jira tagged to single test case in automation script(here robot framework), then the test case in jira associated with first tag which is present in script is getting passed while other test cases which are tagged to the same test case in automation scripts are not getting updated in jira.

Is it the expected behaviour that if one test case is mapped to multiple test cases in jira fot robot framework, then only one test case status will get updated and not other's


Answers:
author: Sergio Freire - Xblend
body: Hi [@Ankita Verma](/t5/user/viewprofilepage/user-id/1822830)

In this particular case, you'll need to provide more information to help us understand the case scenario. I recommend opening a ticket at our [Service Desk](https://jira.xpand-it.com/servicedesk/customer/portal/2) and our support team will be glad to help you out.

Best Regards,

S?rgio Freire, Solution Architect and Testing Advocate [@Xray](https://www.getxray.app/)

Personal blog on testing, Agile and software development: [https://sergiofreire.com](https://sergiofreire.com/)

Follow me on Twitter: [**https://twitter.com/darktelecom**](https://twitter.com/darktelecom)


author: Ankita Verma
body: Can anyone please update


Tags: jira