Forums

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

Initialiser not working when mapping issue types

Hunter1428
Contributor
September 20, 2022

Hi all,

When mapping a behaviour to a single, multiple individually selected or all individually selected issue types the initialiser fails to work. If mapped with "All Issue Types" it works without fail. 

I'm trying to map this code to a single issue type. Here is the example code I am using:

def desc = getFieldById("description")

 

def defaultValue = """

Here the template...

""".replaceAll(/ /, '')

 

if (! underlyingIssue?.description) {

desc.setFormValue(defaultValue)

}

Would anyone have any ideas?

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Marcin Pelzner
October 17, 2018

I dont know if that helps, but you can try switching to:

Class class = ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.atlassian.servicedesk.api.approval.Approval")
def objectOfClass = ComponentAccessor.getOSGiComponentInstanceOfType(class)
Paul Stallworth
Community Champion
November 2, 2018

Hi Marcin,

Thanks for the help.  I will definitely try this the next time I'm working on it.

TAGS
AUG Leaders

Atlassian Community Events