Autopopulate the parent issue ID to Sub:Task Description field during the creation of the Sub:Task issue type and the auto poulated description should be "See parent ticket xxx-1234" and parent id should have a hyperlink. Please help me how to achieve this.
At below i'm attaching the screen shot where i entered manually.
Note- we are using scriptrunner in our organization.
Thanks,
Siva.
Hi @siva Apply Custom script post-function on subtask workflow to display parent issue key in Subtask description field.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.UpdateIssueRequest
//import com.atlassian.jira.config.properties.APKeys
//def baseUrl = ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL)
issue.setDescription("${issue?.getParentObject()?.getKey()} is the parent issue key")
Hope it works for you!
Thanks
V.Y
Thanks for the reply and the above mension script works thank you very much for your help.
Thanks,
Siva
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.
Hi @siva
You will need to use a post function that overwrites the description with the parent's key.
Here are the details: https://library.adaptavist.com/entity/copy-field-value-from-parent-issue-to-sub-task-upon-creation
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Fabian Lim
Thanks for the early reply gone throw the script but actually i'm new to the scriptrunner so, i'm bit confused can you please paste the modified script code that shows parent issue key ID in description field in Sub:Task
Example : See parent ticket Siva-1234 here Siva-1234 is parent issue key ID
Thanks for the help truely appreciated
Regards,
Siva
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.