Some Script Runner for Jira Cloud general questions

Jens Kisters __SeibertSolutions
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 16, 2020

So, Atlassian decided to kill their awesome server product line. (Exactly how is that not f%$*ing the customer again?)

So im curious when one can do with Script Runner on Jira cloud.

I have written tons of scripts for SR on jira server, but looking at the docs im starting to get a feeling for the size of the differences.

Okay sounds like when it can't be done with the REST API it cant be done. Sounds fantastic :(

And it sounds like there's gonna be even more struggle with timing problems due to asychronous processing (even more fantastic)

So the first questions that come to my mind:

Q1. Is there a best practice to achieve something like this:

  1. Populate some fields with script runner based on some calculation
  2. Generate a PDF with Xporter that displays the results of those calculations

Q2. Is there a way to generate files in Jira SR Cloud (e.g. a csv file). And if there is how can you get it somewhere else? Is there a way to transfer files via SFTP or something like this?

 

Q3. In larger SR Server projects we put the scripts in the Jira servers file system and established a deployment mechanism.

Is there something similar in Cloud?

If i had the very same post function script in 10 different workflows is there some way to update them other than editing 10 workflows?

Thanks in advance

Jens

2 answers

1 accepted

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2020

Hi Jens,

Thank you for your questions and I can confirm that I have attempted to answer each question below.

Q1:  I can confirm in ScriptRunner for Jira Cloud that you can either create a Scripted Field or a Script Listener to populate a field with a calculated value.  Using a Scripted Field will dynamically calculate the value on the issue when it is loaded whereas using a Script Listener will allow you to put a value that has been calculated in any Custom field on an issue when an event is fired.

I can confirm we have an example of how to create a calculated value with a Script Listener in the documentation page located here which you can use as a reference.

For the second part, I can confirm that it will only be possible to generate a PDF with Xporter if the vendor who makes the Xporter plugin provides a rest API to do this and I can confirm we have a KB article located here which explains the process that we would advise using to interact with an external rest API and you will be able to use this as a reference guide to see how to interact with any API's that they provide.

Q2: I can confirm that currently inside of Jira Cloud it is not possible to generate and access files as Atlassian does not provide any access to the Jira Cloud file system via its rest API's which ScriptRunner for Jira Cloud uses.

Q3: I can confirm that currently inside of Jira Cloud it is not possible to store scripts in the file system as we do not provide this feature but I can confirm we have a request for this on our public-facing backlog located here and I would ask you to vote on this request if this a feature that you think would be useful to your organisation.

Q4: We cannot say how much slower the Jira Cloud Rest API's are compared to the Java API's on Server but we can confirm that we are constantly looking to improve the performance of our app to make scripts as performant as possible on our end once Atlassian responds to the calls made to their rest API's.

Q5. I can confirm we have recently created a new Workflows page inside of ScriptRunner for Jira Cloud which you can access at the URL of <JiraBaseURL>/plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/workflows?s=com.onresolve.jira.groovy.groovyrunner__workflows and when on this page it will show every Post Function, Condition or Validator that you have configured and you can click the ... icon next to this to edit this directly without having to load the workflow and this will save you time when you have to edit Post Functions across multiple workflows.

If you have any further questions that you would like us to assist yourself with then I would advise you to raise a new support ticket for each question that you have inside of our Jira Cloud Support Portal so that we can assist you directly on each question.

Finally, I can confirm we have created a page which outlines the differences between how the cloud and server versions of ScriptRunner work located here and I would advise reviewing this to see what functionality may be different when you switch from the Server version of ScriptRunner to the Cloud version.

I hope all this information helps.

Regards,

Kristian

Jens Kisters __SeibertSolutions
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 16, 2020

Hi Kristian,

thanks for your extensive answer, its very helpful.

Cheers

Jens

Like # people like this
Robert Bailey
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 17, 2020

Hi Jens, 

I am Support Sales Engineer here at Adaptavist working with the ScriptRunner for Jira teams. If it would be helpful I would be happy to organise a Zoom with you to go through the differences you will face when moving from Server to Cloud with ScriptRunner for Jira?

Jens Kisters __SeibertSolutions
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 17, 2020

Hi @Robert Bailey ,

if theres something you could tell be beyond Kristians explanations i'd be happy to go through the points in a zoom call.

Pick a time that would be convenient for you:

Meeting with Jens Kisters

Thanks a lot for your generous offer!

kind regards

Jens

Robert Bailey
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 7, 2021

Apologies for the delay with this, I have booked a meeting for next week. 

I am not sure I would be able to go into any more detail than Kristian's explanation for this specific issue, but if you have any other questions/challenges you are facing with your transition I would be happy to discuss those. 

If you feel this would not be useful right now, then please feel free to cancel the meeting, but if you do think a call would be useful in the future, please feel free to contact me at rbailey@adaptavist.com, and I would be happy to help!

0 votes
Jens Kisters __SeibertSolutions
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 16, 2020

Im adding questions here to make this better readable:

Q4 isnt anything you do here incredibly slow when all is done via rest? 

Sounds like theres gonna be lots of lag which limits the complexity of scripts you can run here.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events