Hi, I want to have an automation. We have a custom field, text type. We want to copy the project key as its value automatically when creating the issue. Please tell me any way that can make it happen. Thank you so much.
Hi Jason,
There certainly is.
Create an automation that triggers on issue create. Then add an action "Edit issue". Here you can select the field to edit.
For the project key you should try this smart value: {{issue.project.key}}
Extra info concerning smart values you can find here:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
Regards,
Jeroen
Hi Jeroen, we're using Jira server. Is this can be done? I didn't see where to create an automation and the documentation is about Jira cloud, right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It can if you install the Automation app to support automations. There are other apps that allow you to write scripts or update fields automatically.
I do want to question the desire for this though. What problem would duplicating the project key solve? The duplicate is utterly redundant plan text. I can't think of any use for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic, We are using Adaptavist ScriptRunner for JIRA. Is there any function can do that?
The user just wants to make this kind of custom field and when the issue has been cloned and moved to another project, or related with other project's issues, the value can be added automatically.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry, but "the user wants to do this" does not tell us what problem they are trying to solve.
You can do it with Scriptrunner, I'm just questioning the point. The data is in the history and you can still visit the old issue key and find where it has gone to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not trying to solve problem, just wants to tag the issues with the original issue's information, for the report. But anyway, thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If there's no problem here, why are you trying to do this?
Your user has asked to duplicate data they already have into another field. Why? Of what use is this? They would not have asked if they did not have a problem with it. So what is that problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a request, not a problem. The user wants to count the relations with leading stories and supporting stories and tests and bugs. They want to have a field contains the related issue's key. We have created a script runner listener to do that. No more questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am sorry, I am not making myself clear.
Why do they want this duplicated field? What would tell them? What is the problem you're trying to solve with it?
You've said "count relations" - this field is not going to help you do that. Your issues are related to others by issue links, Epics and sub-tasks. The project key tells you nothing about relations or history,.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.