Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Error creating a sub-task with ToDo Custom Field plugin from post-function using Script Runner plugin

Roberto Marquez Bittencourt May 19, 2015

I have a transition on workflow when i create a sub-task using the Script Runner plugin. The sub-task have a custom field named "Checklist" from ToDo List Custom Field plugin (https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.todolist) that have default options previously set.

After execute this transition the sub-task is created, however this custom field is corrupted. Don't show any options and can't be edit:

2015-05-19_todoError.png

If i created the sub-task manually the custom field appears correctly:

2015-05-19_todoCorrect.png

  • Jira Version: 6.3.1
  • ToDO List Version: 1.9.7
  • Script Runner Version: 3.0.16

I don't know what i'm missing.

Thank you for your help in advance!

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Andrey Markelov
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.
June 7, 2015

Hello,

Custom field should have value in json. Try, please, []

0 votes
Roberto Marquez Bittencourt May 29, 2015

Hello, Andrey.

    I set a default value to the ToDo List Custom Field in Custom Fields configuration with four items. The field is placed in the default screen of subtask "Contract Renew". In the workflow i used the script "Create subtask" from ScriptRunner and in the field "Additional issue actions" i set the summary of the subtask and disable copy links and attachments. I don't set any values to the ToDo List Custom field.

import com.onresolve.scriptrunner.runner.util.UserMessageUtil
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.ComponentManager
def resumodemanda = 'Contract Renew: ' + cfValues['Contract Number']
resumodemanda.length() <= 255 ? (sumario = resumodemanda) :  (sumario = resumodemanda.substring(0,255))
issue.summary = sumario
checkLink = {link -> false}
checkAttachment = {attachment -> false}
UserMessageUtil.success('Subtask Contract Renew created success!')

     When i create the subtask manually it works ok.

Thanks in advance.

0 votes
Andrey Markelov
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.
May 28, 2015

Hello,

 

What value do you set into field via scriptrunner?

 

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events