The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Is it possible to review an Issue?

Chris Ryan
Contributor
January 7, 2014

Hey all,

Does JIRA have the capability to create a review for an issue? Also, to give the issue a name, a due date, and to set reviewers.

Another spin on this is to give users the ability to Approve an Issue prior to implementation.

Thanks a million,

Chris

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Tanner Wortham
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 Champions.
January 8, 2014

our workflow looks like this:

To Do -> Doing -> Reviewing -> Done

we have a custom field called "Reviewer" and when a user moves an issue from Doing to Reviewing, it automatically reassigns it to this reviewer by way of a post function. (we also have some custom code that sets reviewer == assignee so it doesn't wig out by trying to assign an issue to no one.)

i've placed a screenshot of what this post function looks like along with the custom code we use.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.util.UserManager
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.event.type.EventDispatchOption
import org.apache.log4j.Category

log = Category.getInstance("com.custom.Reviewer")
log.setLevel(org.apache.log4j.Level.DEBUG)
log.debug("---- begin reviewer post-fuction -----")

def assignee = ComponentAccessor.getUserUtil().getUserByName(issue.getAssignee().getName())
def reviewerCustomField = ComponentManager.getInstance().getCustomFieldManager().getCustomFieldObjectByName("Reviewer")
def reviewer = issue.getCustomFieldValue(reviewerCustomField)
log.debug("assignee: $assignee || reviewer: $reviewer")

if (reviewer == null) {
	log.debug ("Empty reviewer.  Set to assignee.")
	MutableIssue myIssue = issue
	IssueManager issueManager = ComponentAccessor.getIssueManager()
	UserManager userManager = ComponentAccessor.getUserManager()
	myIssue.setCustomFieldValue(reviewerCustomField, assignee)
	issueManager.updateIssue(userManager.getUser("automation"), myIssue, EventDispatchOption.DO_NOT_DISPATCH, false)
}
log.debug("---- end reviewer post-fuction -----")

Chris Ryan
Contributor
January 27, 2014

Hey Tanner,

We were hoping to avoid modifying the workflow, but this looks like the closest we'll get.

Thanks!
Chris

Tanner Wortham
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 Champions.
January 27, 2014

you're smart to want to avoid modifying the workflow as much as possible. the more steps in the workflow, the more time your team needs to spend in the tool. but on rare occassion, a changed workflow is the best avenue of approach.

1 vote
Chris Ryan
Contributor
January 7, 2014

Another spin on this is to give users the ability to Approve an Issue prior to implementation.

TAGS
AUG Leaders

Atlassian Community Events