Forums

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

How do i copy a certain string from the Description of an issue into a new component with automation

William van Dalen
Contributor
June 5, 2024

Hi,

Let's say i create an issue and the description contains the text/string 'Subject: test'.

I'd like to copy the text 'test' into a new component of the current project. How do i achieve this using a Jira Automation rule?

Thank you in advance.

With kind regards, Will

 

2 answers

0 votes
Bill Sheboy
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.
June 5, 2024

Hi @William van Dalen 

In addition to Vishal's suggestions...

What do you mean by "a new component of the current project":

  1. set the value of the Component field for the issue, where the specific Component value already exists
  2. add a new Component value to the project, and then assign it to the issue

 

If you mean the second one, there is no built-in way for automation rules to add a new Component to a project.  Instead the automation rule would need to call a REST API functions with the Send Web Request action to do so, first checking if the value exists, or not.

To do that, here is a how-to article for calling a REST API function from a rule, and the specific functions I believe you would need:

 

Kind regards,
Bill

William van Dalen
Contributor
June 6, 2024

Hi @Bill Sheboy ,

At first i thought the second one was the intention, but after asking my colleague further, the first explanation was the purpose. So it's okay. I will follow the link Vishal suggested.

Thank you for your reply.

Regards, Will

Like Bill Sheboy likes this
0 votes
Vishal
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.
June 5, 2024

Hi @William van Dalen 

Before setting the string as a component, you need to get the string "Test" from description & then you can set it as a component, you can try using substringAfter( String separator) smart value in the automation to get the string. More details here in the link.

Give a try & let us know how does that go.

Thanks

William van Dalen
Contributor
June 6, 2024

Hi @Vishal ,

Your reply with the link you sent me is very helpful to me.

I will study this  and i will give it a try. I'll let you know about the progress.

Thank you.

Regards, Will

Like Vishal likes this

Suggest an answer

Log in or Sign up to answer