youngmon/atlassian-qna huggingface dataset:
Can I test a project automation rule?
Asked by Ine Nieuwenhuijzen:

Dear Sir/Madam,

I am creating a lot of automation rules with emails and comments that have been send out and I was wondering if and how I can test these automation rules before using them? I have found <https://support.atlassian.com/cloud-automation/docs/test-a-jira-automation-rule-using-the-manual-trigger/> but in my project automation rules I cannot see **Rule executions** . Can you only test the automation rule if you selected **Manual** when creating the rule?

Thank you in advanced,


Answers:
author: Mykenna Cepek
body: Rule executions for each rule are listed in the Audit Log, available for each rule, in the area where you create and edit rules:

<https://YourDomain.atlassian.net/jira/settings/automation>

The "Audit Log" area lists every recent execution (subject to quantity/expiration time limtations that I don't recall at the moment).

Access them for a give rule here:

![Screen Shot 2022-03-14 at 10.04.50 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/188027iB5B72D4BB17F769B/image-size/large?v=v2&px=999 "Screen Shot 2022-03-14 at 10.04.50 AM.png")

Also, I like to test rules in a sample project before "going live" with a new rule. I have a specific "Playground" project in our Jira Instance which is available for this kind of use.

As for testing things like emails sent by a rule, you'll just have to review the Audit Log to see if the Send Email action succeeded. During testing, I ensure emails go to me (either by hardwiring the action, or setting things appropriately in Jira e.g. me as the assignee of a test issue).

Also, when testing and debugging a rule, remember that the "Log action" component is your friend! You can sprinkle those in a rule to see what's going on (e.g. to see the content of variables or smart values).


author: Dirk Ronsmans
body: Hi [@Ine Nieuwenhuijzen](/t5/user/viewprofilepage/user-id/4812209) and welcome to the community!

You should always be able to see the "Rule Executions" menu in the right side bar.

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

If no rules are defined with a Manual trigger you simply won't be able to select a rule to execute.

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

Once you set the rule trigger on "Manual" you can then go to an issue and test the rule against that issue. (unless it's a rule that uses a JQL/IQL as data then you can just trigger it from there).

The testing itself is not triggered from the rules menu but from the rule executions within an issue.


Tags: cloud
REST API for Jira Cloud Insight
Asked by Sergei Gridnevskii:

I could not find any information whether REST API is available for Insight cloud.

I need to add comments to Insight object from Automation for Jira. The reason for that is that I need to link Jira ticket and Insight object so that it will be possible to find out who created Insight object and why.


Answers:
author: Mark Segall
body: Hi [@Sergei Gridnevskii](/t5/user/viewprofilepage/user-id/2154163) - Here's the documentation for the Insight API

<https://developer.atlassian.com/cloud/insight/rest/api-group-icon/#api-icon-id-get>

Though I don't see anything related to comments which could mean that's not available through API.

Given your use case, an option could be that you have a specific project for Insight change management. When a new object is created, you could have an automation rule triggered off of the object create with some steps like this:

1. Give the object a status of something like "Pending approval"
2. Generate an issue on your new project that would be used for tracking the commentary around the new object

This would enable you to have a link on that object to a specific issue that retains all of the justification for creation of that object. Once the issue is resolved, you can have another rule update the object:

1. If resolution = \<some indicator that it was approved\> change the status to something like "Active"
2. If resolution = \<some indicator that it was rejected\> delete the object

Hope this helps.

comments: author: Sergei Gridnevskii
body: Thanks, Mark


Tags: cloud

insight
Use math expression in date smart value to set due date
Asked by systems-intern:

Hello,

i have to set a due date with an automation for jira automation on jira datacenter. The due date should be the last day of the current quarter and i thought i could do something like this:

{{now.withmonthOfYear({{now.format("Q").multiply(3)}}).endOfMonth}} or

{{now.withmonthOfYear({{#=}}{{now.format("Q")}} \* 3{{/}}).endOfMonth}}

but its not working. Is there a way to achieve this?

the .multiply thing doesnt seem to do anything at all, but the expression

{{now.format("Q")}} \* 3{{/}}

does give back the numer 3 i would need, but if i use that in the due date field i cant even save the automation.


Answers:
author: systems-intern
body: [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)Hello,

the datacenter version doesnt have the variable functionality. I was able to save the rule with the asNumber part, but it again didnt work. The due date fields just stays empty. I was able to do it with a scriptrunner script...but it feels like overkill :(


author: Bill Sheboy
body: Hi [@systems-intern](/t5/user/viewprofilepage/user-id/1266406)

You might need to convert the result of the format() operation to a number for the math to work, or store it in a created variable and then use it. To do it the first way, please try:

{{now.withMonthOfYear(now.format("Q").asNumber.multiply(3)).endOfMonth.jiraDate}}

Kind regards,  
Bill

comments: author: Bill Sheboy
body: Hi [@systems-intern](/t5/user/viewprofilepage/user-id/1266406)

Please try to keep your responses to one thread of conversation. That will help others see if there are multiple approaches to solve the problem. Thanks!

And thanks for noting you are using the Server/Datacenter version. Please try to include that information when posting questions as the different Jira versions have different behaviors.

The smart value expression I provided will return the correct value. To use that to set the Due Date field try removing the last part which specifies the data format:

{{now.withMonthOfYear(now.format("Q").asNumber.multiply(3)).endOfMonth}}

If that still does not help, please post images of your complete automation rule and of the audit log details showing an execution of the rule which does not work. Those images may provide more context for what is happening.


Tags: jira-data-center
Automation best practices, collaborators, articles, use cases
Asked by Patrick Howell:

Hey everyone! We're interested in **aggregating some helpful content** here from the Atlassian Community for our next issue with the Jira Brunch (jirabrunch.trundl.com).

The focus is on **Automation in the world of Jira** , so if you've got good content (videos, articles, cases) and want free exposure (and backlinks), please share here or write me at [patrick@trundl.com](mailto:patrick@trundl.com)

Cheers!


Answers:
author: Bill Sheboy
body: Hi [@Patrick Howell](/t5/user/viewprofilepage/user-id/4055384)

I am curious: what is the purpose of creating a parallel community/newsletter/etc. on Jira automation separate from this group?

Kind regards,  
Bill


Tags: cloud
How to automate closing the sub-tasks when a parent task is complete.
Asked by Dan Billingham:

Hi All,

I appreciate the wider issue about why someone would not complete sub-tasks before completing the parent task. But I was wondering if automation could sort this. Have tried a few different automations below but when testing it does not seem to work.

Any help would be appreciated.

![Automation example .jpg](/t5/image/serverpage/image-id/187203i7E38C96576592826/image-size/large?v=v2&px=999 "Automation example .jpg")


Answers:
author: Mohamed Benziane
body: Hi [@Dan Billingham](/t5/user/viewprofilepage/user-id/4730275)

Try with the condition "Issue fields condition" intead of subtask present

![2022-03-09 16_09_40-Automation - The Jira of Champions.png](https://community.atlassian.com/t5/image/serverpage/image-id/187205iB76BDB979255B962/image-size/large?v=v2&px=999 "2022-03-09 16_09_40-Automation - The Jira of Champions.png")

comments: author: Dan Billingham
body: Thank you Mohamed,

This works now, much appreciated!


author: Thembisa Ndlamlenze
body: Hi Mohamed

I've used the exact same automation suggested but I get this error. What am I missing?

![Screenshot 2023-02-07 140644.png](https://community.atlassian.com/t5/image/serverpage/image-id/238625iC219E6F4389A58C5/image-size/large?v=v2&px=999 "Screenshot 2023-02-07 140644.png")


author: Natasja Eloff
body: Hi, Thembisa,  
Maybe have a look at your workflow.  
Can you transition to close/done from any status?


author: Thembisa Ndlamlenze
body: Hi Natasja

Only 3 statuses transition to done, will this work only if all statuses can transition to done?


author: Natasja Eloff
body: Hi Tembisa,.

Yes, it would be best, then the sub-task can be closed/done from any status.


Tags: cloud
Move Issues after PR Merge using Jira Automation
Asked by Jordi Zmiani:

Hi, im trying to set up an automation rule that transitions issues from **In Progress** to **Done.**I created a simple Automation:

![Bildschirmfoto 2022-03-09 um 13.35.30.png](https://community.atlassian.com/t5/image/serverpage/image-id/187165i2D5BD287D7DD9F9A/image-size/large?v=v2&px=999 "Bildschirmfoto 2022-03-09 um 13.35.30.png")

Sadly after PR merge my automation is not triggered. Furthermore i edited my automation so that the automation triggers after a commit, just to see if the rule works. Surprisingly **When: Commit created** works.

Im using **Git Integration for Jira Cloud** as App. I've connected my Github rep using the **Git** Option.

![Bildschirmfoto 2022-03-09 um 13.28.22.png](https://community.atlassian.com/t5/image/serverpage/image-id/187162iD7B720AF8D9C689E/image-size/large?v=v2&px=999 "Bildschirmfoto 2022-03-09 um 13.28.22.png")

![Bildschirmfoto 2022-03-09 um 13.26.47.png](https://community.atlassian.com/t5/image/serverpage/image-id/187161i44411963A081F67E/image-size/large?v=v2&px=999 "Bildschirmfoto 2022-03-09 um 13.26.47.png")

Now in the **Git Commit** section in my Jira Project im able to see all the commits, pull request and PR merges. Since i added the issue tag to every commit, every thing should be technically linked to the issue. Something i do notice, is that every commit is displayed in **Atlassian/Jira Acc name,** but the pull merges are displayed in **Git Acc name.** Why?

![Bildschirmfoto 2022-03-09 um 13.31.16.png](https://community.atlassian.com/t5/image/serverpage/image-id/187163i8C9AEF9AFF10B078/image-size/large?v=v2&px=999 "Bildschirmfoto 2022-03-09 um 13.31.16.png")


Answers:
author: Stefan Salzl
body: Hi [@Jordi Zmiani](/t5/user/viewprofilepage/user-id/4799655) and welcome to the community,

first of all tbh: I have no experience with the used app. I use **Github for Jira**from Marketplace. I tested with my integration and with Github for Jira the rule is triggered on mergePR.

Did you do a fast-forward merge? The ff doesn?t create a merge commit and I could imagen that this might be the event (technically) jira is listening.

Best  
Stefan

comments: author: Jordi Zmiani
body: I simply went ahead and tested **Github for Jira**, it worked like a charm. Thanks.


author: Stefan Salzl
body: Awesome. Good to know it works now ??


author: Kate Spilker
body: [@Stefan Salzl](/t5/user/viewprofilepage/user-id/4616993) Are you saying it can't be a fast forward merge to work?


Tags: jira-cloud
Advanced date compare to get current half year
Asked by systems-intern:

Hello,

i need to write an automation for an internal control system that opens control tickets with different frequencies. For this purpose, it reads the stored frequency from a customfield of a control datasheet ticket. The options are daily, weekly, monthly, etc.. Now I have to open a control activity issue, which contains, depending on the frequency, the day, the week, the quarter or the information whether one is in the 1st or 2nd half of the year in the ticket summary. Unfortunately, it seems there is no easy way to get the half-year. Therefore I used if else functions, which compare {{now}} with the date 01.07 and if the date is before 01.07 1st half year is used and starting from the 01.07 the 2nd half year. Currently I use: {{now.compareTo(now.withMonth(7).withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0).withMillis(0))}}  
Is there possibly an easier way here? Except to build own automations for both half year options, which run on 01.01 or 01.12.


Answers:
author: Stefan Salzl
body: Hi [@systems-intern](/t5/user/viewprofilepage/user-id/1266406) ,

for deeper understanding and analyze please consider to also provide further information in the form of screenshots of eg. issues, current automation rule,...

From what you wrote at the end (the compare date regard 1st or 2nd half of the year):

would the following solve that in an easier fashion:

```
{{[date1].isBefore([date2])}}
```

see also:  
<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#-->

or did i get something wrong?

Best  
Stefan

comments: author: Mark Chaimungkalanont
body: You can get the number of month by doing something like:

```
{{now.monthOfYear}}

So you can do something like

{{#if(now.monthOfYear.gt(6))}} Second half of year {{/}}
```


author: systems-intern
body: correction of the last sentence: i meant 01.01 and 01.07 :)


Tags: data-center
Notification when the number of tasks in the status is exceeded
Asked by Evgeniy S_:

Dear community, help with notification. If the question has already been asked, I'm sorry, I couldn't find it.

A task:

If there are more than 5 tasks in the status, then send a notification.

I tried to do it in such a way as in the screenshots, but in such cases the notification always comes when the status changes.

What am I doing wrong?  
Thank you very much in advance

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


Answers:
author: Stefan Salzl
body: Hi [@Evgeniy S_](/t5/user/viewprofilepage/user-id/4640938) ,

the used **advanced compare condition** is not designed to add a JQL as compare value.

What comes to my mind would be to add a lookupissues action and compare the size of the result.

Hope this helps.

Best  
Stefan

comments: author: Evgeniy S_
body: [@Stefan Salzl](/t5/user/viewprofilepage/user-id/4616993)

Thanks, I was able to solve the problem through lookupissues.?


Tags: notification
How can I make an issue opened in a specific group to be assigned to a specific person ?
Asked by pier B:

Hi,

We are starting to use service project to get feedbacks / support question and bug report for our in house application.

We created "groups" and we'd like to use these different groups to auto assign raised issues to specific people, any way to achieve this ?

I tried Automation from our service project but I could not find anything related to groups.

Thanks


Answers:
author: Bill Sheboy
body: Hi [@pier B](/t5/user/viewprofilepage/user-id/4382659)

I am a bit confused...Your use case seems to be asking two contradictory things for auto assignment: to people in a group AND to specific people.

If you meant auto assign to people in a Jira Group (or other defined list) there are a several options to do that with an automation rule. Please look here for more information on that method: <https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Assign-issue>

Kind regards,  
Bill

comments: author: pier B
body: Hi [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) ,

I was talking about service project's portal groups, but I was able to achieve my goal by using automation rules based on the "request type" filter.


author: Nic Brough -Adaptavist-
body: How have you created these "groups" and what do your people put into a new issue that determines which group it should be part of?

comments: author: pier B
body: Question already answered see above edit + answer.

Thanks


Tags: cloud
Automatic status change for tests in X-ray
Asked by Manju Nair:

Hi,

In Jira, while using X-ray app, I created the following items in the board:

1. Story 1--\> Test Set 1--\>Test Case1 . All these have link type set as "tests" for Story 1
2. Story 2--\> Test Set 2--\>Test Case2 . All these have link type set as "tests" for Story 2
3. I wrote a automation rule as(Screenshot) , when story is transitioned to Done, all the test case, and test set should transition to Done automatically
4. The issue is , when I moved Story 1 to Done, the testset2 and tesetcase2 is also moving to Done.

Please help to write an automation rule to set the status as "Done" for the specific story that I selected to transition to Done. Here for eg: when I transition Story 1 to "Done", move **only**Test Set 1 and Test Case 1 to Done.

Regards


Answers:
author: Stefan Salzl
body: HI [@Manju Nair](/t5/user/viewprofilepage/user-id/4688516) and welcome to the community,

Could please also provide the screenshot of the rule and if possible also from the story with the linked issues?

Best  
Stefan

comments: author: Manju Nair
body: ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/186359i8EC4C992151ED602/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/186360i602FAE452264C153/image-size/large?v=v2&px=999 "image.png")


author: Stefan Salzl
body: As far as I got your requirement right this rule I tested in my system does the job:

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

Looking forward to your feedback.

Best  
Stefan


author: Manju Nair
body: Thank you so much. This correctly worked for the requirement.


author: Stefan Salzl
body: AWESOME!!! Happy it works ??

Thanks for the great description of your use case. This was very helpful ?

Happy testing!
Verification emails not received
Asked by udhayakumar sadagopan:

Hello,

I'm not receiving verification email when I tried two-step verification, could you please kindly take a look.

Thanks

Udhay


Answers:
author: Patrik S
body: Hello [@udhayakumar sadagopan](/t5/user/viewprofilepage/user-id/5452383) ,

As correctly stated by [@Nikola Perisic](/t5/user/viewprofilepage/user-id/5166624), your email was in an internal suppression list because Atlassian received the following error from your email provider :

```
554 5.7.1 [internal] recipient address was suppressed due to customer policy
```

I went ahead and removed your email from the suppression list, so you should be good at receiving new emails now.

Could you please check again and let us know if you are receiving it now?

Patrik S

comments: author: udhayakumar sadagopan
body: Thanks its working now!


author: Nikola Perisic
body: Welcome to the community [@udhayakumar sadagopan](/t5/user/viewprofilepage/user-id/5452383) !

This is because your email address was put on suppression list on the Atlassian side. This is most likely to prevent spam.

In order to resolve this issue, raise a support ticket and ask Atlassian to remove your address from the suppression list.

You can raise it here: <https://support.atlassian.com/contact/#/>


author: Hassen Hammeche
body: Hello,  

I have the same issue I never received the verification email   

Can you help me?

comments: author: Theodora Boudale
body: Hi Hassen,

Your email address was in our suppression list, so I removed it. Please follow the process of setting up 2FA one more time so that a new email gets sent.

If you need further assistance, please create a new question in community via <https://community.atlassian.com/t5/forums/postpage/board-id/bitbucket-questions>, instead of replying to other users' questions. A question may become convoluted if we try to address multiple users' issues in it, and notifications are also sent to the original poster and any other subscribers for every single reply (that may not be relevant to them).

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Jira Automation: Auto-assign
Asked by Mark Saluta:

We have a few custom fields:

1. Dev Resource
2. Reviewer

During Planning, we assign developers and reviewers to tickets in those fields.

When an issue moves from To Do to In Progress, I would like the automation to put the value contained in Dev Resource into the Assignee field, and the same for the Reviewer.

Starting out, I've got:

**When: Issue transitioned FROM To Do TO In Progress**

**Then: Edit issue fields Assignee**

Unfortunately, I have lists of users, Copy from parent/child options, but no way to actually map the Dev Resource field to the Assignee, same for Reviewer. Am I missing a step? I'd also like to do the reverse. If something goes back from Review to In Progress, it should be assigned back to whoever was the Dev resource.


Answers:
author: Mykenna Cepek
body: Configuring the Edit Issue action like this should do what you need:

![Screen Shot 2022-03-07 at 1.08.18 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/186786iEA0B7D0278EC1E2C/image-size/large?v=v2&px=999 "Screen Shot 2022-03-07 at 1.08.18 PM.png")

comments: author: Mark Saluta
body: Thank you for the reply, that worked great for assigning the developer to the Assignee, however, when I attempt to do the reviewer, I'm only able to see the following fields from which to copy from, and do not see a Reviewer field listed:

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


author: Mark Saluta
body: I may have discovered the issue. The other fields are all of the Type **User Picker (single user)** . When Reviewer was set up, it was set as **User Picker (multiple users)**. Which I would imagine would not be a valid Type for something like Assignee, which can only have one user. Now I'm trying to figure out how to change it to single user.


author: Darryl Lee
body: If there is already data in your existing Reviewer field, you'd probably want to:

* Rename the field something like **MultiReviewers**
* Create a new field called **Reviewer**
* Bulk copy values from **MultiReviewers** fields to **Reviewer**   
  (Hopefully nobody chose multiple reviewers?)  
  (Details in post after this on using CSV export/import.)
* Delete **MultiReviewers** field.

If there is \*not\* data in the existing Reviewer field, you have to delete it and then recreate it.


author: Darryl Lee
body: Oh right, the easiest way to copy from one field to another is probably export to and import from CSV:

<https://community.atlassian.com/t5/Jira-questions/What-s-the-easiest-way-to-batch-copy-one-field-value-into/qaq-p/1653966>

<https://support.atlassian.com/jira-cloud-administration/docs/import-data-from-a-csv-file/>