Is there a way using either stock JIRA\Greenhopper or an add-on which will allow me to set an issue's assignee to match the assignee of either a linked issue or an epic?
My team works on a variety of products and we use epics as a way to roll up all of the stories associated with a particular product. Each product (and therefore epic) has a technical lead (who I store in the epic's 'assignee' field) and I'd like any stories linked to that epic to inherit that assignee by default.
We also use linked issues to track bugs associated with particular stories, and it would be awesome if I could auto-assign those bugs to the owner of the originating story as well.
I'm probably a bit late to help you, but Jira Misc Workflow extensions add-ons provides lots of additional post-functions that can enable you to inherit from parents or linked items (or to set parents or linked items). See attached screenshots for examples.
If you want the user to see the field values in the create form (rather than for them to be added in a post-function) you would need to write a jira Behaviours script.
Thanks Mark! We actually ended up transitioning to a different epic\story architecture that negates this use-case, but I will give this a crack when I get a minute and see if it works. My only concern is that it doesn't look like adding a story to an epic uses the same "linked issues" logic, so it might not be able to take advantage of these post-functions.
Yes, putting this in a post function is quite limiting. We've also written Jira Behaviours scripts to inherit story attributes from their parent.
The script below takes a custom field from the epic and puts in on the child. You could adapt this for other fields (e.g. assignee)
// Set SVR Number based on the SVR Number of the parent epic (if one exists) // // Script by Mark Love, 4th July 2014 import com.atlassian.jira.ComponentManager import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.IssueManager import com.atlassian.jira.issue.CustomFieldManager import com.atlassian.jira.issue.fields.CustomField // Set up variables to link to the two form fields we're interested in FormField SVR = getFieldByName("SVR Number") FormField epicLink = getFieldByName("Epic Link") // The value of the Epic Link field includes the prefix "key:" so we need to get rid of this def epicLinkKey = epicLink.value.replaceAll("key:", "") // Set up objects to enable us to access the parent issues and custom field ComponentManager componentManager = ComponentManager.getInstance() CustomFieldManager customFieldManager = componentManager.getCustomFieldManager() // get an issue object for the parent def epic = componentManager.getIssueManager().getIssueObject(epicLinkKey) // create a custom field object for SVR Number cfSVR = customFieldManager.getCustomFieldObjectByName("SVR Number") // get the value of SVR for the epic def epicSVR = epic.getCustomFieldValue(cfSVR) // update the value on the form with the value from the parent. SVR.setFormValue(epicSVR)
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot