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

add the name of the transition to the comment of the post function "Add a comment to an issue if one

Hi,

The post function "Add a comment to an issue if one is entered during a transition" allows to add a comment in the transitions.

 

In this case, when a comment is added I would like it to be preceded by the name of the transition (or the name of the status from/status to)

 

Best regards,

Estelle Decanis

2 answers

1 accepted

0 votes
Answer accepted
John Funk Community Leader Dec 24, 2021

Hi Estelle,

Try adding an Automation rule for when the comment is added during a transition. See the screenshot. The last part of the code should show the field for Status field. You can remove the part about the Initiator if you like.

screenshot.png

Hi @John Funk 

Thank you for your answer.

I had done similar automation. But I wanted to display the start and finish status of the transition.

But apparently it's not possible !

John Funk Community Leader Dec 26, 2021

That should be displayed using the code above. Is that not what you get? 

John Funk Community Leader Jan 03, 2022

Can you share the rule that you have? 

What does the audit log say for that rule when it was run? Can you share that? 

I don't see a post function for Add a comment during a transition. Is that an add-on you are using? 

I am trying to reproduce - but don't see that as an option for a post function. 

I don't understand. You need a post function to add a comment, in addition to automation to add the comment ??

Previously I had done this post function :

2022-01-04_15h38_27.png

 

But I cannot condition this comment on the fact that there must be a comment of filled in the transition screen...

So for now it's deplayed all the time

John Funk Community Leader Jan 13, 2022

So it looks like you are using maybe JMWE for the post function? 

@Estelle Decanis to test whether there was a comment entered on the transition screen, you can use this as the conditional execution:

{{context.comment is truthy}}

Note: This requires that the post-function is put after the "Add a comment to an issue if one is entered during a transition" built-in post-function (which is the case on your screenshot)

Like Estelle Decanis likes this

@David Fischer _Appfire_Indeed, the display is conditioned on the presence of a comment. Thank you mery much !!

0 votes
Fabian Lim Community Leader Dec 24, 2021

Hi @Estelle Decanis

You can use jira automation to for both instead of a postfunction. It will be easier to set up since you do it in one place.

Trigger: issue transitioned 

Action: comment on issue (https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Automationactions-Createvariable)

You need to use a smart value to copy the status name. {{issue.status.name}}

Good luck 

Hi @Fabian Lim 

Thank you for your answer.

I will not be able to use automation for both of them, because this is an essential post function that cannot be delete ("Add a comment to an issue if one is entered during a transition").

Fabian Lim Community Leader Dec 24, 2021

Are you using a plugin for the comments?

We use JMWE where you may be able to call the from/to status: https://innovalog.atlassian.net/wiki/spaces/JMWEC/pages/94142510/Comment+issue+s

We use too JMWE.

 

Let me explain.

In the transition screen it is possible to enter a comment (commentA).

 

As in the explanation, I added an automatic comment (commentB) by post function which would take the name of the transition.

 

But I would like commentB to be displayed only if commentA is entered (see conditional execution)

Suggest an answer

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

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

535 views 1 10
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