Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to replace for string one part to another with Jira Automation Edited

I have tried to catch EPIC link for an Issue like this:

{{#debug}}
{{issue.toUrl.replace(issue.key,issue.customfield_10006)}}
{{/}}

 customfield_10006 - Epic Link (epic issue key)

 

I always get an empty result in debug. What should I do to get it?

3 answers

1 accepted

0 votes
Answer accepted
Cristiano Atlassian Team Feb 17, 2020

Hey Степан_Сычёв,

Thank you for contacting the Atlassian community. My name is Chris and I'll be glad to help you with this :D 

Sorry for the delay in this first comment. we have been migrating from Code Barrel to Atlassian, and because of this, you've had waited to support more than normal, sorry about that.

First of all, I'd like to understand if you need to replace the issue key into the URL with the issue key from the customfield_10006. I'm afraid that this is not possible, with this in mind can you give more information about the expectation and about your scenario to think into the best solution if it is possible.

Furthermore, our recommendation is to use this link to open an issue with Atlassian. Into Atlassian team, there are more people working to support you and I'm pretty sure that they will help you faster :D BTW I work in that team. Also, into this link below, you can select the priority.

Link to support: http://go.atlassian.com/a4jsupport 

Besides, into this new ticket, if you want you can answer my question there, no worries, only comment that you've talked with Cristiano Fontana, and we'll continue to support you :D 

Looking forward to this information.

Cheers,

Chris | Atlassian Cloud Support

Good day, Chris! Thank you )

My point: I need to send a HTML email when issue transitioning to specified status. Let it by 'READY'. I created a transitioning trigger and need to paste in the email some info. Something like that:

This issue of Epic (PROJECT-123) were transition to status 'Ready'. You need to check it.

And I need to PROJECT-123 be a HTML link to the PROJECT-123 issue.

What have I got:

1. issue.toUrl() - functuion, return url string of issue, looks like "http://server-jira/.../PROJECT-2"

2. issue.customfield_10006 - epic key, looks like {  ..."customfield_10006 " : "PROJECT-123", ... }

What have I done:

3. I tryed to replace one part to another..

{{issue.toUrl.replace(issue.key,issue.customfield_10006)}}

but it does not work

Hey Степан_Сычёв,

Thank you for your reply!

It seems that the best solution for your scenario is using this structure below into the email action:

https://<YOUR_JIRA_INSTANCE>/browse/{{issue.customfield_10006}}

send email.png

With this code above you'll add the value of the custom field into the end of your URL.

Can you give a try and let me know how it goes?

In case of further questions let me know!

Have a wonderful week ahead :D 

Cheers, 

Chris | Atlassian Cloud Support

0 votes
Cristiano Atlassian Team Mar 02, 2020

Hey again,

I hope you're doing well.
We just wanted to quickly hop in here and check if you successfully received our last reply.

Customer satisfaction is most important to Atlassian so please let us know if you need our help.

Your followup is extremely appreciated.

In case of further questions count on us.

Cheers,
Chris | Atlassian Cloud Support

Thank you!

Your advice helped me. It's work. But not the way I would follow )

Replace function still not work as well (

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you