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

How to update description via script in automation rules?

Gyorgy Dani-Rauf January 22, 2020

Hi there,

I am trying to update the description field using a script within project automation.

I have the script which process the description line by line and make the changes if the conditions apply but I can't "save" the changes.

I am trying issue.setDescription(output) where output is the result of the process and contains the amended content of the original description.

I tried to run the script in the Console where I didn't get any error message, but the actual update of the ticket didn't happen. The same script gave me "Cannot find matching method" error in the automation code console.

Can anyone help me out what am I doing wrong and what's the difference between the 2 console window?

I have a similar script which is working via behaviour but in this case the request is coming in email, so I guess behaviour is not an option, or am I wrong?

Any help would be appreciated.

Thanks in advance.

PS: Jira 8.3.3 & Service Desk 4.3.3 with Automation for Jira 7.0.0 & Adaptavist Scriptrunner for JIRA 5.6.8.1-jira8

1 answer

1 accepted

0 votes
Answer accepted
Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2020

Hi @Gyorgy Dani-Rauf,

Are you using Scriptrunner? if so where you placed your code post-function or in listener?

can you share your script and the error log you got?

issue.setDescription("String") //this will work in workflow post-function

 

BR,
Leo 

Gyorgy Dani-Rauf January 23, 2020

Hi @Leo

Thank you for your suggestion it's working fine as a workflow post-function.

Yes, we are using Scriptrunner.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events