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

shared team & people access via scriptrunner

Shishira December 22, 2022

Hello Team...
i am trying to pull shared teams& people details via scriptrunner.

when importing packages in here - https://docs.atlassian.com/portfolio-for-jira-server/javadoc/2.13.0/ it will give error as below

The script could not be compiled: <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script264.groovy: 6: unable to resolve class com.atlassian.rm.common.core.partial @ line 6, column 1. import com.atlassian.rm.common.core.partial ^ Script264.groovy: 7: unable to resolve class com.atlassian.rm.common.publicapi.exception @ line 7, column 1. import com.atlassian.rm.common.publicapi.exception ^ Script264.groovy: 8: unable to resolve class com.atlassian.rm.common.publicapi.interfaces.base.api @ line 8, column 1. import com.atlassian.rm.common.publicapi.interfaces.base.api ^ Script264.groovy: 9: unable to resolve class com.atlassian.rm.common.publicapi.interfaces.rest.entities @ line 9, column 1. import com.atlassian.rm.common.publicapi.interfaces.rest.entities ^ Script264.groovy: 10: unable to resolve class com.atlassian.rm.portfolio.publicapi.interfaces.hierarchy @ line 10, column 1. import com.atlassian.rm.portfolio.publicapi.interfaces.hierarchy ^ Script264.groovy: 11: unable to resolve class com.atlassian.rm.portfolio.publicapi.interfaces.nonworkingday @ line 11, column 1. import com.atlassian.rm.portfolio.publicapi.interfaces.nonworkingday ^ Script264.groovy: 12: unable to resolve class com.atlassian.rm.portfolio.publicapi.interfaces.plan @ line 12, column 1. import com.atlassian.rm.portfolio.publicapi.interfaces.plan ^ Script264.groovy: 13: unable to resolve class com.atlassian.rm.portfolio.publicapi.interfaces.planaware @ line 13, column 1. import com.atlassian.rm.portfolio.publicapi.interfaces.planaware ^ Script264.groovy: 14: unable to resolve class com.atlassian.rm.portfolio.publicapi.interfaces.program @ line 14, column 1. import com.atlassian.rm.portfolio.publicapi.interfaces.program ^ Script264.groovy: 15: unable to resolve class com.atlassian.rm.portfolio.publicapi.interfaces.stage @ line 15, column 1. import com.atlassian.rm.portfolio.publicapi.interfaces.stage ^ Script264.groovy: 16: unable to resolve class com.atlassian.rm.teams.publicapi.interfaces.ability @ line 16, column 1. import com.atlassian.rm.teams.publicapi.interfaces.ability ^ Script264.groovy: 17: unable to resolve class com.atlassian.rm.teams.publicapi.interfaces.person @ line 17, column 1. import com.atlassian.rm.teams.publicapi.interfaces.person ^ Script264.groovy: 18: unable to resolve class com.atlassian.rm.teams.publicapi.interfaces.resource @ line 18, column 1. import com.atlassian.rm.teams.publicapi.interfaces.resource ^ Script264.groovy: 19: unable to resolve class com.atlassian.rm.teams.publicapi.interfaces.skill @ line 19, column 1. import com.atlassian.rm.teams.publicapi.interfaces.skill ^ Script264.groovy: 20: unable to resolve class com.atlassian.rm.teams.publicapi.interfaces.team @ line 20, column 1. import com.atlassian.rm.teams.publicapi.interfaces.team ^ 15 errors </pre>.


What is the correct pacjage to pul data related to sharedteam & people frommscriptrunner & its syntax for the same

1 answer

1 accepted

0 votes
Answer accepted
Daniel Ebers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2023

Hi @Shishira

welcome to Atlassian Community!

It is safe to say that Advanced Roadmaps and ScriptRunner are compatible?
I am asking because I found a Suggestion open with Atlassian that it is not:

From my point of view you should double check with Atlassian and/or Adaptavist what the current status of JPOSERVER-1465 is.

 

Looking around at least here is another thread discussing using Advanced Roadmaps together with ScriptRunner, probably this helps to import the right classes:

https://community.atlassian.com/t5/Jira-questions/Copy-value-portfolio-field-quot-Team-quot-in-custom-field/qaq-p/926689

Cheers,
Daniel

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2023

On server, it is a lot more compatible than Cloud - Scriptrunner can get deep into the Java API, and can reach into the Advanced Roadmaps code.

But Cloud has to do it over much more limited APIs, ones which we'd like to be extended in Server as well,

Shishira February 22, 2023

Thank you Daniel & Nic.

 

I was able to get shared team & people data using below package

import com.atlassian.rm.teams.api.team.GeneralTeamService
@WithPlugin("com.atlassian.teams")
@PluginModule GeneralTeamService teamService
def team = teamService.allSharedTeams
which helped me to resolve my requirement
Sanjivani Wayal June 20, 2023

Is there a way to access these Shared teams in JQL by giving condition for Assignee field?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events