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

Building a solution to flag & comment from the issue detail view

This article is a continuation of Why flagging an issue is so cool?

Now, we are going to build a solution to emulate the functionality of adding a flag along with a comment from the issue detail view.

For doing so, we are going to use just Jira Software Cloud native features.

Please, note this solution is just a workaround to JSWCLOUD-17127 that needs to be set at the workflow level, so it is more an exercise than an actual recommendation.

Ideally, this feature will be developed by Atlassian soon, leaving this solution obsolete.

A Jira Administrator will need to configure the following elements:

  • A new screen with no fields.
  • The workflow(s) used by the issue type(s) of the project(s) where you want to have this solution.

  • An Automation Rule for adding a flag to the comment.

Create the Comment Transition Screen

Create a new screen named Comment Transition Screen.

You don't need to add any fields to this screen, since we are using it just for adding a comment during a transition.

Editing the workflow

Create a global looping transition named Add flag:

global-looping-transition.png

Set the Comment Transition Screen.

add-flag-transition.png

Now you will need to refresh the your browser to avoid finding a dead link on trying to set post-functions or conditions.

Add a condition to the transition of type Value Field:

value-field-condition.png

Set the following parameters in the condition:

value-field-condition-parameters.png

Basicly, this condition says the transition should only be available for unflagged issues.

Now, set an additional Value Field Condition, but this time with these parameters:

value-field-condition-resolution.png

In other words, the transition will only available for unresolved issues, since a completed issue cannot be blocked.

Now, add a post-function of type Update Issue Custom Field:

update-issue-custom-field.png

And set it the following parameters:

update-issue-custom-field-parameters.png

This function will add a flag to the issue.

Add a second post-function of type Update Issue Custom Field, but this time with the following parameters:

disposition-function.png

In this case, Disposition is a custom field of type Labels. You can reuse any other custom field of type Labels or even using a different type of field. We are adding a label to trigger the Automation Rule below.

Setting an Automation Rule

Finally, you just have to configure an Automation Rule this way:

automation-rule.png

This rule is triggered whenever a new comment is added to the issue.

A condition checks that the Disposition custom field contains the flag-comment label. If that is the case, the rule continues being executed. Otherwise, it stops without further effects.

The Edit issue fields action removes the flag-comment label that we added to our Disposition custom field, therefore removing the mark we used to tell this Automation Rule should be executed.

A new condition now checks that the comment being added does not already contain the flag icon. This is just a convenient thing so that if you already added the flag icon to your comment during the transition, the rule does not have to edit the comment, which produces an additional notification.

Finally, if all conditions above were met, then the flag icon will be added at the begining of the comment.

So, the solution is ready to add a flag and a comment from the issue detail view.

Ok, I have set this solution, now how do I use it?

Enter the issue detail view of an unflagged and unresolved issue that is using the workflow you configured and that belongs to a project where the Automation Rule were set.

On the top-right corner, next to the Status field, click on the Add flag button, which is the global looping transition you set in the workflow:

add-flag-button.png

The Comment Transition Screen will be shown so that you can comment why this issue is blocked:

test-comment.png

And the issue will be flagged:

flagged.png

And the comment will have a flag at the begining:

flagged-comment-transition.png

And that's all for now.

Keep learning!

0 comments

Comment

Log in or Sign up to comment
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...

816 views 24 28
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