youngmon/atlassian-qna huggingface dataset:
Automating Cyrillic to Latin File Name Conversion for JIRA Attachments
Asked by Sophie:

Hello everyone, I'm working on a JIRA project and need to rename attachment files in bulk. Specifically, I need to convert file names from Cyrillic to Latin characters. Here's what I'm trying to achieve: Transliterate File Names: Convert file names from Cyrillic to Latin characters using a predefined mapping. Rename Files: Update the file names in JIRA to reflect the transliterated names.


Answers:
author: Jonathan Muse {Appfire}
body: I don't think there is a good way to rename the attachment while it is still attached to the ticket. There are too many things that would need to be changed like the file on the server, the attachment data in the database and then other information that links it to the ticket.

The only way I cold see this being done is to:

1. Download the file
2. Rename it on the local drive
3. Delete the old file from the ticket
4. Upload and attach the newly renamed attachment.

Several of my go-to tools were not able to do this but I do know that a product called Power Scripts can do it. Here is an example script that shows how it can be done. This is just a starting point, I would add logging to it however it works:  

```
struct renameData {
    string oldFileName;
    string newFileName;
}

renameData [] data = readFromCSVFile("renameData.csv", true);
string [] dataMapped;

for(renameData d in data) {
    dataMapped[d.oldFileName] = d.newFileName;
}

string [] issueKeys = selectIssues("project = TEST");

for(string key in issueKeys) {
    integer [] attach = getAttachmentIds(key);

    for(integer a in attach) {
        string oldFileName = attachmentFilename(key, a);
        boolean downloaded = downloadAttachmentById(key, a, "C:/downloads/" + oldFileName);

        if(downloaded) {
             deleteAttachment(key, a);

             string newFileName = dataMapped[oldFileName];
             renameFile("C:/downloads/" + oldFileName, "C:/downloads/" + newFileName);
             uploadAttachment(key, "C:/downloads/" + newFileName)
        }
    }
}
```


Tags: data-center

jira-service-management

jira-service-management-data-center
how to Automate the following?!
Asked by Sherif Safwat:

?If ticket status isn't updated for more than 2 days in the status \<\< Under validation \>\>, then send a reminder to quality role user.


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

You could either create a saved JQL filter and subscribe people to it, or you could create a scheduled-trigger automation rule (using the same JQL).

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

Kind regards,  
Bill
I want to create a sub-task but only if the sub-task does NOT already exists.
Asked by Marie-Claude Landry:

I want to create a sub-task but only if the sub-task does NOT already exists. I am trying to use a related issues Condition for sub-tasks and cannot get it to work.

Any suggestions on how to best achieve this? Thanks in advance!

Updated: FYI got it to work using this condition!

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


Answers:
author: Marie-Claude Landry
body: FYI I got this to work with a condition if anyone else wants to do this:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/251975i16A1E17DC01C5605/image-size/large?v=v2&px=999 "image.png")
How to create a child issue in a different project based on some conditions
Asked by Pawe? Go?aszewski:

Hi,

I have 2 projects AA and BB. In project AA I have parent issues with a custom field Country. In Project BB there are parent issues with Summary field set to Country values. I would like to build an automation which will create a child issue in project BB under parent issue which has Summary field equal to value of Country field in parent issue in project AA whenever new child issue with Summary field equal to 'phrase' is created in project AA.

So the automation should be triggered when in project AA new child issue with Summary field equal to 'phrase' is created. Then the automation should get the value of Country field in parent issue in project AA and look for a parent issue in project BB with Summary field equal to this Country value. Once the parent issue in project BB is found then automation should create child issue with some values rewritten from parent issue in project AA.

I stuck on initial conditions I can get parent issue key in project AA but I don't know how to get value of Country field and compare it with Summary field in project BB to create child issue under parent issue which meet this condition.

Is such automation possible in Jira or external scripts or additional plugins are required?

Thanks

Pawel


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

