I am having an issue created with Type 1. When a user edits the issue and clicks the update button, it should copy the values from a specific field called Confirmation(which is a customized field and I am able to get values from it).
As the update button is pressed, it should create another issue of Type 2, and copy the values from the confirmation field to a field called Gaps. Other values should be copied as well from the issue as well(if possible).
It should then take the values from the Gaps field(which I can get from a sample issue created) and create the sub-tasks for the newly created issue.
What Am I able to do?
I am able to run a script when the update button is pressed, copy values from the Gaps field and the confirmation field.
What I am unable to find?
I am unable to find the script/help to write a script which creates an issue. I am able to find a script that creates sub-fields when a new issue is created but it doesn't demonstrate how to create a new issue. Here is the script that creates a sub-task for a newly created issue.
I am new to Jira. Any help would be really appreciated. Thanks a lot
Why don't you just use Automation For Jira to do all of that? You don't need to write scripts or code and it will do all that you need.
Here is some more information to get you started:
There are two types of automation:
Automation Basics: https://www.atlassian.com/software/jira/guides/expand-jira/automation
You can do this via global rules to apply to all projects also. You'll need to be a Jira Admin/Site Admin, go to Jira Settings > System > Automation Rules (left-hand menu).
For more on using Automation For Jira see these help pages.
One more automation source for you is the new automation template library, which demonstrates many common use cases:
@Bill Sheboy I have been looking into the library you mentioned, but it seems to contradict my requirements. I have to copy data from a single field which can have several new lines and every new line will create a separate sub-task. The field is named Gaps, which means that it will have multiple gaps and every gap will create a new subtask. Can I achieve them in your suggested library? I don't find a way to do that. thanks a lot
Thank you for clarifying...
Do you know the possible values that could be in the Gaps field (it is a defined list of values), or is it completely dynamic (unknown in advance)? If it is completely dynamic, I do not know any way to do this with smart values and automation. There is no generic iterator for looping without the context of an issue list, or list within an issue.
If instead Gaps contains a known list of values...
Here is the documentation of text and list handling functions to help you:
Hello Community! My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. In this video, I'll share my favorite Trello templates. Templates mentioned in ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event