Hi Team,
I have a Select List Field in that I have 5 Values. So, here I set the Default Value for that Select List Field.
I created a Screen and I added that Select List field to that Screen and I added that Screen on WorkFlow Transition.
When I click on that Transition Button a screen is popping up with the Field But it's not Showing the Default Value.
I added that Field to the Create screen Then only that Field Showing with the Default Value that I have set.
Here I need that Field with that default value only when the issue moves to particular status.
I have tried workflow post-function "Issue Field Update" in that I have only system fields.
Can anyone please suggest me how to achieve this.
Thanks,
Kumar
@Kumar See if the solution in this article helps. You will need a third-party plugin (JIRA Suite Utilities) for this in JIRA Server: https://community.atlassian.com/t5/Jira-questions/Can-I-Update-custom-fields-thorough-a-transition/qaq-p/298697
Hi @Taranjeet Singh Thanks For Your response
Here I have used a "Behaviour Plugin" to make make field Value default so it will make the the Field value Default on Every Screen where ever the field is added
Here is the script the
import com.atlassian.jira.component.ComponentAccessor
// set a select list value -- also same for radio buttons
def faveFruitFld = getFieldByName("customfieldName") // add you field name
def optionsManager = ComponentAccessor.getOptionsManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customField = customFieldManager.getCustomFieldObject(faveFruitFld.getFieldId())
def config = customField.getRelevantConfig(getIssueContext())
def options = optionsManager.getOptions(config)
def optionToSelect = options.find { it.value == "abcdefg" } // Feild value that you want to make default
faveFruitFld.setFormValue(optionToSelect.optionId)
Thanks,
Kumar
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.