Forums

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

Field automation on JIRA cloud

Pooja Singh December 17, 2019

Greetings,

I am using JIRA Software (cloud) and for one of our processes we need certain automation on the edit screen of the issue.

Fields which would need automation:

  1. f1 = Checkbox (5 options)
  2. f2 = Drop down (5 options)
  3. f3 = Drop Down

Scenario:

  • After creation of the issues, relevant project owners / admin will keep entering the check boxes manually.
  • Depending on the number of check boxes selected, f2 will be updated.
  • Once all the check boxes are checked while updating the f2 field, f3 should be visible on the screen.
  • The user should be able to select relevant values from f3

Problem:

  • Since JIRA cloud does not support Behaviour option from the script-runner plugin, I am not sure where should I implement the script.
  • I think the APIs used on JIRA cloud is different than the APIs used on JIRA server. Therefore, I am not sure if the script written on server platform will work the same way on cloud environment.

 

Please let me know if this is something that can be achieved on cloud JIRA.

Thank you in advance.

Regards,

Pooja

4 answers

1 accepted

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
December 18, 2019

Hi Pooja,

Thank you for your question.

I can confirm that the ScriptRunner for JIRA Cloud plugin is unable to perform any dynamic validation on issue forms to link or hide fields like the server version can with the Behaviors feature.

Also, I can confirm that the plugin cannot dynamically populate field values or options like it can in the server version can with the Behaviors feature.

The reason we are unable to provide this functionality is due to the restricted functionality and API's which Atlassian provide inside JIRA Cloud, due to the fact that Atlassian only provides a Rest API in Jira Cloud and not the same Java API that the server version contains.

You can see more detailed information on the differences between ScriptRunner for JIRA Cloud and ScriptRunner for JIRA Server inside of the documentation page located here.

This means that unfortunately that your requirement of dynamically populating the options of the f2 field and then making the f3 visible once all options are selected cannot be achieved with ScriptRunner for Jira Cloud due to the reasons explained above.

Regards,

Kristian

Pooja Singh December 19, 2019

Hello @Kristian Walker _Adaptavist_ 

Well that's sad :(

Thank you so much for your quick response.

Thanks & Regards,

Pooja

0 votes
Ilan Yaniv
Contributor
October 1, 2020

Hi,

You can always use the REST API for Jira and connect it to a webhook to start the automation.

We (@kaholo.io) are doing also doing automations via REST and you are welcome to have a look at our Open Source plugins :-)

https://github.com/Kaholo/kaholo-plugin-jira/tree/develop

0 votes
Leonard Chew
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 18, 2019

Hi Pooja

There might be a hack-solution with Scriptrunner.

I'm not familiar with the cloud version, but if you have access to script fragments, you can inject javascript and css to your issue screen, meaning you can practically do anything on your GUI (client-side).

In this post, I have helped someone hide the "assign to me" link based on some data-conditions. 

Maybe it helps, but then again... it IS a hack ;-)

Leonard Chew
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 18, 2019

... ah, sorry, it applies to the issue screen and not the edit screen, for which you are looking for a solution.

Kristian Walker _Adaptavist_
Community Champion
December 18, 2019

Hi Leonard,

Thank you for your suggestion.

I can confirm that the linked post above will only work on Jira Server as Jira Cloud does permit injecting JavaScript as Atlassian restricts this in Jira Cloud.

This means that Script Fragments are limited in ScriptRunner for Jira Cloud and in Jira Cloud work in their own Iframe and are not permitted to access fields or values on an issue.

This, unfortunately, means that as per my previous response there is no way to dynamically hide or modify fields in Jira Cloud with ScriptRunner for Jira Cloud.

Regards,

Kristian

Like # people like this
0 votes
John Funk
Community Champion
December 17, 2019

Hi Pooja - you might try Automation For Jira. It will not fire an action (like updating F2) until F1 is actually saved, not just updated as you click a box. But that might get you what you need. 

Pooja Singh December 17, 2019

Hello @John Funk ,

The thing is we have already purchased JSU, Script runner and other bigger plugins and doesn't look like we will be opting for new plugins this soon.

Is it not something that can be achieved through script runner plugin?

It would be a great help if it gets resolved by script runner itself (although I will checkout this plugin for my reference).

Thanks & Regards,

Pooja

John Funk
Community Champion
December 18, 2019

Hopefully some of the ScriptRunner folks on here can help you out.  :-)

Like Pooja Singh likes this

Suggest an answer

Log in or Sign up to answer