Is it possible to put Javascript in a custom field description that will execute on an event

Jesse Eversole January 12, 2021

I need to test the execution of javascript on a checkbox click event. The end goal is to call an external server that updates the issue with any changed status of the issue. I am attempting to test this on my private cloud account, but the research is for a on-prem enterprise install where the external server is on-prem. I read that javascript cannot be invoked in the description field of a custom checkbox on the Jira cloud. Is that the case?

4 answers

0 votes
habib rahman
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 12, 2021

Getting Started. Add a new custom field, then choose Advanced and then Scripted Field. Give it a name and associate it to any screens you need. Note, it won't be displayed on Create or Edit screens

Nic Brough -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.
January 12, 2021

That's not how scripted fields work, they don't inject javascript.

0 votes
Nic Brough -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.
January 12, 2021

Javascript is the wrong way to do this, even if you could get it to work.

"The end goal is to call an external server that updates the issue with any changed status of the issue"

is something you should be doing with webhooks or post-functions if you mean Jira needs to tell another server something, or the REST API if it's the other system wanting to update Jira.

0 votes
Prince Nyeche
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 12, 2021

Hey @Jesse Eversole Javascript won't be executed on Cloud, these are part of Cloud's restricted functions. So if you want to test such, it's better you get a Jira Server instance to test it up.

0 votes
Jimmy Seddon
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 12, 2021

Hi @Jesse Eversole,

This is true.  I had taken advantage of this on Jira Server before we migrated to Cloud and that functionality no longer worked upon migrating to the Cloud platform.

If possible, I'd recommend getting/generating a test server license and spinning up a test Jira Server you can use for these types of experiments.

I hope that helps!

-Jimmy

Suggest an answer

Log in or Sign up to answer