Forums

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

Creating a Template Comments (Jira Service Management) does not work

Marco Brundel
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 Champions.
June 21, 2021

Hi,

With Template Comments (Jira Service Management) in Scriptrunner I want to create a template comment that also prints the value of a custom field in the comment.

I've gone through the documentation at https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts/template-comments.html, but unfortunately I can't get the comment to work.

In Template I’ve the code

 

Dear $customerFirstName,

The name of the created Backoffice is $backofficeCf

Nice!

 

In Condition/Code I’ve

import com.atlassian.jira.component.ComponentAccessor

def customFieldManager= ComponentAccessor.getCustomFieldManager()

def backofficeCf = customFieldManager1.getCustomFieldObjectByName("Backoffice name")

 

But I get the warning

Variable “customFieldManager” masks a binding variable of the same name.

I just don't understand how to solve this.

Anyone have any tips to solve it?

Thank you very much,

Regards Marco

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Alla Austin
March 17, 2021

I have the same issue and looking for the solution.. Were you able to find the solution?

TAGS
AUG Leaders

Atlassian Community Events