Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Smart value to update a line in custom field.

When I'm trying to use this {{issue.description.match("(Customer Account\:.{0,15})")}} smart value in Jira automation. 

The field result is like this Customer Account: "Customer Account:  XYZ  " 

Is it possible to update only the name XYZ in the Customer Account field?  

1 answer

1 accepted

0 votes
Answer accepted

Hi @Zubair Khan

I haven't tried this myself, but you could try to do use a smart value with the replace function like this:

{{issue.description.replace({{issue.description.match("(Customer Account\:.{0,15})")}}, "Customer Account: NEWVALUE")}}

Does that work for you?

Alternatively, you could also store the value of Customer Account into a custom field. That's the way I'd prefer (without knowing your exact use case) in order to use it for filtering in other views.

Cheers,
Matthias.

Hi @Matthias Gaiser _K15t_ 

Thanks for the response.

My use case is, I need to copy a line from description field to a custom field "customer account"

When I use this  smart value it's not working.  

{{issue.description.replace({{issue.description.match("(Customer Account\:.{0,15})")}}

 Capture.PNG

 

Thanks

I see. Then I made it more complex than it was intended. You could simply use this statement then:

{{issue.description.match("Customer Account\:(.{0,15})")}}

Note that I have moved the rounded brackets to the actual part which you want to extract.

Cheers,
Matthias.

Like Zubair Khan likes this

@Matthias Gaiser _K15t_ 

 

Thanks a lot. It's working 

Like Matthias Gaiser _K15t_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

511 views 19 23
Read article

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