Environment:
JIRA v7.4.4,
ScriptRunner 5.3.5
Using "Clone an issue, and link" to create up to 50 product specific issues, and need to automatically populate a custom label field named "Agile Team" with the team that is responsible for that product area. Already using Additional issue action" to customize a numbers of fields (Summary, Component, a Cascading Select, Watcher, Assignee) , based on the specific product area, but cannot find a recipe for populating a Custom Label field. Below is an example of what is already working.
Thanks,
Wayne
import com.atlassian.jira.ComponentManagerimport com.atlassian.jira.issue.customfields.manager.OptionsManager
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.project.Project
import com.atlassian.jira.user.util.UserManager
import com.atlassian.jira.issue.watchers.WatcherManager
def project30 = issue.getProjectObject()
def componentManager = ComponentManager.instance
def optionsManager = ComponentManager.getComponentInstanceOfType(OptionsManager.class)
def userUtil = ComponentAccessor.getUserUtil()
MutableIssue issue = issue
def projectComponentManager30 = ComponentAccessor.getProjectComponentManager()
def newcomponent30= projectComponentManager30.findByComponentName(project30.getId(), "Ethernet RG")
issue.setComponent([newcomponent30])
String SUMMARY_VALUE30 = issue.summary
String newSummary30 = "Security Vulnerability (OEM RG/AP (Inteno)) - "+SUMMARY_VALUE30
def customFieldManager3011 = ComponentAccessor.customFieldManager
def optionsManager3011 = ComponentAccessor.optionsManager
def issueManager = ComponentAccessor.issueManager
def productCat3011 = customFieldManager3011.getCustomFieldObjectsByName("Product Category")[0]
def fieldConfig = productCat3011.getRelevantConfig(issue)
def options = optionsManager3011.getOptions(fieldConfig)
def parentOption3011 = options.find { it.value == "Ethernet RG" }
def childOption3011 = parentOption3011?.childOptions?.find { it.value == "" }
def newValues = [:]
newValues.put(null, parentOption3011)
newValues.put("1", childOption3011)
issue.setCustomFieldValue(productCat3011, newValues)
issue.assigneeId = "rmenakat"
issue.summary = newSummary30
checkLink = {link -> false};
Hi @Alex Dukhon ,
The notification can only be trigged at issue level when the test is assigned to someone. This is mainly because the email triggering feature is mostly controlled by JIRA for it's core features. As a plugin vendor, zephyr will not be able to use the email for zephyr's functional area. As the test itself is a issue inside JIRA the issue level features applies to Test.
The user can only be notified at the test level assignment for now.
-Bibek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.