ScriptRunner - Is it possible to create/add a custom field in a Post-function (Create a sub-task)?

WS-BL October 22, 2019

Disclaimer: I am very new to both Jira and Scripting.

 

Situation: ON-Boarding process

Supervisor creates an issue for a new employee and chooses the required ressources via a checklist custom field. During the "start progress"-transition sub-tasks for the different Departments are created based on the selection in the checklist custom field.

Idea:

Create a "to-do list" checklist custom field in the subtask, whose Options are based on the checked options in the original checklist of the parent task.

e.g.: Supervisor makes a check to require a notebook for the new employee and starts the progress. The subtask now includes a checklist with an unchecked notebook-option, which can be checked after the notebook has been provided.

 

While searching the community I haven't been able to find information on creation of custom fields through post-functions
I am therefore asking if this is even possible.

 

Thank you in advance for any help on this.

1 answer

0 votes
luanlopes94 October 22, 2019

Hi,

Let's me share my opinion: you don't need to create an additional custom field to store the selected options because the fields already do that.

You can use the sub-task status to track if the notebook was provided or not.

But if you need to use the approach you share, please use anything like this topic: https://community.atlassian.com/t5/Answers-Developer-Questions/Create-Custom-Field-using-Groovy-Script/qaq-p/501997

Regards.

WS-BL October 22, 2019

Hi,

Thank you for your input.

I am trying to keep several tasks grouped in one sub-task for each department/co-worker since I'd have to create 30 and more sub-tasks otherwise,
which won't be appreciated by the users.

Therefore I am trying to create a "to-do"-list functionality without futher add-ons.

I will have a try at using the information from the link you provided and keep you updated.

Cumprimentos.

Suggest an answer

Log in or Sign up to answer