Jira SERVER Workflow: How to add a dialog box to feed a comment field on a transition

Mboiteux December 26, 2018

Hello,

In my workflow I have a transition that allows a jira user to reject a solution.

This transition lead back from "done" to "in progress".

  • "In progress" =finished=> "Done"
  • "Done" =rejected=> "In progress"

I want the user that rejects the solution to add a comment to explain the reason why the solution was rejected.

My question is: How can I have the user indicate the reason of the rejection when he click on "rejected" transition ?

Exemple: "Wrong value detected"

2 answers

1 accepted

2 votes
Answer accepted
Adrián Plaza [DEISER]
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.
December 26, 2018

Hi @Mboiteux,

 

you need to put a screen in your workflow transition, you can do it follow the next guide: https://confluence.atlassian.com/jirakb/mapping-a-screen-to-a-workflow-transition-720634253.html

 

I hope this help,
Adrián.

Mboiteux December 26, 2018

Thank you Adrian I will try to follow this document.

Mboiteux December 26, 2018

This woks for me.

It seems that I finally don't need to add a new field since a comment field is added to the new screen when it pops up.

Thank you Adrian.

Marc

Adrián Plaza [DEISER]
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.
December 26, 2018

Hi @Mboiteux,

 

To make fields mandatory you need to use a validator in the cloud you make it by default validators, but in the server, you need an App, for example, you can use JSU.


This is one guide: https://confluence-apps.beecom.ch/display/JSU/Fields+Required+Validator

 

I hope this help,

Adrián.

0 votes
Alexey Matveev
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.
December 26, 2018

Hello,

It depends on how you want a user to provide a reason for rejection. You can create an additional field or you can use the comment field. In any case as far as I understand you want to make this field (additional field or the comment field) required.

You would need an add-on for it.

For example, you could use the Power Scripts add-on:

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

You could create a validator for the rejected transition like this:

string errorMsg = "You must enter a comment!";

if(!hasInput("comment")) {

  return false, "comment", errorMsg;

}

Mboiteux December 26, 2018

Thank you for your answer Alexey,

The best for me would be to use e new comment on the task.

I hope I can do this without any add-on. We bought our licences in september and we add new add-ons every two weeks :/

Mboiteux December 26, 2018

I finally managed without add-on.

I could not make the comment mandatory when the transition fires but I have a comment and (optionally) a new field "new status reason".

Do you think it is possible to make this without add-on ?

Marc

Suggest an answer

Log in or Sign up to answer