youngmon/atlassian-qna huggingface dataset:
Auto assign tickets based on time slots
Asked by Ralston Africa:

Hi All

I am trying to figure out a way to automatically assign tickets using specific time slots.. I have played around with a bunch of conditions and it seems there are to many solutions out there. The one that seems to work is the following

When : Issue gets created \> Created before 3pm African Time it gets assigned to user x

That works fine

However when I try to add another component to the same rule for anything created after 3pm it does not seems to assign the request automatically...

It gets left in the unassigned queue

For reference - Field \> **Created \>**Condition is before \> Specific time 3:00 pm - works fine

- Filed \> **Created** \> Condition is after \> Specific time 3:00 pm - does not work

Am i missing something?

Ralston


Answers:
author: Marcus Jones
body: Hi [@Ralston Africa](/t5/user/viewprofilepage/user-id/4088093) ,

Looks like there are a couple other threads that have already solved this problem. Take a look and let us know if it is/isn't helpful!

- [Solved: Assigning round robin according to the hour of the... (atlassian.com)](https://community.atlassian.com/t5/Automation-questions/Assigning-round-robin-according-to-the-hour-of-the-day/qaq-p/1651142)

- [Solved: Assigning tickets depending of the hour of the day (atlassian.com)](https://community.atlassian.com/t5/Jira-Software-questions/Assigning-tickets-depending-of-the-hour-of-the-day/qaq-p/1664870)
Jira automation based on time stamps
Asked by Ralston Africa:

Hi Community,

Our Department consists of 2 employees based in Cape Town and Detroit. Based on these locations just provided there is a time difference.

I'd like to know how I can setup a rule that if a ticket gets created between the hours of 9 am - 3 pm it automatically gets assigned to the support person in Cape Town and if a request comes after 3 pm in it gets assigned to the person in Detroit.

Any ideas on how to establish this.

Best,

Ralston


Answers:
author: Mark Segall
body: Hi [@Ralston Africa](/t5/user/viewprofilepage/user-id/4088093) - Yes this is possible. It would look something like this:

* TRIGGER: Issue Created
* CONDITION (IF)
  * Advanced/{{smart values}} condition
    *

      ```
      {{issue.created.format("k")
      Greater Than or equal to
      9
      ```

    *

      ```
      {{issue.created.format("k")
      Less than
      15
      ```

  * ACTION: Edit Issue (Assignee)
    * Your Cape Town support
* CONDITION (ELSE)
  * ACTION: Edit Issue (Assignee)
    * Your Detroit support

comments: author: Mark Segall
body: [@Ralston Africa](/t5/user/viewprofilepage/user-id/4088093) - Your rule should look something like this:

![2024-01-10_07-46-21.png](https://community.atlassian.com/t5/image/serverpage/image-id/299924i6AD3A6643A09D7AD/image-size/large?v=v2&px=999 "2024-01-10_07-46-21.png")


author: Bill Sheboy
body: Hi [@Ralston Africa](/t5/user/viewprofilepage/user-id/4088093)

Just following up to ask if the suggested answer solved your question. If so, please consider marking this one as answered to help others find solutions to similar needs faster. Thanks!

If not...please describe what is not working as expected, and post an image of your complete current rule and of the audit log details showing the rule execution. Those may provide more context for the community to help.

Kind regards,  
Bill


author: Ralston Africa
body: Hi Mark,

Thanks for the suggestion but it seems like it keeps on failing to assign the requests automatically. I followed your suggestion to the tee but it seems to not work

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

comments: author: Ralston Africa
body: Hey [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Apologies for the delay, you can go ahead and mark this as resolved

Thanks for the help [@Mark Segall](/t5/user/viewprofilepage/user-id/4666637)

Best,

Ralston


author: Bill Sheboy
body: Ralston, as the original poster, you can mark the question as answered by selecting the answer(s) that helped and marking it that way.
Is there a way to utilize automation to send invites in google calendar?
Asked by Anthony Ha:

Hello,

So what I am trying to do is automate scheduling for one of our projects. I am trying to get the automation to send calendar invites through google calendar once an issue is status is changed. What would be the best way to approach this?


Answers:
author: Kevin Bui
body: Hi [@Anthony Ha](/t5/user/viewprofilepage/user-id/5389236) - this isn't something available out-of-the-box in Jira automation.

You might be able to accomplish it using custom workflow post functions ([mentioned in another Community question here](https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Create-Google-Calendar-entry-with-Jira-Automation/qaq-p/1572468)) but I can't verify if this works or not.
I need to create a automation to auto assign name to get approval
Asked by Gunasundri Subramaniam:

I want to create an automation rule for access requests to assign the approver name based on the service owner's name. The notification email is sent to the service owner either to Approve/Reject. Kindly advise, how I can create this rule in JSM.


Answers:
author: Kavitha Chandrasekaran
body: ![Screen Shot 2024-01-07 at 8.49.35 pm.png](https://community.atlassian.com/t5/image/serverpage/image-id/299219iF6041FAA2916EE6A/image-size/large?v=v2&px=999 "Screen Shot 2024-01-07 at 8.49.35 pm.png")

comments: author: Gunasundri Subramaniam
body: Hello Kavitha, I appreciate your guidance. Once we assign the issue to a specific person, can this user Approve/Decline the request? Could you please explain how this approval flow functions? I apologize for the inconvenience; it's my first time using Jira Service Management and automation configuration. Your patience is highly valued


author: Rick Westbrock
body: I am not sure how you have an individual set as the service owner because the Service Owners attribute of the Service object type in the Services schema in Assets is a group attribute, not a user attribute.

That being said you should be able to accomplish this without using components because you can use a Lookup Objects action in the rule to find the matching service name in the Service object type mentioned above. Once you have found the object then you can set the Approvers field to **{{lookupObjects."Service Owners"}}** or **{{lookupObjects."Change Approvers"}}** but the Change Approvers attribute is also a group attribute (not user).


author: Kavitha Chandrasekaran
body: [@Gunasundri Subramaniam](/t5/user/viewprofilepage/user-id/2821282) To make it simpler, you can use component as a service and assign component lead as the service owner name and at the project level, you can set the default assignee to component lead. In that way, you do not need to even write an automation rule.. keeping it simple and maintainable.


author: Kavitha Chandrasekaran
body: [@Gunasundri Subramaniam](/t5/user/viewprofilepage/user-id/2821282) Assuming you are capturing service name in some field, you can use smart values to compare the service name and use the service owner name as assignee. If there are 10 services, you will need to write multiple if conditions.

In this example I have used component name. Based on the value of component, the automation that gets triggers when an issue is created will assign to particular person. Hope this helps.
Replace multiple values in a String
Asked by Paulo Amaral:

I have an automation that sends the comments made to an issue to a Slack channel, replacing the user tag in Jira side with the appropriate user tag on Slack side (so people get notified).

**What works so far:**

On Jira, the mention appears as \`\[\~accountid:7120...ff4600c98\]\`. I implemented a replace action (actually many of them in one rule) to change each account to Slack's corresponding string \`\<@U5D3UAZHC0J\>\`. To perform replace after replace, I save the comments filed to a variable {{message}}, and using "Create Variable" multiple times, I replace each entry and update {{message}} (as in the screenshot). The field "Smart Value" of these replacement is hard-coded for all.  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/299131iADEDB84FFE7E0E40/image-size/large?v=v2&px=999 "image.png")  
This works fine, but the maintenance is painful. As the list grows, it gets more difficult to find things and make changes (because of so much repetition, the fields are short and don't allow me to see the values well, etc.). Is there a smarter way to do this?  
**What I have tried**  
I tried a couple of things involving the advanced branching, to later realise it runs in parallel and whatever is done in the branch is lost. The replacements made in the loop didn't affect the variable {{message}}. I see the reason for performance purposes, but it doesn't make sense to me not having a plain and normal synchronous loop.  
I tried having all values in a Lookup Table component, and managed to iterate over them. I also tried to use slip() to break a string that contains all data colon-and-semicolon-separated: "user1-jira-account,user1-slack-id;user2-jira-account,user2-slack-id;" (and so on). Both ways worked for me, but I can't find how to update the message without repeating the call to .replace a multiple times.  
Has anyone tried something similar? Ideas to share?  
Thanks and regards  
Paulo


Answers:
author: Bill Sheboy
body: Hi [@Paulo Amaral](/t5/user/viewprofilepage/user-id/5295966)

Short answer: there is no synchronous processing, loop structure for automation rules at this time. And even if there was, smart value, list iterator scoping may prevent accessing the data you need to preform the search / replace operations.

Longer answer:

Context is important for automation rules. Would you please describe **what problem are you trying to solve?** That is, "why do this?" Knowing that and seeing your complete automation rule may reveal other solution approaches.

In the meantime, the method you described chaining replacements may reduce potential errors and improve rule performance. For example:

{{issue.comment.last.body.replace(*firstAccountIdString* , *firstReplacement* ).replace(*secondAccountIdString* , *secondReplacement* ).replace(*thirdAccountIdString* , *thirdReplacement*)}}

Kind regards,  
Bill
How do i link new request forms (sub tasks) to an exisiting issue without knowing what the issue is?
Asked by Jason Selby:

Please bear with me on this.

I have created a Request type on the Portal as a kind of sign of form which will be completed by several different departments. When this form is completed I want it to link to an existing open issue which the end user won't necessarily know the ref number of, can anybody give me an efficient user-friendly way of doing this via automation?


Answers:
author: Jack Brickey
body: Hi Jason, a couple of questions. How will you or the automation know when the form is completed? If we can assume that the form is complete with the creation of the issue the the rule can trigger on issue create. Next, the linking to the issue will be done by the rule action but how will the rule know which issue to link to? Will the issue to be linked be known (static) at the time the rule is created.

maybe a more detailed explanation of your used case would help dried to a solution more quickly. Assuming one is possible.
configure in JIRA by sending due date reminders or screen notification to a specific group
Asked by Shasheekant Patel:

How to configure in JIRA by sending due date reminders or screen notification to a specific group (Management) in Jira when a Sprint is nearing the completion date and Stories inside the Sprint aren't completed yet.


Answers:
author: Tim C
body: HI [@Shasheekant Patel](/t5/user/viewprofilepage/user-id/5371875)

I'm sure there's probably a number of ways to achieve this - but here's what I've done before for this type of situation ...

1) Create an automation rule that get triggered when "**Sprint**" field is updated.

The rule should populate the "due date" (or add own custom field - "sprint end date" or similar) with the sprint end date value **{{sprint.endDate}}** for the new Sprint field.

I'd usually also set a "Start Date" field to **{{sprint.startDate}}** too.

2) Create a JQL filter which finds your uncompleted Stories that within your notification period:

**project = XYX and Sprint in openSprints() and resolution is empty and "due date" \< 2d**

*NB: obviously XYZ and 2d (2 days) could be amended to suit*

3) Add subscription to your above filter which runs everyday at chosen time. This should send emails to your "user-group" and click box so it only sends whenever there's results.

Optionally, you could add "assignee = currentUser()" to the above filter (or create a second separate filter) - which means it'll only send email notifications to the assignees about due tickets and won't send email to those which don't have any assigned.

I hope this helps,

Thanks,

Tim C.

comments: author: Shasheekant Patel
body: Thank you for your valuable response.


author: Tim C
body: Hi [@Shasheekant Patel](/t5/user/viewprofilepage/user-id/5371875) - glad that it help. Please accept my answer above - so it marks your question as "solved" which is useful for others when searching the "community".
Sum of Story Points for lookup issues for an Epic doesn't give correct total - Why?
Asked by Cash Coyne:

I have an Automation Rule that runs on just Epics and does this lookup:

```
parent = {{issue}} order by issuekey
```

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

I want to get a sum of the story points of the children of that epic (I've attached a screenshot of the children with their story points)

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

I've put in a log entry to show the children and their story points, then using this to show the sum of those story points:

```
{{lookupIssues.Story Points.sum}}
```

I've attached a result of 2 different log runs with the only difference being the order by order for the lookup JQL

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

But looking at the log, it shows **story points only for the first child** that is shown on the screenshot showing the epics story points, (this is the case even if I change the order by field) and the sum of the story points is only the story points for the first child.

Why does the lookup not provide the story points for all the child issues?


Answers:
author: Cash Coyne
body: I figured it out.

There was an issue type that was not in the Default Configuration Scheme for Story Points. So, while the issues for that issue type had story points, automation did not get them as they were not part of the scheme. I added them to the scheme and it seems to be working.


Tags: jira-cloud
Epic story point with its child issues and update product discovery field
Asked by Ezgi:

Hi,

For Epics, I want to sum all the child issues' story points to write it down for Epic story point, if the status of child issue is "Done".

For Product Discovery Project, I have 2 different fields: Backend Realized Effort and Frontend Realized Effort. I want to sum the story points of "Done" status and "Backend" labeled tasks if that Epic is the delivery ticket of Product Discovery project.


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

Just following up to ask if the suggested answer solved your question. If so, please consider marking this one as answered to help others find solutions to similar needs faster. Thanks!

If not...

From what you described, I believe you will need a multiple-project scope rule (stored with the global rules). To create such a rule, your Jira site admin will need to help.

This rule can be triggered by issue transition to "Done", use conditions to confirm the project and label values, and then perform the edit on the Jira Product Discovery (JPD) issue fields by summing the story points using the Lookup Issues action.

To get you started on creating your rule, please refer to these documentation and example sources:

* <https://www.atlassian.com/software/jira/guides/automation/overview#what-is-automation>
* [https://www.atlassian.com/software/jira/automation-template-library#/rule-list?systemLabelId=all\&page=1\&pageSize=20\&sortKey=name\&sortOrder=ASC](https://www.atlassian.com/software/jira/automation-template-library#/rule-list?systemLabelId=all&page=1&pageSize=20&sortKey=name&sortOrder=ASC)
* <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/>
* <https://support.atlassian.com/jira-software-cloud/docs/use-advanced-search-with-jira-query-language-jql/>

Please let the community know if you need when creating your rule.

Kind regards,  
Bill


author: Kalyan Sattaluri
body: Is your Epic and Product Discovery Project issue types under the same project where your child issues live?
Automation rule throws reporter is not registered user error
Asked by Arunajyothi Samala:

Hi,

Background: We have an Automation rule i.e., at feature issue type if a field value changes/updates with x, it creates an issue in different project as a linked issue.

Problem: When the Reporter is inactive, the rule shows error as Reporter is not registered user. Reporter of the issue is In-active user in the instance, how to by-pass this? Even though the reporter is inactive, how do we proceed for the execution of Automation rule?


Answers:
author: Rilwan Ahmed
body: Hi [@Arunajyothi Samala](/t5/user/viewprofilepage/user-id/5297724) ,

Only active users will have access to create tickets. That is the reason the rule is failing.

In your rule, check if you have option to set "Reporter" field. If yes, you can set it to service user like Jira.automation or any other user user who have access to create ticket in destination project.   
Example:   
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/298650i5646BF18943DED66/image-dimensions/124x139?v=v2 "image.png")

If you can share the screenshots of all actions (IF, WHEN, THEN) in the automation rule, I can assist you further.

comments: author: Arunajyothi Samala
body: Thank you for the response!


Tags: jira

jira-software

jira-software-server

server
Automation: set labels dynamically
Asked by sacha_rouzkhosh:

Hi everyone,  
I need to set dynamic labels for tasks, but so far, I can't get it right.  
Here is what I need:  
I set an automation to create children when an Epic is created.  
Epic (has fix version)  
* Task A/B
* Task D/C

When the tasks A/B and D/C are automatically created, I need to set their labels like:  
* Labels Task A/B = \[{Epic fix version}_A, {Epic fix version}_B\]
* Labels Task D/C = \[{Epic fix version}_D, {Epic fix version}_C\]

Any idea about how to set labels for tasks created during an automation based on the Epic fix version and concatenated with some strings?


Answers:
author: Fabian Lim
body: Hi [@sacha_rouzkhosh](/t5/user/viewprofilepage/user-id/5182644)

You can use the create variable action ([(link)](https://community.atlassian.com/t5/Jira-Software-articles/Automation-for-Jira-Create-variable-New-component/ba-p/1448118) and combine it with smart values to get a new string. Here is the link to the smart values:

- Text functions: <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/>

- smart values overview: <https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/>

I hope this helps

comments: author: Bill Sheboy
body: Hi [@sacha_rouzkhosh](/t5/user/viewprofilepage/user-id/5182644)

Adding to Fabian's answer:

I recommend first writing the smart value expressions to the audit log before trying to set the label values. That will help confirm they work as you expect, and isolate any problems so they can be fixed first.

Kind regards,  
Bill


author: sacha_rouzkhosh
body: Hi,

Thanks a lot, actually I wasn't using directly the smart value into the field "labels" thinking it will be used as a string.

Thanks also [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) I didn't know we can add data into the audit log. It helps me a lot ;)


Tags: cloud

jira-software

jira-software-cloud
find value in "select list" field
Asked by Juergen Holzer:

Dear all!  
I'm trying to check if my "select list" field contains the value a user entered and select this automatically if available (this works).

But if the value is not available I want to check before and send a notification. Instead I just receive an automation rule error.

Is there any way to lookup the select list items in Automation Rule?

Thank you!  
kind regards


Answers:
author: Juergen Holzer
body: I'm sorry, the answers go in to the wrong direction.

I want to achieve something like this, where "EndCustomer" is my customfield of type "select list". So if the list doesn't contain the value I want to receive a notification.

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

comments: author: Bill Sheboy
body: Hi [@Juergen Holzer](/t5/user/viewprofilepage/user-id/4470879)

Please try to stick to one conversation thread when posting. That will help others looking at this question in the future see if there were multiple possible solutions. Thanks!

Next, please post images of your entire rule and the audit log details for context.

Finally, please confirm the following:

1. Are you checking if a specific value **is selected** in the custom field, or
2. Are you checking if a specific value is **available in the list of values** to be selected from all values in the field?


author: Juergen Holzer
body: Hello Bill!  
It's the second option, I want to check if a **specific value is available in the list of values.**Thank you!

KR


author: Bill Sheboy
body: Please see my earlier response: checking if a value is in the available values for a selection field is only possible by calling the REST API and comparing.

And...would you please clarify:

What problem are you trying to solve by doing this? That is, "why do this?"

Knowing that may help to reveal other solution approaches.


author: Bill Sheboy
body: Hi [@Juergen Holzer](/t5/user/viewprofilepage/user-id/4470879)

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...

To find all possible values for a select field, an automation rule would need to call a REST API function, such as this one, using the Send Web Request action:

<https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-options/#api-rest-api-3-field-fieldid-context-contextid-option-get>

Kind regards,  
Bill


author: Asha Goyal
body: Hello [@Juergen Holzer](/t5/user/viewprofilepage/user-id/4470879)

Kindly refer to the document and you should get some hint for your senario.

<https://confluence.atlassian.com/automationkb/automation-for-jira-how-to-update-a-select-field-multiple-choices-from-the-content-of-other-fields-1236449082.html>

Please accept and vote the ans if this helps.

Thanks

Asha


Tags: cloud