Forums

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

How to run a script in jira automation?

Jamshaid
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.
February 26, 2024

I need to run a script to perform some changes on the values of a custom fields by splitting the value based on a specific string. How do I run such script in jira automation?

Thanks 

3 answers

2 accepted

3 votes
Answer accepted
Darryl Lee
Community Champion
February 26, 2024

Hi @Jamshaid --

So Jira Automation doesn't support running scripts (Bash, Python), but it might be able to do what you want using built-in functionality.

If this is a one-time thing you need to run, you could use a Manual Trigger. 

And then to update a custom field value, you would use the Edit Issue action.

Within the text field Smart Value functions, there is a split, which might help you accomplish what you are trying to do.

If you need more assistance, please provide the specifics, and we can help.

 

Jamshaid
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.
February 28, 2024

@Darryl Lee thanks for responding. I need to split this value

52-CT83 that is in custom field PROJ to 56 and CT83 and set 56 to a custom field. How do I do this using automation?

Thanks

 

 

Ramchandh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 28, 2025

@Darryl Lee

1. I want to trigger an automations script(Bash/python) from jira.

2. It should trigger an job in bamboo.

3. The job in bamboo expects arguments that has to be passed from jira to bamboo job.

4. once the job is successful, it should auto resolve the jira, 
     If it fails it should update the jira with the error message. 

Darryl Lee
Community Champion
April 28, 2025

Ohey @Ramchandh , so when I wrote this:

So Jira Automation doesn't support running scripts (Bash, Python), but it might be able to do what you want using built-in functionality.

I totally forgot about Web Requests! Also, I've only investigated Automation for Jira Cloud.

For #1, I still don't think it's possible to do that unless you're running Flask or some other kind of server that is listening for web requests.

And so... for #2, a Bamboo job can be triggered by Jira Automation. Here's a HOWTO from Atlassian:

Re #3, hrm, it looks like the only arguments you can pass are a PLAN-KEY and whether to skip branches or not.

As for #4, if your Bamboo is linked to your Jira then yes, it seems like you ought to be able to use the Build successful or Build failed triggers to accomplish what you want.

2 votes
Answer accepted
Jamshaid
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.
February 28, 2024

Thanks to the hint by @Darryl Lee , I have got it working with the following flow

123.png

Darryl Lee
Community Champion
February 28, 2024

Glad to see you got it working! Sorry I misunderstood what you meant by "running a script". I'd appreciate if you could accept my answer below, since it did lead you to the split() command that you were looking for.

0 votes
S Sajeed Ahamad September 5, 2024

Hi, I am a JIRA Developer and part-time Freelancer. I provide support for all types of Cloud and Data Center scripting solutions, including Groovy and SIL. I specialize in Listeners, Behaviors, Conditions, Validators, and Custom Post Functions. If you need assistance, feel free to contact me on WhatsApp at +17866876777 or via email at freelancerjira@gmail.com.

you can reach out to me i will solve your problem

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events