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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,935
Community Members
 
Community Events
184
Community Groups

Initialiser not working when mapping issue types

Edited

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

1 accepted

1 vote
Answer accepted
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 22, 2022 • edited

Hi @Hunter1428

After going through your description, I have some doubts to clarify.

Firstly, could you please specify what version of Jira and ScriptRunner you are currently using?

Next, could you please share a screenshot of your Behaviour configuration?

Also, could you please clarify whether you are trying the code above on an Initialiser Behaviour or a Server-Side Behaviour?

Thank you and Kind regards,

Ram

Hi @Ram Kumar Aravindakshan _Adaptavist_ 

Here are the details you requested.

  • Jira - 7.7.2
  • Scriptrunner - 5.6.7

Being performed on the Initialiser:

Capture.JPG

Thank you

Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 23, 2022 • edited

Hi @Hunter1428

You appear to be using an unsupported version of Jira and a pretty outdated version of ScriptRunner.

The issue you are encountering seems to be related to the bug SRJIRA-2859, for which a workaround has already been provided. 

It would be best if you were to upgrade your Jira instance to at least 8.20.0 to be able to use the latest version of ScriptRunner, which has new features and other bug fixes.

Thank you and Kind regards,

Ram

Like Hunter1428 likes this

It seems the workaround on our version still has some problems.

Best option we have is updating to a newer version of both products.

Thanks you for the help.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events