You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi team,
Using scriptrunner I have been able to create a board, which creates a custom filter. I now want to be able to configure that custom filter in the same script so that it has a predefined JQL query.
Code as per below.
import com.atlassian.greenhopper.model.validation.ErrorCollection
import com.atlassian.greenhopper.service.rapid.view.RapidViewService
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
import com.atlassian.greenhopper.web.rapid.view.RapidViewResource.CreateResponse
import com.atlassian.greenhopper.web.rapid.view.RapidViewFilterHelper
import com.atlassian.greenhopper.web.rapid.view.RapidViewCreateModel
import com.atlassian.greenhopper.service.rapid.view.
@WithPlugin("com.pyxis.greenhopper.jira")
@JiraAgileBean
RapidViewService rapidViewService
@JiraAgileBean
RapidViewHelper rapidViewHelper
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def errorCollection = new ErrorCollection()
// create a new board for project JRA
def projectIds = [ComponentAccessor.getProjectManager().getProjectObjByKey("ATP").id as String]
def outcome = rapidViewHelper.createRapidViewForPreset(currentUser, sourceIssue.summary + " Board", projectIds as Set, "scrum")
log.debug outcome
if (! outcome.isValid()) {
log.warn ("Failed to create board: ${outcome.errors}")
return
}
log.info ("Create board successfully.")
Hi George ,
We also have a similar requirement for adding custom filters using script. Did you find any solution to it?
Thanks In Advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.