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
Hi Jamsahaid,
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.
Thanks, John
I will dig into it. I am already an Admin so that won't be an issue to me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jamshaid
One more automation source for you is the new automation template library, which demonstrates many common use cases:
https://www.atlassian.com/software/jira/automation-template-library#/label/all/1453
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy @John Funk Could you please guide me about how can I get it working using code? I am not getting the library. Thanks a lot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can’t get to the list of rules?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jamshaid
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:
https://support.atlassian.com/jira-software-cloud/docs/smart-values-text-fields/
https://support.atlassian.com/jira-software-cloud/docs/smart-values-lists/
__Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.