Missed Team ’24? Catch up on announcements here.

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

How to process a String using parameters? for e.g. string.abbreviate(null, 6)

mateus_oliveira May 3, 2024

I have an automations that uses a JQL query that looks like this:

{{issue.Selection Field.value.toUpperCase().abbreviate(8)}}

It works absolutely fine. However, it ends up leaving the "..." at the end, so I did some search and found out that 'abbreviate' can be used with different parameters, so {{abbreviate(string, null, 8)}} would leave just the abbreviation. But is it possible to use these parameters when processing/treating strings - meaning, when using this command at the end of the string.

It seems I can't use {{abbreviate(issue.Selection Field.value.toUpperCase()), null, 8}} nor anything like that, I tried some variations and I only got errors...

I'm using Jira Server. Thanks!

1 answer

0 votes
Kalyan Sattaluri
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.
May 3, 2024

Hello @mateus_oliveira 

Can I ask what are you trying to do?

Do you want to remove the 3 dots from the abbreviated string?

If so, if you are supplying length to abbreviate, you can also account for the 3 dots and pass the left function like below... {{issue.summary.toUpperCase().abbreviate(8).left(5)}}

Sorry if I am missing something, please clarify.

mateus_oliveira May 3, 2024

That's REALLY smart. The ending result is exactly what I was looking for, thank you so much!

Still curious if there's anyway to use parameters in this type of processing, but my immediate need was solved!

Like Kalyan Sattaluri likes this
Kalyan Sattaluri
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.
May 3, 2024

I am not familiar with the abbreviate parameters, will take a look as well and update if I find anything. However, if you want  continue to do further processing or comparison, you should be able to continue appending additional text functions to what you have including match function etc... Will keep you posted on what I find as well.. If your issue is resolved, please consider accepting solution. Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events