Forums

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

Smart Value in Jira Automation Rule only fetches the first line of Commit Message

Carter
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!
October 28, 2020

I have a Jira Automation Rule that adds comment to an issue whenever a new commit is created in the BitBucket Repository referring the Issue Key. However, the smart value {{commit.message}} is only fetching me the first line of the commit messages, incase of multi-line commit message. Does any body have any way to print the entire commit message using smart values?

1 answer

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.
October 28, 2020

Hi @Carter  -- Welcome to the Atlassian Community!

I saw an item in the public suggestions backlog about commit messages with commas being interpreted as a delimiter, and so turned into a list. 

You could check if that is happening with the line breaks by logging/adding a comment for {{commit.message.size}} to see it returns a value (or is greater than 1) and so is s list.

If so, you may be able to reform the message with {{commit.message.join("\n")}}

Best regards,
Bill

Carter
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!
October 28, 2020

Hey, thank you for the quick response!

I tried your suggestion, but {{commit.message.size}} did not return any value at all, so I am guessing it's not a list. 

Thanks again!

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.
October 28, 2020

I cannot enter defects for this tool, so I submitted this as a suggestion here:

https://jira.atlassian.com/browse/JSWCLOUD-20928

Please take a look to add additional details and repro steps.  Thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events