Script Runner configuration for "Parent" Field.

Ganesh Choubey D
Contributor
April 3, 2024

Hello Community,

    I was palying around some behavoiur on the Script runner Cloud ,i came across some behaviour changes to be made  in the "Parent" field

Ex: getFieldById("Parent").isRequired()

 

    There are many such behaviour script can anyone help me in the mapping of Parent Filed in the code, as the Parent is a system field i cannot use the ID for the field,is there any way i can access the parent value.Thanks in Advance.

 

Thanks & Regards,

Ganesh

 

 

1 answer

0 votes
Rebekka Heilmann _viadee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2024

Hi @Ganesh Choubey D 

Do you want the Field "Parent Link" to be required?

You could use ->  getFieldByName('Parent Link') 
Be aware, that if you are working with translations, you'll have to check for any translated value as well.

You could also check the ID of the field in the Administration. Go to Issues > Custom fields -> find the field "Parent Link" > click on "..." > View field information -> Check the last part of the URL
It should look something like: https://your-site.atlassian.net/secure/admin/ConfigureCustomField!default.jspa?customFieldId=10018

 

Ganesh Choubey D
Contributor
April 4, 2024

Hi @Rebekka Heilmann _viadee_ 

Thank you for the quick response as the "Parent Link" is no longer used and "Parent" field is used as the merging of "Epic Link" and "Parent Link"

Ref Article: https://community.atlassian.com/t5/Jira-Software-articles/Introducing-the-new-Parent-field-in-company-managed-projects/ba-p/2377758

is there any way i can use the parent Field itself for my scripts.

 

Thanks & Regards,

Ganesh

Rebekka Heilmann _viadee_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 5, 2024

All fields work the same way when it comes to that part of Scriptrunner. Just pick the field by ID or name like I described above.

Sean Chua _Adaptavist_
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 12, 2024

@Ganesh Choubey D , as Rebekka has mentioned, you can use the getFieldbyName for system fields. It is likely just "Parent"

For the other Custom Field ID's, you can use this and it will give you a text vomit of your custom fields and ID's. Not very pretty.

{Jira base URL}/rest/api/latest/field

Regards,
Sean

Suggest an answer

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

Atlassian Community Events