Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


add a postfix to a string v.getName() for a collection of strings in groovy for Jira scriptrunner

I would like to add a postfix called "-Inbox" to each of the elements of a collection of strings. Here is my current approach:

def matchedVersions = issue.getFixVersions().intersect(
def mynewVersions = new ArrayList <Version> ()

 for( Version v: matchedVersions){
           Version mynewVersion= ComponentAccessor.versionManager.createVersion(v.getName()+"-Inbox", startDate, releaseDate, description,, scheduleAfterVersion, released)

Is there a simpler approach that I could use to avoid the loop, the action I am doing is repetitive and takes time and I would like to find a new approach. I just need to create a new varaible called mynewVersions which is identical to matchedVersions with the only difference being that the name of each version has the postfix "-Inbox" appended.

0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events