youngmon/atlassian-qna huggingface dataset:
Need help assign asset based on custom field
Asked by Justin:

I have a custom field called email address and and user data the same email address exists in jira assets, how do I assign that asset based on the custom field. I've done this with {{reporter.accountID}} but dont know how to do this for the customfield


Answers:
author: Mark Higgins
body: Hi Justin,

I think you find that the reporter.AccountID, is the Atlassian ID, that everyone gets, and is unique.

What you need to do is in Assets, create an additional Attribute of type User, that can contain the Atlassian ID.

![Screenshot 2024-07-31 172344.png](https://community.atlassian.com/t5/image/serverpage/image-id/339038iB670F3EE008C1180/image-size/large?v=v2&px=999 "Screenshot 2024-07-31 172344.png")

THen you need a routine that goes to Atlassian and gets the ID and you assign it to the User column, so you end up with:

![Screenshot 2024-07-31 172254.png](https://community.atlassian.com/t5/image/serverpage/image-id/339039i8576C053CF7E8135/image-size/large?v=v2&px=999 "Screenshot 2024-07-31 172254.png")

So the AdeleV in the USer attribute, is the Atlassian ID.

If you then have the email address in the same row, you can look it up and assign.

So, how do you get the Atlassian ID's.

Have a look at this for an example, but its a little tricky at times, especially the Base64 authorisation that requires your email and you API key to the site.

<https://piosoftware.atlassian.net/wiki/spaces/WS/pages/22937661/Mapping+Azure+AD+Users+with+Jira+Users+and+Jira+Groups>

Hope this helps.

Regards

Mark


Tags: assets

cloud

jira-cloud

jira-service-management

jira-service-management-cloud
Cannot tag additional users in ticket until they are added as requested participants
Asked by James Dushay:

When responding to the service management project we have I cannot [@mention](/t5/user/viewprofilepage/user-id/732788) users that are not the ticket creator unless I add them as a requested participant.

Ex.

Tony is requesting access to a system

James wants to tag Tony's manager for approval. James cannot tag Tony until he adds him as a requested participant.


Answers:
author: Trudy Claspill
body: Hello [@James Dushay](/t5/user/viewprofilepage/user-id/5440858)

That is functioning correctly. On what are you basing your expectation that Tony's manager should be able to be mentioned without first being a Request Participant?


Tags: cloud

jira-service-management

jira-service-management-cloud
Automation - is sending duplicates
Asked by JoshTheBoss zn:

Hi,

We are using Data Center 8.20

I have a very simple automation rule:

- Trigger - Status Changed

- If - Status = xxx and Approvals = Approved and "customer request type" = xyz

- Then - Send email to involved customers

The problem is JIRA is sending duplicates of the emails to users. Basically, the email does send but in the body of the email - the details are copied 4 times which is really a poor experience.

I do I have specific request type ( i.e xyz in the rule above) since I want to automated email to send out specific fields. I was advised that this was working - but today its sending duplicates.

Any assistance would be appreciated.

Thank you!


Answers:
author: Hans Polder
body: [@JoshTheBoss zn](/t5/user/viewprofilepage/user-id/4170313) ,

Can you share some screenshots of how your automation is setup, especially zooming in on the Send Mail action(s?). Feel free to anonymize where needed. Also, can you share some details from your Automation Rule audit log, expanding one where it went fine, and one where it failed?

Also, which version of Jira Automation are you using? Do you have any plans to update to Jira 9.x, since 8.x is (as far as I can see) no longer supported?


Tags: data-center

jira-service-management

jira-service-management-data-center
the user has said that "it keeps assigning user stories from the assignee to the reporter happens wh
Asked by Lakshmi Radha Devupalli:

Lakshmi radha infosys company


Answers:
author: Jack Brickey
body: I suspect that there is an automation roll coming in to play here or possibly a post function in your workflow.

However we definitely need more information to be able to assist you. I also recommend testing behavior out in observing for yourself exactly what happens when it happens and what you were doing at the time it happened.


author: Pramodh M
body: Hi [@Lakshmi Radha Devupalli](/t5/user/viewprofilepage/user-id/4707570)

Welcome to the community!!

You need to enter the question in description

What's the query here?


Tags: cloud
Insight Automation (Datacenter) Smart Values? Placeholders? Where is the documentation?
Asked by ICANSEEYOU7867:

Im having trouble with insight automation. I would like to combine some fields as the Name field but none of the suggestions of using smart values or placeholders are working.

Examples for Cloud:

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

<https://community.atlassian.com/t5/Automation-questions/Insight-automation-Update-Date-Value-in-Insight-after-Object/qaq-p/1483228>

Other examples:

<https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Set-Insight-Automation-to-Concatenate-two-Attributes-when-an/qaq-p/1489152>

<https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Set-Insight-Automation-to-Concatenate-two-Attributes-when-an/qaq-p/1489152>

No references or examples in documentation:

<https://confluence.atlassian.com/servicemanagementserver/configuring-automation-rules-1044784502.html>

<https://community.atlassian.com/t5/Automation-questions/How-to-concatenate-two-attribute-values-to-set-a-third-attribute/qaq-p/1631431>

When I try to use the $(AttributeName) or {{object.AttributeName}} I literally get those exact strings. Any advice?


Answers:
author: Stefano Vidonis
body: Please read here: [\[JIRAAUTOSERVER-313\] Support access of all Insight attributes through smart values - Create and track feature requests for Atlassian products.](https://jira.atlassian.com/browse/JIRAAUTOSERVER-313)


author: robert Mugabuhamye
body: I know the thread is old, but any chance with this ?


author: Wim Abts
body: Same question here...

Can we use smart values in Insight Automation in the 'Attribute Value' action?


author: Derek White
body: bump


Tags: data-center
How to replace HTML tags in description field?
Asked by Andrey Rudnev:

Hi, i try to create a manual automation rule which can to replace(or delete and save only text in desc. field) HTML tags (\<div\>; \</div\>; \<br /\>) with empty value in description field.

The fact is that there is a third-party service through which tasks for Jira are created and in the Description field, customers often highlight something with color or something related to HTML. There is no official solution to this problem, so I try to get out through the automation rules.

Can anyone suggest how to implement this?


Answers:
author: Andrey Rudnev
body: [@Gonchik Tsymzhitov](/t5/user/viewprofilepage/user-id/726117) [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

I found a way to work with HTML tags through an automation rule. It is not ideal and for each specific case, most likely, you will have to either supplement the existing rule, or create a new one. But in my case, I have specific text and specific tags, so this method worked perfectly.

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

I am just using the function to replace a specific tag with an empty value.

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

So, by analogy with any other tags or even entire HTML constructions.


author: Gonchik Tsymzhitov
body: Hi!

Well, only rest api third party solution I see :(

comments: author: Bill Sheboy
body: Hi [@Andrey Rudnev](/t5/user/viewprofilepage/user-id/4528317)

Yes, and...to what [@Gonchik Tsymzhitov](/t5/user/viewprofilepage/user-id/726117) suggests:

Although you could probably write a regular expression to remove most of the markup, the edge-cases would probably mess up your description field.

If you can, I suggest investigating if the source service can send plain text. The next option is the already provided suggestion to look for another REST API to strip off the HTML tags...although that is going to add time to rule execution (up to several seconds).

Kind regards,  
Bill


author: Andrey Rudnev
body: [@Gonchik Tsymzhitov](/t5/user/viewprofilepage/user-id/726117) [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Thanks a lot for your answers!


Tags: cloud
Smart Values- #lookupIssues does not work with for pull request information
Asked by Chris Drylie:

Hi all,   

So basically we have automation setup that will send an email on a schedule each week, this is working fine a part from we want to include some information about pull requests, titles, url etc.

So in the send email body we have the following:  

{{#lookupIssues}}  
\* {{key}} \| {{summary}} \| {{pullrequest.url}}  
{{/}}  

Key and summary display fine, but pull request URL does not display at all, is this not supported or is there a better way to do it?   

Also bonus questions does anyone know how to get pull request ID?


Answers:
author: Charlie Gavey
body: Hi [@Chris Drylie](/t5/user/viewprofilepage/user-id/4696614)

Which trigger are you using for this rule? It's worth noting that the pull request smart values are only supported when using the **Pull request created** ,**Pull request declined** and **Pull request merged** triggers.  

You can read more about this here:   
<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/>  

Cheers,

Charlie

comments: author: Chris Drylie
body: Hi Charlie,   

That's disappointing,   

<br />

We are triggering on a schedule that runs a JQL to pull all jobs for the week that has been merged.   

We then wanted to show Job number, description, Pull request url to help smooth out our release note process.


author: Nick Caplan
body: We have a very similar requirement...

We want to send a notification (email / Slack) when a fix version gets released, including:

* Version name
* Issues within version
* Pull requests for each of those issues

The first two seem to be doable but I can't seem to find a way to do the third when the trigger is **Version Released**.


author: Nick Caplan
body: Reposted as comment


author: Bill Sheboy
body: Hi [@Chris Drylie](/t5/user/viewprofilepage/user-id/4696614) -- Welcome to the Atlassian Community!

Smart values are usually case-sensitive, so please try: {{pullRequest.url}}

<https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/#pullRequest.url>

Kind regards,  
Bill

comments: author: Chris Drylie
body: Hi Bill   

Thanks for replying and the welcome :).  

Gave it a try and the same result, everything else displays, juts not the Pull Request URL.


author: Bill Sheboy
body: Interesting... After the Lookup Issues action, please try writing this to the audit log and see what happens:

```
{{lookupIssues.first.key}} :?{{lookupIssues.first.pullRequest.title}} --?{{lookupIssues.first.pullRequest.url}}
```

That will confirm if the development fields work for a Lookup Issues action, and give you a key to go confirm manually if the issue view does show the PR information.


author: Chris Drylie
body: Shows the Key but nothing for pull request info. I wonder if it is because Pull Request is in the development section in Jira.  


Tags: smart-value
Can't use automation for initiative hierarchy (Epic Parent) When Epic field is being changed
Asked by Ofer Regev:

Hi

I am trying to change one of the fields' values at the initiative level we created whenever a field at the epic level (child of the initiative) is updated.  

No options in the branch function refer to anything higher than epic

And I couldn't find a way to use smart values in this case   

Any help would be appreciated

![Screen Shot 2021-12-21 at 9.49.45.png](https://community.atlassian.com/t5/image/serverpage/image-id/174898iE0A5956E9353958C/image-size/large?v=v2&px=999 "Screen Shot 2021-12-21 at 9.49.45.png")  

<br />


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

You are correct that those other levels are not supported by-name in the automation actions/branches...[yet](https://codebarrel.atlassian.net/browse/AUT-1779). Instead you could try to branch on JQL, for example:

* trigger: issue field updated (for your field)
* condition: issue type equals epic
* branch: on JQL with key = {{triggerIssue.parent}}
  * condition: issue type equals initiative
  * action: edit issue, copying the value from the trigger issue

Kind regards,  
Bill

comments: author: Ofer Regev
body: Thanks [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)   
question, if I need to check something on a specific field at the initiative level  
can I use {{triggerIssue.parent.custom field name}} ?


author: Bill Sheboy
body: Often that is not possible, because the rule would potentially need to load all of the data for any linked issues in a chain...even if not needed.

Instead you could use a branch to that parent to access the data, as I suggested for the edit, or [Lookup Issues](https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues) with the same JQL.

Please note this gets more complicated if you needed to *update the trigger issue (e.g. epic) based upon something learned in the parent (e.g. initiative)*. For Jira Cloud automation, the possible work-arounds are to use Lookup Issues or Created Variables to save the information first. For example:

* trigger: some trigger you need
* condition: issue type is epic
* condition: issue has a parent (e.g. initiative)
* action: lookup issues with JQL to get the parent's data
* condition: test the parent's fields, such as {{lookupIssues.status}}
* ...more actions...
Is there any way to get users list from specific project groups in Jira.
Asked by Mohini Chandwani:

User management is done via Single Sign on mechanism (SAML).


Answers:
author: Charlie Gavey
body: Hi Mohini,

I've linked your suggestion to a related feature request, which counts as an upvote for this ticket:

<https://codebarrel.atlassian.net/browse/AUT-279>

Thanks for using Automation!

Cheers,  
Charlie

comments: author: Mohini Chandwani
body: Actually we are using Jira server and was trying to get Jira user list for particular groups using Jira Rest API but as for my case users are maintained in external SDE portal and authentication is done as Single sign on (SAML) method. When I try to use following API

<https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/#api-rest-api-2-group-bulk-get>

and I'm getting **"You are not authorized to perform this action. Administrator privileges are required"**but I have Admin rights.

Is there any way to get list of users group wise other than this or any other alternate method.

Thanks for the quick response.
How to delete stories underneath an Epic when delete this Epic?
Asked by Jessica Xu - Lenovo xujh7:

Hi,

I have created a auto rule successfully that when create an Epic there will be 4 stories(Schedule Story, HW Story, Driver Story, Deliverable Story) created automatically. And their Epic link is this Epic.

Now my question is when I delete an Epic, I want to delete these 4 stories automatically. But this rule is failed. Could someone can help me how to write this rule? Thanks!

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


Answers:
author: Fabian Lim
body: Hi [@Jessica Xu - Lenovo xujh7](/t5/user/viewprofilepage/user-id/4678859)

I would check the logs to see the exact error message, but most likely it's because the issue was deleted already when you run the branch.

Also check you have delete permissions in your project.

Instead of deleting them change the status to cancelled.

Regards

comments: author: Jessica Xu - Lenovo xujh7
body: Hi Fabian,

Thanks for your reply. The error message as following. I think you are right. I deleted this Epic already. The stories don't has the Epic link any more.

And I have delete premissions in my project. I can delete them manually.

If have way to delete these stories when delete Epic, it's good than cancelled them. But if has no way, I can only cancell them. Thanks.

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


author: Fabian Lim
body: Hi [@Jessica Xu - Lenovo xujh7](/t5/user/viewprofilepage/user-id/4678859)

If you decide to cancel instead, this is straightforward.

Trigger: issue transitoned to cancelled

Same as you have with the only change to the action in thr branch.

Action: transition to cancelled

<https://support.atlassian.com/cloud-automation/docs/branch-automation-rules-to-perform-actions-on-related-issues/>


author: Jessica Xu - Lenovo xujh7
body: Thanks Fabian.

I come up with another way to implement the idea. But still failed as following picture. So it seems that as long as the delete item is used as the trigger, the branch will not work. Do you think so? Thanks.

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


author: Charlie Gavey
body: Hi there,

Following on from Fabian's suggestion above, had you tried a scheduled rule that uses similar JQL but looks for stories without an epic link (i.e. where the epic has already been deleted), and then deletes those stories?

Cheers,

Charlie

comments: author: Jessica Xu - Lenovo xujh7
body: Hi Charlie, Thanks for your suggestion. If look for stories without an Epic, it has a side effect to delete others storied not related this Epic if others stories has no Epic link. I want to avoid this scenario.


Tags: cloud
API - What is the correct confluence server name used in endpoint url
Asked by Oscar:

I am looking into setting up an API between a system and confluence. The confluence server is run on a corporate network. How do I find the correct information for \<confluence server\>

$ConfluenceURL = "https://\<confluence server\>/rest/api/content"


Answers:
author: Nic Brough -Adaptavist-
body: It's the base url of the confluence service you are trying to reach.

If, for example, you normally use your confluence on "<https://myorg.com/docs>" then the \<confluence server\> is "myorg.com/docs"
The issue created trigger does not work for issues created by Automation for Jira
Asked by Mykola:

When I manually create a new issue the automation runs and I can see it in the audit log. But when Automation for Jira creates a new issue, as a result of another automation rule, the automation does not run and I do not see anything in the audit log. What can be a problem here?  

You can see my automation rule below.

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


Answers:
author: Dirk Ronsmans
body: Hey [@Niko](/t5/user/viewprofilepage/user-id/1213100) ,

On your rule details you should see a checkbox "allow this rule to be executed from another rule"

Can you verify that this is enabled?

comments: author: Mykola
body: Yes, it's there. I checked it and now everything works perfectly. Big thanks to you!


author: Parth Bindroo
body: Thanks for this :D


author: Rajesh_Kumar
body: Thanks [@Dirk Ronsmans](/t5/user/viewprofilepage/user-id/124602) , it helped me today.
change a field in a story depending on the status of a subtask
Asked by Marcelo Cid (Antiguo):

Hi all,

I have a subtask issuetype called lock, which has backlog - in progress and done states. This issue indicates if the parent (task, history, bug, etc) contains locks.

Inside the parent there is a field called blocked which is a selection list with the yes and no fields.

I would like to generate an automation that indicates the following:

If there is at least one block in the backlog or in progress states, the parent field (the blocked field) changes to yes. Whereas if the set of blocks is in done, the parent field changes to Done.


Answers:
author: Charlie Gavey
body: Hi Marcelo,

It might be simplest to create a couple of automation rules to achieve this.

You could use one automation rule that sets the blocked field of the parent issue when a subtask of issuetype block is created, and then another automation rule to update the field in the parent issue when the block subtask is completed.

Here's an example of what the first rule could look like.

![Screenshot 2021-12-15 at 10.18.46 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/173948i4800AA1E66AFC248/image-size/large?v=v2&px=999 "Screenshot 2021-12-15 at 10.18.46 AM.png")

Hope this helps!

Cheers,

Charlie
Can I use JQL to find out if the current user is the same as a custom field?
Asked by Julia:

Using automation for Jira on SERVER.

We have a custom field called "access approver" which is a user picker. I am trying to make it so if the user who comments the words "approve" on the ticket is the same as the access approver, then the ticket should transition to the Approved state.

Here is what I have now, but the JQL of "access approver" = currentuser() isn't working... any ideas appreciated, thanks! ![Screen Shot 2021-12-14 at 11.58.41 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/173936iD7E4D9B363514E01/image-dimensions/434x616?v=v2 "Screen Shot 2021-12-14 at 11.58.41 AM.png")


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

From what you describe, you want the person who commented for the comparison, correct? If so, please check with {{initiator}} for the person who triggered the rule.

Kind regards,  
Bill

comments: author: Julia
body: Where would I do this in the rule? In the advanced fields area?


author: Bill Sheboy
body: In your compare, please replace currentUser() with {{initiator}}

currentUser() is a JQL function which works from the UI when I logged in user runs a query/dashboard. And {{initiator}} is the person user who performed the action that triggered the rule.


Tags: custom-field

server
Automation for Jira - send a message to a private Slack channel
Asked by Nofar Ben Kereth:

Hey,

I have an automation that sending a message on a time basis to a private Slack channel. I get 404 - channel not found in this automation. I tried looking for a solution of sending a message to a private channel but got nothing. I read some where that adding the Jira Bot can hep but that's only per project and I need to be generic (to all projects in my instant). DI don't want to have maintenance (adding project to bot for every new project - if that's even possible). Adding the error message here.

![Screen Shot 2021-12-09 at 16.25.05.png](https://community.atlassian.com/t5/image/serverpage/image-id/173116i0F82C2718A19E899/image-size/large?v=v2&px=999 "Screen Shot 2021-12-09 at 16.25.05.png")

Thanks!

Nofar


Answers:
author: Stefan Salzl
body: Hi [@Nofar Ben Kereth](/t5/user/viewprofilepage/user-id/3709861) ,

there was an article similar to your problem. Maybe this helps (search for 404, there was a suggestion of a community member with this problem and how they solved it):

<https://community.atlassian.com/t5/Automation-articles/Mention-someone-directly-in-Slack-via-Jira-Automation/ba-p/1528605>

Best

Stefan