Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script Runner: Scripts break after update

Lisa Sun September 7, 2023

I am in the process of updating my Jira test and production servers. The test server is now updated but it caused all of the scripts in my script runner to break. Here is an example of one of the errors and the code associated with it. I have also included below the versions of my test and production servers along with the versions of their script runners.

I have the following import associated with the FileAttachments function: 

import com.atlassian.jira.issue.attachment.FileAttachments

 

Jira Prod: v9.0.0

Prod ScriptRunner: 6.42.0

Jira Test: v9.9.1

Test ScriptRunner: 8.7.1

 

 

 def attachmentDirectory = FileAttachments.getAttachmentDirectoryForIssue(
        new File(attachmentsPath),
        projectKey,
        issueKey)

[Static type checking] - Cannot find matching method com.atlassian.jira.issue.attachment.FileAttachments#getAttachmentDirectoryForIssue(java.io.File, java.lang.String, java.lang.String). Please check if the declared type is correct and if the method exists.

Possible solutions: getAttachmentDirectoryForIssue(com.atlassian.dc.filestore.api.FileStore$Path, java.lang.String, java.lang.String)

2 answers

0 votes
Mohammed Siyad
Contributor
June 25, 2024

Facing the same error, any fix for this?

0 votes
Julius Bär January 24, 2024

Hi @Lisa Sun have you been able to solve that? Is it really ScriptRunner related or Jira API (com.atlassian.dc.filestore.api.FileStore.Path)?

Suggest an answer

Log in or Sign up to answer