youngmon/atlassian-qna huggingface dataset:
Trying to set a field based on the Assignee
Asked by Brian Taylor:

I have a use case if the assignee is updated. It will update a custom field to a specific value. However, the automation that I have created does not fail or update the value.

![Screenshot 2023-11-28 at 3.35.58?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/294252iD9D85D98BD84815C/image-size/large?v=v2&px=999 "Screenshot 2023-11-28 at 3.35.58?PM.png")

Note: I have a similar automation that has the assign and value set on creation and it works with no issues.


Answers:
author: Bill Sheboy
body: Hi [@Brian Taylor](/t5/user/viewprofilepage/user-id/594677)

There is a specific trigger to detect when an issue is assigned: <https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Issue-assigned>

Please try using that one instead of Issue Updated.

Kind regards,  
Bill

comments: author: Brian Taylor
body: Bill Sheboy -

That worked using the Issue Assigned instead of Issue Updated.![Screenshot 2023-11-29 at 7.58.25?AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/294404i639D6CB99B554D0D/image-size/large?v=v2&px=999 "Screenshot 2023-11-29 at 7.58.25?AM.png")
Automatically add Confluence page link in Jira ticket based on a Custom field
Asked by Theersa Konakala:

Hi,

I want to add a Confluence Page link to my Jira ticket automatically based on a custom field value, for example we have a field called Type and it has a value "Activity", when ever the user selects the Activity as a type then a weblink of confluence should added in that ticket. I have tried to create a automation rule, but no luck.

can you please help me with this automation rule.

Thanks


Answers:
author: Theersa Konakala
body: Hi [@Antuan Sammak](/t5/user/viewprofilepage/user-id/5365045)

I want to link a existing Confluence page. If it is a creating a new page then rule will creates a new page for each ticket right

comments: author: Antuan Sammak
body: Hi [@Theersa Konakala](/t5/user/viewprofilepage/user-id/4849878)

Looks like this function isnt possible at the moment, workaround is to add a comment with Confluence page link.

Please check this post for more details, it has a ticket in the backlog of Atlassian for the same.


author: Antuan Sammak
body: Hi [@Theersa Konakala](/t5/user/viewprofilepage/user-id/4849878)

are you trying to link an existing Confluence page or create a new one?

it would be nice to know if there is a way to link existing page, what i know is that you can create a new Confluence page and have it linked using automation.
How can I group lookupIssues results by component, and take the size of the largest group?
Asked by Aidan Follestad:

The main objective is that I want to sum points for tickets in an epic, and assign that to the epic Story Points field.

*However* , my project uses components to separate tickets by platform... I want to take the sum of the platform that has the *most*overall points, and assign that to the epic.

