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

Estelle Decanis December 24, 2021

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

3 answers

1 accepted

0 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 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

Estelle Decanis December 24, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 26, 2021

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

Estelle Decanis January 3, 2022

Hi @John Funk 

Here the result :

2022-01-03_10h12_28.png

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 3, 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? 

Estelle Decanis January 3, 2022

2022-01-03_15h19_11.png

 

2022-01-03_15h19_40.png

Estelle Decanis January 4, 2022
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 4, 2022

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. 

Estelle Decanis January 4, 2022

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

Estelle Decanis January 4, 2022

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2022

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

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2022

@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
Estelle Decanis January 14, 2022

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

0 votes
Manuel-Hubertus Fay
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!
January 9, 2024

...and how I can delete this transition completely from a self made workflow? I've tried a lot since now (edit workflow, publish, publish - create copy - edit copy, etc.). I've admin privileges on our Jira Cloud.

0 votes
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 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 

Estelle Decanis December 24, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 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

Estelle Decanis December 24, 2021

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