I have come across multiple questions related to this topic, but I have been unsuccessful in implementing any of the recommended solutions.
The thread most closely related appears to be: https://community.atlassian.com/t5/Jira-Core-questions/Tempo-Account-field-values-with-Script-Runner/qaq-p/296415
But there is no real clear solution provided.
I am simply trying to assign a specific Tempo Account value when a new issue is created based on the issue type itself. I have no issues setting any system field/value default, but when I attempt to set a Custome field/value and specifically the Account field/value, I cannot get it to work properly. The Code Block below is set to trigger the behaviour on the create action for a Defect in this project. I am trying to set the value of the Account field to the "General" Account. The syntax seems to be correct, but I still get an Account value of "None" when I attempt to create the issue of type Defect. Any additional guidance would be welcome.
import com.atlassian.jira.component.ComponentAccessor
if (getActionName() != "Create Issue") {
return // not the initial action, so don't set default values
}
// set a select list value -- also same for radio buttons
def defectAccount = getFieldByName("Account")
def optionsManager = ComponentAccessor.getOptionsManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customField = customFieldManager.getCustomFieldObject(defectAccount.getFieldId())
def config = customField.getRelevantConfig(getIssueContext())
def options = optionsManager.getOptions(config)
def optionToSelect = options.find { it.value == "General"}
defectAccount.setFormValue(optionToSelect.optionId)
Have you fixed this?
Same question. Do you have a solution for this? @Chris Roberts @Yogesh Mude
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Julia K ,
I used the JMWE app post function to set the Tempo account.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.