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.

×
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

How to create a board using a saved filter via Scriptrunner?

Hi there, I'd like to modify this script to create a board, but instead of tying it to a project, use a saved JQL filter. Any help ? Thanks!

 
import com.atlassian.greenhopper.web.rapid.view.RapidViewHelper

import com.atlassian.jira.component.ComponentAccessor

import com.onresolve.scriptrunner.runner.customisers.JiraAgileBean

import com.onresolve.scriptrunner.runner.customisers.WithPlugin


//Create Board


@WithPlugin('com.pyxis.greenhopper.jira')

@JiraAgileBean


RapidViewHelper rapidViewHelper

def currentUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser

def projectManager = ComponentAccessor.projectManager



def projectIds = [projectManager.getProjectObjByKey("PTDEMO").id as String]

def outcome = rapidViewHelper.createRapidViewForPreset(currentUser, "Testing Board Create", projectIds as Set, "kanban")

log.warn outcome


if (!outcome.valid) {

log.warn "Failed to create board: ${outcome.errors}"

}

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Nic Brough -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.
Aug 09, 2023

Hi Julia,

Replace the createRapidViewWithPreset with createRapidViewWithFilter (user, name, filter id, kanban/scrum)

TAGS
AUG Leaders

Atlassian Community Events