Is it possible to review an Issue?

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

Accepted Answer
0 votes

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 -----")

Hey Tanner,

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

Thanks!
Chris

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.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

46 views 0 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you