Basically, I want to use lookupIssues, group the results by component, and use \`MAX()\` to get the largest sum. But the aggregation part has proven difficult to figure out!


Answers:
author: Tim C
body: Hi [@Aidan Follestad](/t5/user/viewprofilepage/user-id/5373613)

Welcome to the Atlassian community.

I don't know how many components you've got - but here's one potential approach if it's a manageable number ...

**Do a lookup using JQL for the data sets for each of your components and create a smart variable for each total of story points - e.g. ....**

*Lookup issues based on JQL #1 ...*   
*"project = XYZ and component = ABC and "story points" is not empty"*   
*+ Create variable LUA = {{lookupIssues.story points.sum}}*

*Lookup issues based on JQL #2 ...*   
*"project = XYZ and component = DEF and "story points" is not empty"*   
*+ Create variable LUB = {{lookupIssues.story points.sum}}*

*Lookup issues based on JQL #3 ...*   
*"project = XYZ and component = GHI and "story points" is not empty"*   
*+ Create variable LUC = {{lookupIssues.story points.sum}}*

**You can then find the maximum from each of the smart value variables ...**

*create variable MyMAX = max(LUA, LUB, LUC)*

Then you'd edit the Story points value for the required Epic and add the MyMAX variable.

Obviously, someone else may have a smarter solution - but hopefully this helps.

Thanks,

Tim C

comments: author: Aidan Follestad
body: That does indeed work, thanks [@Tim C](/t5/user/viewprofilepage/user-id/4438063)

I do wish there was a more "future proof" way to do it so it doesn't have to be maintained quite as closely if new components were added or something. ?


author: Bill Sheboy
body: Hi [@Aidan Follestad](/t5/user/viewprofilepage/user-id/5373613) -- Welcome to the Atlassian Community!

Have you considered having different epics (and so with different component values) for each platform? That would eliminate the need to determine the maximum sizing / sum by platform.

Without knowing your Jira version (Cloud, Server, or Data Center) I wonder if you could relate the platform-scope items with other issues using the hierarchy or linkages. For example with Jira Cloud, using Ideas in Jira Product Discovery (JPD) to span them.

If not...

A variation of the approach suggested by Tim is to use a single call to Lookup Issues to gather the stories, and then use smart value, list filtering to build a Lookup Table, with one row for each component possible. The only maintenance would be to add / remove rows from the table when components change. The rule itself would only be a few steps (5-6). If you are interested in learning more about that approach, please let me know.

Kind regards,  
Bill
Space admin unable to remove content restriction
Asked by KC Wong:

Here's the situation:

1. I have spaces migrated from Confluence Server to Cloud using migration assistant.
2. In a space I have some restricted pages.
3. I gave my account all space permissions for the space.
4. I look at Space settings \| Manage content \| Restricted.
5. I see a list of pages with restrictions.
6. Each one has a pad-lock icon that says "Remove restrictions".
7. If I click on them, the page is opened and says I have no permission.

Questions:

1. How do I get access to the pages? I am already the space's admin.
2. What if I don't want to remove the restrictions? How do I edit them.


Answers:
author: Tanya Christensen
body: While viewing the Restricted pages listing, try to use the 'open page in another tab' (middle mouse/wheel) option for all the locks associated with the restricted page. Once all the locks are removed the page will be visible.
how to retrieve bitbucket build/deployment/repository tag name in Jira automation setup
Asked by kenan xin:

on smart values documentation page [Jira smart values - development \| Cloud automation Cloud \| Atlassian Support :](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/)

{{build.refs}} returns the refs of the build, e.g. \[feature/ISSUE-123-some-work, feature/ISSUE-456-more-work\]. This is a list of metadata that can be associated with a build. It may contain, for example, branches and tags names.  
This value is optional and may be an empty list.

**how do i retrieve the tags names / repository tags of the build from {{build.refs}} ?**

We are using tags as a trigger for deployments of a mono repo. For examples,

tag1: app1_1.1.2_dev

tag2: app2_1.1.2_dev

so tagging a commit in bitbucket with the tag **app1_1.1.2_dev** will trigger a deployment of**app1** to **dev** environment.

Now, what we want to do is to setup an automation to automatically transit a ticket if

1. the ticket is for **app1**

2. the deployment build is tagged with **app1_xxxxxx**

**![Screenshot 2023-11-26 012313.png](https://community.atlassian.com/t5/image/serverpage/image-id/293667i3E35202E76160CEC/image-size/large?v=v2&px=999 "Screenshot 2023-11-26 012313.png")**

**how do i retrieve the tags names / repository tags of the build from the deployment's {{build.refs}} ?**


Answers:
author: Bill Sheboy
body: Hi [@kenan xin](/t5/user/viewprofilepage/user-id/5371649) -- Welcome to the Atlassian Community!

I have not tried that with this smart value, so please experiment to learn if this helps:

The {{build}} smart value is only available with the built-related triggers: Build Successful, Build Failed, or Build Status Changed. And so the rule will need to use one of those.

Next, I recommend writing {{build.refs}} to the audit log when your rule triggers. That will show what is in the attribute, and then guide you on what can be parsed out, with list or text functions.

Kind regards,  
Bill

comments: author: kenan xin
body: thank you [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) , let me try and update here


author: kenan xin
body: the value of {{build.refs}} smart value is empty when printing out the value in log after a deployment, any ideas?
JIRA AUTOMATION: issue.description.match to update multi select combo box field
Asked by Steven Copp:

i am trying to basically take an output from a power automate email - that creates an issue and inputs the template into the description of the jira issue.   

im then trying to use a smart value to fill that field with the required selections.

it currently works for single selections. however once there are multiple selections for the combo box to accept it no longer works.   

i have tried bringing it in as an array, \[ "xxx","xxx" \] tried having the jira automation engine transfer it into an array using issue.description.split and also issue.description.match into a split function.

none of which work, is there a simpler option? how can i structure my text to be correct for the automation engine to accept it into multiple selections into the combo box?  

please help.


Answers:
author: Bill Sheboy
body: Hi [@Steven Copp](/t5/user/viewprofilepage/user-id/5371022) -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Until we see those...

Are you trying to populate a multiple-select, custom field from the text found in the Description field, using text functions to get the selection values?

If so, in addition to the details of what you have tried in your rule, please post examples of your Description field. That will help compare the input to your parsing attempts.

Kind regards,  
Bill
Automation Rule Failing
Asked by Devin Holland:

Can anyone help me understand why the second condition is failing when it's basically written the same as my first condition?

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


Answers:
author: Tim Kopperud
body: Hi [@Devin Holland](/t5/user/viewprofilepage/user-id/5366605), I think the rule can be simplified. You might try something like this:

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

With the JQL

```
(created > startOfDay() and created < startOfDay("8h")) OR (created > endOfDay("-8") and created < endOfDay())
```

TimK.

comments: author: Tim Kopperud
body: Hi [@Devin Holland](/t5/user/viewprofilepage/user-id/5366605), thanks for accepting the answer. I'm really glad the suggestion helped.

TimK.


author: Bill Sheboy
body: Hi [@Devin Holland](/t5/user/viewprofilepage/user-id/5366605) -- Welcome to the Atlassian Community!

When performing date/time comparisons in automation rules using conditions, please check if the typing supports your intent.

Specifically, using things like longTime lead to a text expression. And so the compare no longer has the benefits of a date/time type to help. Will the converted text values correctly align with the clock time values you expect in the compare, with leading zeros and date components ordered as needed?

Kind regards,  
Bill


author: Darryl Lee
body: Hi [@Devin Holland](/t5/user/viewprofilepage/user-id/5366605) --

I think you're trying to catch tickets created between 5PM and 8AM CST?

So I believe the problem is that you didn't account for midnight.

That is, let's say a ticket was created at 6AM. That is definitely less than (before) 8AM.

But is it greater than (after) 5PM?

In our heads, yes. But according to the computer, no.

So I think what you really need is an **OR** operator for your comparisons.

At first I didn't think this was possible, but I played around with the **IF, ELSE: add condition options** component and figured out I could do ORs by choosing the "Run actions if... **At least one condition matches"**option! Cool!

![Screenshot 2023-11-20 at 8.49.22 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/292890iC13DDE85BE5CB903/image-size/large?v=v2&px=999 "Screenshot 2023-11-20 at 8.49.22 PM.png")

I think this should work. Please let us know!

comments: author: Devin Holland
body: I ended up using your suggestion of using ELIF block. Changed to issue.created.shortTime and i had success. Thanks for your assistance.
Extract the Project Lead(s) for list of issues with bad/inactive assignees
Asked by Morten Stensgaard:

Hi Community.

Is there any way to iterate over all the issues in Jira, and then extract the Project Lead(s) for the individual issue - but only get/notify the Project Lead once per project?  

Example:

1) Search for all issue with a bad/inactive assignee

Result: (ABC-1, ABC-2, BCA-1, BCA-3 etc)

2) Get the List of Project Leads for those issues

Result: Can be done with Lookup issues of smart value {{issue.project.Project Lead.emailAddress}}

3) Notify Project Lead(s), that they should ensure to have correct assignee or un-assign the issue  
Problem: The above logic will generate MANY emails times per Project Lead(one per issue)

Expected result:

Only notify the Project Leads ONCE, although the have multiple issues with inactive Assignees.

Even better:

Notify Project Lead once with the exact LIST of issues with inactive Assignees

<br />

Is there a way for filtering out duplicate records here? (Or stop the iteration at first issue per project)

Hope you can help here.

Thanks in advance

Morten


Answers:
author: Kalyan Sattaluri
body: I am not on cloud so I dont have these functions but from what I have read in these forums, your solution will look like below.. once your step 2 has email addressess, do a distinct and save the list in a variable. Then do advanced branching and run JQL again for issues but with additional project lead as criteria, then you bulk process to send 1 email but with their list of issues.

Lets wait for experts to refine the logic.


Tags: jira-server
How to clone Epics with Stories
Asked by Sduvvuri:

For process specific stories, using Epics with template stories is a great approach. How can such Epics be cloned along with the stories?


Answers:
author: Mykenna Cepek
body: There are [Marketplace apps](https://marketplace.atlassian.com/) you can add to your Jira that will do "deep clone" operations like this. You can try most of them out for free to see how they work, and/or explore the documentation for each app to find one that matches your needs (and price point). [Here](https://marketplace.atlassian.com/apps/44043/clone-plus-for-jira)'s one that we use.

Alternately, you can do a bit of "roll your own solution" with Jira Automation. You could define an automation rule that you can manually execute on an Epic, and it can clone that Epic and then iterate through the child Stories and clone each of them, putting them under the Epic.

For both of these solutions I'd suggest searching the Atlassian Community here for more info. Others will have discussed both apps that clone as well as automation for deep cloning.


author: Clara Belin-Brosseau
body: Hello [@Sduvvuri](/t5/user/viewprofilepage/user-id/5367267),

If you're willing to use a third-party application, I can suggest trying our [Elements Copy \& Sync](https://go.elements-apps.com/cs_1001_8) app that allows you to copy issues with all their content (summary, description, custom fields, comments, attachments, etc.) and their child issues.

You'll be able to [clone a hierarchy tree](https://go.elements-apps.com/cs_1001_9) with all its issues at once.

Don't hesitate to try our app, it's free during 30 days and stays free under 10 users.

Let me know if you have any questions.

Kind regards,

Clara


author: Luka Hummel - codefortynine
body: Hi [@Sduvvuri](/t5/user/viewprofilepage/user-id/5367267) and welcome to the community!

I'm Luka from [codefortynine](https://marketplace.atlassian.com/vendors/1213041/) ?

As [@Mykenna Cepek](/t5/user/viewprofilepage/user-id/3527113) already mentioned, there are solutions for your use case in the Marketplace.

Our app [Deep Clone for Jira](https://marketplace.atlassian.com/apps/1218652/deep-clone-for-jira?hosting=cloud&tab=overview&source=community382) allows you to clone Epics and all their linked issues with its [Epic/Tree Clone](https://c49.link/deep-clone-for-jira/docs/epic-clone) feature, including Stories. This ensures that the structure and relationships between your Epic and its Stories are preserved in the clone.

Should you encounter any issues or have further questions, feel free to reach out.
How to create ticket when asset expires
Asked by John Scheffer:

Hi,  

We have some licenses in our asset database with an expiration date (ID 98).  
I would like to receive a Jira service desk ticket 14 days before the expiration date  
How can I turn this into an automation rule?  

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


Answers:
author: Curt Holley
body: Hi [@John Scheffer](/t5/user/viewprofilepage/user-id/5365186)   
Welcome to the community!  

Create a rule with the scheduled trigger, set it for as often as you desire/require (daily perhaps).  
Then do a lookupObjects action using AQL to find the Objects that will expire within the next 14 days.

Do an advanced branch on smart value {{lookupObjects}} and then do the Create issue action on the branch. This will create an issue for each object returned from the lookup.

This will get the basics going, but it gets more complicated if you want to update the object as well via automation, where an AQL branch is required, but that makes it harder to grab the object attributes for the issue.  

I recommend, start simple and see how that goes.

comments: author: John Scheffer
body: Hi Curt,

Thanks for your response. I will try it and let you know
????????????2?????Webhook??????????????
Asked by Ariel ??? (PMO):

????????????2?????Webhook??????????????????jira???"Delay"???????????????????????????????????

???????  
1. ???Jira?  
2. ????????? "??"?Settings??  
3. ????????????? "???"?Automation??  
4. ????????? "????"?Create rule????  
5. ?????????? "?"?When???????? "?????"?Issue created??  
6. ? "??"?Then?????? "????"?Add condition??????? "??"?Delay??  
7. ? "??"??????????????  
- ?????Delay duration???? "2m"?????2???  
8. ? "??"?Then?????? "????"?Add component??????? "??Webhook??"?Send Web Request??  
9. ? "??Webhook??"??????????  
10. ?? "??"?Save???????

????????????????Jira???2???????Webhook???????????"Delay"???


Answers:
author: Bill Sheboy
body: Hi [@Ariel ??? (PMO)](/t5/user/viewprofilepage/user-id/4649394)

What problem are you trying to solve by doing this? Knowing that may help the community to offer suggestions.

Until we know that information...

That is not possible using rule actions directly. There is no "delay rule execution" action.

There are a few possible work-arounds:

#1) A possible work-around would be to use a Send Web Request action to call a REST API which performs the delay, and have the action wait before proceeding. **I recommend not doing this, as it may have unknown impacts upon your automation usage limits.**

Some better approaches could be:

#2) Use 2 rules, where one is triggered on the issue create, and which sets a custom field to the current time plus 2 minutes. Then use a second rule with a scheduled trigger and JQL to find issues with that field set, relative to the current time. The field could then be cleared before the rule proceeds.

#3) Use 2 rules, where again the first is triggered on issue create, and which then sends a web request to a REST API to perform a call back in 2 minutes. Then use a second rule triggered on a webhook to listen for the call back.

Please note: all of these work-arounds are subject to the running of the Atlassian automation infrastructure. And so if there is an outage or delay in processing, there is no guarantee that the action delay will be exactly 2 minutes.

Kind regards,  
Bill
How to set epic story points based on child issues
Asked by Hannah Levick:

I am trying to set up an automation to sum all of the stories, tasks, subtasks ect.. story points to automatically set the EPICS story points.

![2023-11-14_17-49-04.png](https://community.atlassian.com/t5/image/serverpage/image-id/291713i5FACF6D0EFF5EC85/image-size/large?v=v2&px=999 "2023-11-14_17-49-04.png")


Answers:
author: Stefan Salzl
body: Hi [@Hannah Levick](/t5/user/viewprofilepage/user-id/5364625)

welcome to the community

I generally suggest to give story points only to stories not subtasks. If you still wanna go with subtasks I guess you would have to create 2 rules. The following videos guide through exactly your requirements:

<https://youtu.be/60sWD66l19k?si=j0dfAy-LiSkZ7VqO>

<https://youtu.be/PROcxEOMyGM?si=ZqbnWByYztqhGClJ>

Best  
Stefan

comments: author: Bill Sheboy
body: Hi [@Hannah Levick](/t5/user/viewprofilepage/user-id/5364625) -- Welcome to the Atlassian Community!

I am following up to check if Stefan's answer solved your question. If so, please consider marking this one as answered...and if not, please let us know if you need more help. Thanks!

Kind regards,  
Bill
I am unable to login to my bitbucket account.
Asked by Mubashir:

Hi,

I am using my Bitbucket account after a while and looks like it is deactivated. Could you please activate my account because I want to start using this again.

Thank you.


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

Your Bitbucket account was indeed in a dormant state, I went ahead and reactivated it. Could you please try to log in when you have some time and let me know if the issue is resolved?

Just a heads up, I moved your reply to a new question. Please create a new question if you need assistance instead of replying to other users' questions, both for better visibility and to avoid existing questions becoming convoluted with multiple different users' requests.

Kind regards,  
Theodora

comments: author: Mubashir
body: Thank you Theodora. I am able to access my account now.


Tags: bitbucket-cloud

cloud