You have not told us how this relates to your Epic -\> Issue -\> Sub-task hierarchy.

comments: author: Pawe? Go?aszewski
body: Project AA which is Team-managed business (Jira Work Management) project has no Epics. There are 3 types of tasks and one kind os subtasks.  
Project BB which is Team-managed software (Jira Software) project there is one Epic under which there is one type of task which can have multiple subtasks of one type.
?????????????????????????????????????????
Asked by ????:

??????????????? ? ??????????????????????

???????????????????????????????????????????

???????????????????????????

???????

??????????????????????????????????????????????????????????????????? ?


Answers:
author: Rick Li
body: ????????????????????????

???????????????Community???????????????????

<https://community.atlassian.com/t5/Jira-Software-questions/Unknown-fields-set-during-transition-Field-may-not-be-on/qaq-p/1664675>

???????????
Updating a status after 5 days of no activity
Asked by afernandezdecastro:

Hi!

I want to make an automation that allows me to change the "Finished" status to the "Closed" status, after having spent 5 days of inactivity in a user story.

regards

Ennio


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

What do you mean by "inactivity": no updates at all, something else?

And, what have you tried thus far to solve this?

If you have tried an automation rule and it is not working as you expect, please describe the symptoms, and post images of the complete rule and audit log details showing the execution. Those will provide context for the community to offer suggestions.

If you have not started a rule yet, you can probably do this by writing a JQL statement to find the issues and using the scheduled trigger to process them for transition to "Closed".

To get you started on creating your rule, please review this documentation and examples:

* <https://www.atlassian.com/software/jira/guides/expand-jira/automation>
* <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/>
* <https://www.atlassian.com/software/jira/automation-template-library>

Kind regards,  
Bill
Notificatio if Target Date smaller then Today
Asked by Sven Rau:

Hello,

i want to get a notification if the target date is smaller den today.

Is it possible to configure an automation rule.

best regards


Answers:
author: Gideon Nolte _Jodocus_
body: Hi [@Sven Rau](/t5/user/viewprofilepage/user-id/5015191)

Here's an outline for the automation rule:

Trigger: Scheduled Trigger on a daily basis with issues provided via JQL: due \<= endOfDay() and due \>= startOfDay() - meaining all issues that are due today (can be changed with +1 / -1 inside the brackets to run a day before or after the due date.  
Include issues that have not been updated since the last run.

Action: Send E-Mail or whatever type of notification you want. Use smart values to create a "meaningful" message.

Hope this helps. Feel free to ask for more info or screenshots if you struggle with this.

Greetings

Gideon

comments: author: Sven Rau
body: Great! It works! :-)
Display link to new issue after action completes
Asked by Jim Rowe:

I've created a small automation to "Clone" an Issue and set some values.

Similar to how when I use the native "Clone" function, a small window will open with a link to the newly created issue. Is it possible to show that or something similar, or directly open the issue?

The point of this automation is to immediately act up the newly created item.


Answers:
author: Darryl Lee
body: Unfortunately I have not see any functionality in Automation that would allow for any user interaction.

The closest thing I've seen is when a rule Edits an issue, an alert will pop-up saying the issue has changed and you might want to reload.

It would be a pretty sweet feature though to allow a post-automation popup, and even better a way to capture user input, with user picker fields and... well, a guy can dream, right? :-}


