Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sub task is not getting created when i create it automatically with post function

Deleted user February 15, 2021

and i am not finding Fire a Sub Task Assigned event that can be processed by the listeners

1 answer

1 accepted

0 votes
Answer accepted
mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 15, 2021

Hi @[deleted],

Welcome to the Atlassian community.

You can find the list of System events here - never seen Sub Task Assigned event before.

Would you be able to elaborate more on this request?

Thanks,
Moga

Deleted user February 16, 2021

Yes it was not in list, I have added "Sub Task Assigned" event and selected for sub-task creation and it got created in JIRA server but not working same in cloud

Let me update my issues in cloud version:

1. I have created sub-task by selecting script runner, seems it is getting created but the page is not getting refreshed/reloaded, created sub-task will appear only when we refresh the browser or click on the issue summary.

2. How do I concatenate Issue summary+sub-task summary for subtask? please help.

mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 16, 2021

Hi @[deleted],

I'm quite confused now, is the initial problem solved?

1. I have created sub-task by selecting script runner, seems it is getting created but the page is not getting refreshed/reloaded, created sub-task will appear only when we refresh the browser or click on the issue summary.

  1. What do you mean by "I have created sub-task by selecting script runner"?
  2. If you have a script to create something, most of the time, the web browser would not know. Hence, we will need to manually refresh the web page to pull new data.

2. How do I concatenate Issue summary+sub-task summary for subtask? please help.

  1. How are you performing the sub-task creation? 
Deleted user February 17, 2021

When I am creating a Story I am also creating a Sub-Task automatically as below:

1. Select "Create" transition

2. Click on Post Function

3. Click on Add Post Function

4. Select ScriptRunner Post-Function

5. Create Subtask

6. Add Subtask summary

7. Issue Type Sub-Task

8. Add

I will be able to see the sub-task only when i click on the Issue summary or refresh the browser

mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2021

When you create a new issue, you will have this pop-up:
image.png

Once I click on the link, the opens the issue and I can see the subtask creation by the post-function.

For this:

2. How do I concatenate Issue summary+sub-task summary for subtask? please help

I did this on the post-function:
image.png

You will need to customize the subtask.fields.summary on the code above.

Deleted user February 17, 2021

Thanks for your reply:

1) That's the problem I have, when I click on the issue summary sub task will not be seen until I refresh the page

2) And for concatenating task and subtask summary, I did as below and it is working fine, your code seems simple enough

def issueSubTasks = ((List)issue.fields.subtasks).size() ?: 0
issueSubTasks ++
subtask.fields.summary = "${issue.fields.summary} : Subtask Summary"

mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2021

@[deleted] 

1) That's the problem I have, when I click on the issue summary sub task will not be seen until I refresh the page

No idea about this - it works perfectly fine on my end. It could be something to do with the browser or some specific Jira Cloud instance.

2) And for concatenating task and subtask summary, I did as below and it is working fine, your code seems simple enough

def issueSubTasks = ((List)issue.fields.subtasks).size() ?: 0
issueSubTasks ++
subtask.fields.summary = "${issue.fields.summary} : Subtask Summary"

What's the purpose of the following line?

def issueSubTasks = ((List)issue.fields.subtasks).size() ?: 0
issueSubTasks ++
Deleted user February 23, 2021

Removed the below Two lines the subtask summary is fine but i still have the page refresh issue

 

def issueSubTasks = ((List)issue.fields.subtasks).size() ?: 0
issueSubTasks ++

 

Thank you

mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 23, 2021

but i still have the page refresh issue

I could not reproduce this on my end. Have you tried to check if this is happening in a different browser or a different Jira Cloud instance?

Deleted user February 24, 2021

Tried in all the browsers, issue still exists ad i have only one instance

 

Thank you

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events