Could anyone help me out with the issue below?
I have a groovy script which requires a select list custom field to create a new issue. The problem I do have is that if the custom field is made optional, the new issue is created but when it is made mandatory/required, the new issue is not created. As it is both important that the custom field is mandatory and new issues can be created programmatically, I am not able to make any further progress.
This is a snippet of the code which sets the value of the select list custom field called 'Story Type'
// The Story Type to be used for the new issue
CustomField StoryTypeCF = customFieldManager.getCustomFieldObjectByName("Story Type")
fieldConfig = StoryTypeCF.getRelevantConfig(issue)
option = optionsManager.getOptions(fieldConfig).find {it.value == "Delivery"}
newIssue.setCustomFieldValue(StoryTypeCF, option)
While I investigate further, any help will be appreciated.