Forums

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

Script Listener: Create issues on project creation

Heather Stoddard September 28, 2018

If I am creating numerous issues upon epic (project creation) using the script listener, can I edit the fields after the issue has been created? For example, if I have 10 new issues created within a new epic and the script listener populates the summary and description fields, are the summary and description fields editable after the issues have been created? 

 

Thanks!

2 answers

0 votes
Tarun Sapra
Community Champion
September 28, 2018

Hello @Heather Stoddard

Once the issue has been created you would need to edit them manually as they won't be accessible after the post-function. Though you can edit the summary and description during the creation process.

 

From the docs

Create Subtask

This function will create a subtask for the issue that is being transitioned. It will not do anything for issues that are subtasks. It is possible to specify the subtask type and title along with executing additional code. Additional code will have issueInput bound as the structure that will be used in the post to /rest/api/2/issue to create the subtask. Overriding issueInput is possible by setting issueInput as part of the script.

The fields

  • Description - Logical name of the Post Function

  • Condition - Groovy code that returns boolean value determining the condition for which the subtask will be created. See Conditions for examples.

  • Issue Type - The Subtask issue type

  • Subtask Summary - The Subtask summary

  • Run As - Function can be executed either as the user that caused the transition or the ScriptRunner Add-On User

  • Additional Code - Modify the subtask structure before it is used as the POST body to /rest/api/2/issue to create the subtask

0 votes
Gezim Shehu [Communardo]
Community Champion
September 28, 2018

Hi,

 

I'm assuming that you are listening for epic creation and creating issues linked to it?

In that case after creation, ofc the fields are editable. That is if the workflow status and permission allow.

 

Maybe I'm missing something in your question.

 

Cheers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events