Hello,
I am fairly new to Jira Cloud and Scriptrunner in Jira cloud.
I have used scriptrunner on Jira server, but it seems that its much different as I can't seem to figure this out.
I'm trying to perform a post function that updates a summary if an issue is reported by Backbone Sync.
I found the accountID but it doesn't seem to be working as I expected, so in "Condition" section of the post function I added this:
def BBSYNC="10:10alsdfkj234092u3asjdflk2342"
issue.fields.reporter == (user.${BBSYNC})
and under the Additional Code section, I added the following:
String OLDSUMMARY = "${ issue.fields.summary }"
issueInput.fields.summary = "PROD ISSUE - ${OLDSUMMARY}"
Besides solving this immediate problem, I'm looking for some guidance as to how to figure out variables and setting them properly for cloud, could someone point me to documentation that explains what is available and what isn't? This documentation wasn't helpful: http://scriptrunner-docs.connect.adaptavist.com/jiracloud/post-functions.html#_edit_post_function
Thanks in advance.
Hi Pawel,
Thank you for your question.
I can confirm that the best way to see what properties fields on an issue contain that can be set is by navigating to the Script Console and by clicking on the Get Issue Fields link located inside of the Examples section.
Using this script you will be able to return the JSON structure of an issue which has the fields you required set in order to see what properties the fields contain to see how to access or set values on an issue.
As for the reporter field I can confirm that this contains a property called accountId which must be specified when checking if the reporters accountId matches a certain user.
I can confirm I have created the snippet located here which shows how to run the Modify Issue post function when a user matches a specific account ID and to update the summary and this can be used as a reference guide to help you achieve your requirement.
I hope this helps.
Regards,
Kristian
This is great and extremely helpful. Thank you for such a detailed explanation, this is exactly what I was looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.