Forums

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

scripted field to show parent issue value to subtask

Omprakash Thamsetty
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.
April 11, 2019

Hi,

How to write scripted field code to get parent value and show it in subTask. My field type is cascade select list field. 

ex: Support Tools ( values like ) Atlassian  - Jira

                                                                      confluence

                                                   Rational - CC

                                                                   CQ

so If I select Atlassian and Jira then that value should show in subtask as 2 different scripted field (Parent_A and Parent_B). How to write this code in scripted field ?

Thanks,

Om

1 answer

0 votes
Mohamed Adel
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.
April 11, 2019

@Omprakash Thamsetty 

 

import com.atlassian.jira.component.ComponentAccessor


def customFieldManager = ComponentAccessor.getCustomFieldManager()
def parentValue_A = customFieldManager.getCustomFieldObject(11002).getValue(issue.getParentObject()).value.toString()

return parentValue_A


do the same with ParentValue_B

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events