author: Kelly Arrey
body: The closest thing that works today might be to send a Slack message (or some other kind of message):  
![2023-04-11_09h25_20.png](https://community.atlassian.com/t5/image/serverpage/image-id/251037i877C9FDD57E755E5/image-size/large?v=v2&px=999 "2023-04-11_09h25_20.png")
how to stop closing issue without linked issues are closed without any app
Asked by Rasajna Meka:

how to stop closing issue without linked issues are closed without any app


Answers:
author: Kristj?n Geir Mathiesen
body: Hi [@Rasajna Meka](/t5/user/viewprofilepage/user-id/5058734)

You will have to prevent this in the workflow. OOTB Jira does not have this feature so you will have to get a 3rd Party App to get this done, probably some scripting tool that runs a script as a Validator. Check out the [Marketplace](https://marketplace.atlassian.com) for a good candidate.

Alternatively, have Automation rule that reopens the issue

HTH,  
KGM


Tags: jira
Jira Product Discovery Automation
Asked by Boleslaw Nowak:

Hello,

I'm trying to set-up and automation within the Jira Product Discovery, so the status would change after updating the \`Roadmap\` field.

The roadmap has the following values available - \`Now\` \`Next\` \`Someday\` \`Wont Do\`, what I'm trying to set up is that when

* Wont Do value is selected for the Roadmap, the status of the idea would change to Wont Do
* And when roadmap value is one of \`Now\` \`Next\` \`Someday\` it would automatically set the status to \`To Do\`

How could I achieve this?


Answers:
author: Bill Sheboy
body: Hi [@Boleslaw Nowak](/t5/user/viewprofilepage/user-id/4464770)

What have you tried thus far to solve this?

If you have a rule started, please post images of the complete rule and audit log details showing the rule execution, and described what is not working as you expect. Those will provide context for the community to offer suggestions.

If you have not started a rule yet, what you describe should be possible with the field value changed trigger, rule conditions, and the issue transition action. To get you started on creating your rule, please review this documentation and examples:

* <https://www.atlassian.com/software/jira/guides/expand-jira/automation>
* <https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/>
* <https://www.atlassian.com/software/jira/automation-template-library>

Kind regards,  
Bill


Tags: jira-product-discovery
How can i change the reporter with a value of a text field that contains the name of
Asked by ADM Amar Msaid:

I want to change the reporter of issue and set it to another user.

i have only a text field that contains the name of the user.

how can i do this in Jira Work Management using automation script ?


Answers:
author: Darryl Lee
body: Hi, I apologize [@Ignacio Aredez](/t5/user/viewprofilepage/user-id/2252868) , but I again have to ask, have you tested what you recommended?

Because I am not aware of a 'Lookup user' action available in "Automation for Jira" (although it really does need one!)

Instead we've had to use a workaround of using an REST API call, as described here: [Populate a user picker field from the description field](https://community.atlassian.com/t5/Jira-Service-Management-articles/Populate-a-user-picker-field-from-the-description-field/ba-p/2134905)

[@ADM Amar Msaid](/t5/user/viewprofilepage/user-id/4744840) so to get the user ID, you would need to follow those instructions, and your API call would look something like:
> <https://YOURSITE.atlassian.net/rest/api/2/user/search?query={{issue>."Your Fieldname".urlEncode}}

ALSO, it's good to remember that the [/user/search query](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-query-get) is a not an exact match, so if there are say, multiple users with the same name, it will find all of them, but in the example, they are only setting Reporter to the **first** match.


author: Valerie Knapp
body: Hi [@ADM Amar Msaid](/t5/user/viewprofilepage/user-id/4744840) , thanks for your question.

I have understood you want an automation to substitute the reporter of an issue with another user.

The choices for who you can substitute with the reporter in the cloud are quite limited, as you can't just insert a username.

You can either COPY the reporter from another person entity in the ticket, like this

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

Or SET the reporter, again specifying a user or someone who has a relationship with this issue -

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

I hope this helps but if not, please can you give some more context for what you are trying to achieve? Then either I or someone else can try to help.

Cheers
How to use automation to link issues from different Jira servers?
Asked by Nick Blokker:

I currently have a rule active that automatically links Jira's based on comments, this all worked out well until one of the Jira projects moved to their own server.

I can enforce users to manually link, that functionality is enabled for them and works fine. Ideally, I'd like to run the automatic rule again for this though.

Is it possible to utilize the Automation rules to link between different project servers?

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


Answers:
author: Tessa Tuteleers
body: Hi [@Nick Blokker](/t5/user/viewprofilepage/user-id/5190652) ,

welcome to the community!

It is possible with automation, however, it will take a little more action than just doing it in the same instance.

I found some very descriptive [documentation](https://confluence.atlassian.com/jirakb/how-to-create-and-link-remote-jira-issues-using-automation-1085209850.html), where the cover creating and linking issues across different sites. You could use part of this to cover your requirements.

The doc is a little older, but as the [feature request](https://jira.atlassian.com/browse/JSDCLOUD-3746) to handle this easier is still open, I assume it is still the best way to handle this.

Please also vote on / watch the FR to help get this on the radar of Atlassian.

Hope this helps!

- Tessa

comments: author: Nick Blokker
body: That FR would be golden! Voted and watching. Thank you for finding that and the documentation for the current workaround.


Tags: cloud

link
Automation Rules
Asked by Rukhsar Qureshi:

Hi,

I want to create one automation rule like - When the workflow status is marked as DONE then move the issue to a different project with different status (ex TO DO)

In short, I want issues to be moved to PROJECT B's to-do list when marked done from PROJECT A.

Kindly suggest an automation rule for this.

Thanks and regards,

Rukhsar


Answers:
author: Mohamed Benziane
body: Hi,

There is not move action in Automation, so you can only clone the issue in a different project if you want.

The clone action will set the status to the first workflow step in the target project.

![2023-04-07 13_23_20-Automation - The Jira of Champions.png](https://community.atlassian.com/t5/image/serverpage/image-id/250460i5AE1B798A193FA17/image-size/large?v=v2&px=999 "2023-04-07 13_23_20-Automation - The Jira of Champions.png")

comments: author: Rukhsar Qureshi
body: Thanks [@Mohamed Benziane](/t5/user/viewprofilepage/user-id/1531125) .

I tried this, but unfortunately, it is giving me "Some errors" on running the automation.

Kindly suggest the needful

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


author: Mohamed Benziane
body: make sure that the user you're using to run the rule have the correct permission in both project


author: Rukhsar Qureshi
body: It worked now, thanks for your help [@Mohamed Benziane](/t5/user/viewprofilepage/user-id/1531125) .
Rule when a fields value is changed
Asked by Linus Johansson:

Hi,

Im really new to Jira and I have been asked to create a rule that sends an email to the reporter when the assignee changes the priority.

The rule I set up is basic and it works fine:

When: value changes for:

Priority

Then: Send Email

But if I create a new ticket as a user, I still get this email stating that we have changed the priority. How do I stop the rule from sending that email? I only want it to send the email if the assignee changes the priority.


Answers:
author: Tansu Akdeniz
body: Hi [@Linus Johansson](/t5/user/viewprofilepage/user-id/5187658)

Welcome to the community.

You can try this one:

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

comments: author: Linus Johansson
body: Thanks! it worked.

But follow up questions:

1. What does it mean that condition?

2. Only if the ticket is assigned, you get the email. How come?


author: Tansu Akdeniz
body: You are welcome!!

This advanced condition checks whether the user who initiated the priority change is issue assignee or not.
Assets automation, create ticket if user turns inactive.
Asked by Eddie:

I have objects that has attribute called "Product owner", and i was wondering if its possible to make a automation that makes a ticket when/if the user turns inactive.  

What I have tried is, making a Scheduled event that checks objects that has a "product owner" and if the user is inactive, then create jira ticket.

Can't get it to work.

Any suggestions?

Thanks in advance.


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

For a question like this, I recommend posting images of your complete automation rule and the audit log details showing the rule execution. Those may provide context for the community to offer suggestions. Thanks!

Kind regards,  
Bill

comments: author: LeAnne Sobota
body: We are trying to do the same thing as well. I attempted to use a scheduled event but get error ...

Error {#toc-hId--441194573}
---------------------------

The rule has been configured with components that require issues to be provided by the trigger. You need to use the option to run JQL to provide issues. The following components require issues: Re-fetch issue data, Issue condition

... and haven't been able to find a way to do this.

We recently migrated to cloud from on-prem and lost a BUNCH of functionality that Insight had and Asset just ... doesnt.


Tags: database

insight

server
How to get the users list by automation
Asked by jaison dsouza:

Hi I want to write an automation which lets me know how many users in my JIRA who has access but has 0 tickets assigned to them and trigger an email to specific users with this report saying out of 103 users in JIRA software 10 users with the user details have no tickets assigned to them.


Answers:
author: Bill Sheboy
body: Hi [@jaison dsouza](/t5/user/viewprofilepage/user-id/5185295)

First thing, it appears you have duplicated this question with another post: <https://community.atlassian.com/t5/Jira-Software-questions/How-to-get-the-users-list-by-automation/qaq-p/2318264> Please consider closing out one of them.

Next, *what problem are you trying to solve by doing this?* Knowing that may help to community to offer other suggestions. And, often people on teams collaborate. So it is likely many users do not have assigned issues at any given time. For example, consider teams using Pair Programming or Mob Programming, where only a single person would be assigned, regardless of the number of collaborators. Checking issue assignment may be measuring something that has nothing to do with the problem you are trying to solve.

Finally, you are asking about detecting the *absence of information*, which is more difficult in Jira. That cannot be done with out-of-the-box features of automation rules, JQL, etc. because most functions regarding assignment are indeed based on issue assignment. One complicated work-around could be an automation rule calling the REST API to get all users and repeated checking for issues counts; this would be a bad idea, as the rule would likely run up against service limits for rule execution. Looking for a marketplace addon might be a better idea.

Kind regards,  
Bill
#lookupIssues not returning any values
Asked by Kunal Kumar:

[@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)

Use case : For each reporter , all the issues he has created without mandatory tags a consolidated email needs to be sent with jira links of all the issues.

Using issue.toUrl simply sends one email per issue ( ex 5 emails for 5 issues ) \& #lookupIssues is sending emails with blank body. Below are the screenshots :

![20230330_232014-min.jpg](/t5/image/serverpage/image-id/249326iCDC3E2D6AD13E48E/image-size/large?v=v2&px=999 "20230330_232014-min.jpg")![20230330_232025-min.jpg](/t5/image/serverpage/image-id/249327i8D93C33F5FF0AD9E/image-size/large?v=v2&px=999 "20230330_232025-min.jpg")![20230330_232043-min.jpg](/t5/image/serverpage/image-id/249328i617D37B6750A39D2/image-size/large?v=v2&px=999 "20230330_232043-min.jpg")


Answers:
author: Bill Sheboy
body: Hi [@Kunal Kumar](/t5/user/viewprofilepage/user-id/5183825)

To use the {{lookupIssues}} smart value, you need to first call the Lookup Issues action. Please try this change to your rule:

* trigger: scheduled *with no JQL*
* action: lookup issues with the JQL you previously had in the trigger
* action: send your email

Kind regards,  
Bill

comments: author: Kunal Kumar
body: Get it , but I am on JIRA server and lookup issue action is not available for me to use. Is there any other way I can achieve this use case ?


author: Bill Sheboy
body: Thanks for clarifying, as your post indicated you were using Cloud but you are actually using Server/Data Center.

The Server/Data Center version has an option for bulk-issue processing. This is a setting you select either with the Scheduled Trigger with JQL or with a Branch. After enabling the setting, you would use the {{issues}} rather than the {{lookupIssues}} smart value. <https://confluence.atlassian.com/automation/run-a-rule-against-issues-in-bulk-993924653.html>

You can use your original rule with JQL in the scheduled trigger, enable bulk processing, and replace {{lookupIssues}} references to {{issues}} Please note that is plural {{issues}} for bulk-issue handling.


author: Kunal Kumar
body: Thank you so much [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) Worked like a charm


Tags: cloud