Automation for Jira (DC) v7.2.1 - Help needed for using ScriptRunner 3rd Party Extension

Kevin Ketchum December 22, 2020

This Documentation for using ScriptRunner 3rd Party extension for Automation for Jira clearly states the following:
Additionally there are two utility functions available for writing information and error messages to the Automation for Jira audit log. They are addMessage(String message) and addError(String errorMessage)

However, when adding either to the script, I get an error 'Cannot find matching method'.
Do I need to import any packages to get this to work? If so, what package(s) do I need to import?

2 answers

1 accepted

0 votes
Answer accepted
Italo Qualisoni [e-Core]
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.
December 23, 2020

What version of Scriptrunner are you using?

I see that in version 6.4.0 you have a different method to add error message:

https://scriptrunner.adaptavist.com/6.4.0/jira/plugins/automation-for-jira.html

errorCollection.addErrorMessage("Something went wrong") 

Kevin Ketchum January 4, 2021

Italo,  as noted on my reply to Jamie, your response got me back on track.

Thanks.

Italo Qualisoni [e-Core]
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 4, 2021

Awesome! Glad to hear it :)

1 vote
Jamie Echlin _ScriptRunner - The Adaptavist Group_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 4, 2021

There are two *actions* available for for A4J as of the most recent ScriptRunner version - https://scriptrunner.adaptavist.com/latest/jira/releases/release-notes-6.x.html#_new_scriptrunner_action_for_automation_for_jira.

Please can you confirm you are using the *new* action... the old one has "deprecated" in the name.

The addMessage and addError are only available in the new action.

A screenshot might be helpful.

Kevin Ketchum January 4, 2021

Jamie, both your and Italo's response let me down the correct path.

I installed the most recent Script Runner (6.16.0) and Automation for Jira (7.2.4) addons and then the actions worked.

 

Thanks for responding.

Jamie Echlin _ScriptRunner - The Adaptavist Group_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 4, 2021

Thanks for letting us know ;-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events