Hi, The field "Epic Name" is confusing for our 2000+ users, so I would like it removed. But I can not remove it, or make it optional. So... next-best would be to copy the field "Summary" to "Epic Name" when an Epic is created.
Question: Can this be done with Scriptrunner on Jira Cloud?
Note that Epic Name is a required field (which can not be made optional) and that this is checked before the Post functions in a workflow...
These links didn't answer my question:
https://community.atlassian.com/t5/Jira-Software-questions/Epic-Names-vs-Summary/qaq-p/24899/jump-to/first-unread-message
http://scriptrunner-docs.connect.adaptavist.com/jiracloud/post-functions.html#_modify_issue
Anyone any luck with this?
Hi Leon,
I have created an example post function script which is located here which shows how you can set the Epic Name Field to have the value of Summary when an issue is created using a Run script post function.
This post can also be restricted to only run on Epic issue types if you add a condition to restrict the issue type into the conditions box and I have added the code for the condition as a comment in the script for reference purposes.
When adding the post function to the create transition it should come after the Create the issue originally post function so that the issue is created for the script to set the value on.
Please note that that as you say you will need to leave the Epic Name field on Screen as Jira Software will require this field to be filled in by users to create an epic, but the post function will update the field value with the value of the summary field when the issue is created.
Unfortanetly there is no way to not have users enter a value into the field before clicking the Create button as Jira mandates a value be filled in.
If this response has answered your question can you please mark it as accepted so that other users searching for a similar question can see that this is a correct answer.
Regards,
Kristian
Hi, thanks for helping out with this. Because I needed it fast, I already found an other solution by using Automation For Jira. Uses the same principle, a post function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kristian Walker _Adaptavist_ Thanks for putting together this script.
Just curious: my ideal use case would be to have a similar script execute for a Listener. i.e. On the create issue screen, as a user is typing in the Summary field, the Epic Name field is live-updating/copying at the same time. Is this doable?
This would be better UX as the end-user immediately sees the text being copied between the two fields, as opposed to needing to enter irrelevant text in Epic Name, enter proper text in Summary, create issue, and then see that text was copied over.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Johnson,
Thank you for your response.
I can confirm that is not possible to dynamically populate field values with ScriptRunner for Jira Cloud like you can in the server version can with the Behaviors feature.
The reason we are unable to provide this functionality is due to the restricted functionality and API's which Atlassian provide inside JIRA Cloud, due to the fact that Atlassian only provide a Rest API in Jira Cloud and not the same Java API that the server version contains.
You can see more detailed information on the differences between ScriptRunner for JIRA Cloud and ScriptRunner for JIRA Server inside of the documentation page located here.
However, it is possible to create a Script Listener which runs on the Issue Created event and sets the value of the Epic Name field after the issue is created to the value that you require it to have.
This is the closest you will be able to get to auto setting the Epic Name as we cannot dynamically set this as the user enters the Summary due to the fact the API's do not exist to provide this functionality as explained above.
I hope this information helps.
Regards,
Kristian
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.