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

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error in groovy, unable to create dashboard using portletConfigurationManager.addDashBoardItem

We are trying to create an dashboard using groovy script and getting error. Find below details. Jira version 8.2.0

import com.atlassian.fugue.Option
import com.atlassian.gadgets.dashboard.Color
import com.atlassian.gadgets.dashboard.Layout
import com.atlassian.jira.bc.JiraServiceContext
import com.atlassian.jira.bc.JiraServiceContextImpl
import com.atlassian.jira.bc.portal.PortalPageService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.jql.parser.JqlQueryParser
import com.atlassian.jira.portal.PortalPage
import com.atlassian.jira.portal.PortletConfigurationManager
import com.atlassian.jira.sharing.SharedEntity

def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser
JiraServiceContext sourceUserServiceCtx = new JiraServiceContextImpl(user)

def portalPageService = ComponentAccessor.getComponent(PortalPageService)
def portletConfigurationManager = ComponentAccessor.getComponent(PortletConfigurationManager)
def searchRequestManager = ComponentAccessor.getComponent(SearchRequestManager)
def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser)

def dashboardTemplate = new PortalPage.Builder()
.name("My new dash")

def query = jqlQueryParser.parseQuery("project = JRA")

// share filter globally
def templateSearchRequest = new SearchRequest(query, user, "JRA issues", "my description")
def newSearchRequest =searchRequestManager.create(templateSearchRequest)

// note that portal page names must be unique per user
if (! portalPageService.validateForCreate(sourceUserServiceCtx, dashboardTemplate)) {
return sourceUserServiceCtx.errorCollection

def targetDash = portalPageService.createPortalPage(sourceUserServiceCtx, dashboardTemplate)

portletConfigurationManager.addDashBoardItem(, 0, 0,
'isConfigured': 'true',
'refresh' : '15',
'sortColumn' : '',
'columnNames' : 'issuetype|issuekey|summary|priority',
'num' : '10'

portletConfigurationManager.addDashBoardItem(, 1, 0,
"filterId" :,
'isConfigured': 'true',
'refresh' : 'false',
"isPopup" : "false",
'columnNames' : 'issuetype|issuekey|summary|priority',
'num' : '10'


Error: groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.portal.PortletConfigurationManagerImpl.addDashBoardItem() is applicable for argument types: (java.lang.Long, java.lang.Integer, java.lang.Integer, com.atlassian.fugue.Option$Some, com.atlassian.gadgets.dashboard.Color, java.util.LinkedHashMap, com.atlassian.fugue.Option$2) values: [10601, 0, 0, some(rest/gadgets/1.0/g/com.atlassian.jira.gadgets:assigned-to-me-gadget/gadgets/assigned-to-me-gadget.xml), ...] Possible solutions: addDashBoardItem(java.lang.Long, java.lang.Integer, java.lang.Integer, io.atlassian.fugue.Option, com.atlassian.gadgets.dashboard.Color, java.util.Map, io.atlassian.fugue.Option) at

1 answer


I think your code is from ScriptRunner example to create Dashboards and Gadgets

There is an error, at least for JIRA versions over 8.2, I haven't tried in others.

Change import com.atlassian.fugue.Option for import io.atlassian.fugue.Option that should be enough if you are using mentioned example. 

I just faced that issue using that code, and applying that change it worked.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

290 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you