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

I cannot import classes in scriprunner

Osama Al-Areky February 8, 2024

Hello,

i want to automate some issues creation so that when I select a date field and specify the days, issue is created at each of these selected days. I want to be able to select the frequency as weekly but limited to the time period i select. I tried to apply a code for a script but i am still testing it and i am new to groovy so i am just testing in the console but it doesn't allow me to run this code and it gives error for the import of classes. What is the cause and how to solve it please?

 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.IssueInputParameters
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.bc.issue.IssueService
import com.atlassian.jira.event.type.EventDispatchOption

 

Screenshot 2024-02-08 212918.png

1 answer

0 votes
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.
February 8, 2024

Hi Osama,

Cloud and DC Jira are very very different products and Scriptrunner has to respect that.  A DC script will very rarely work on a Cloud installation.

You will need to look at what the script is trying to do, and rewrite it for Cloud.  If you could explain it to us, we might be able to point you in the right direction.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events