Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-2658

Behaviour : Setting form value for radio button is not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • 5.3.1
    • 5.3.5
    • None
    • None
    • 1

    Description

      Steps to produce

      1. Add RadioButtons custom field.
      2. Add a server side script with below code
      // set a select list value -- also same for radio buttons
      def capFld = getFieldByName("RadioButtons")
      def optionsManager = ComponentAccessor.getOptionsManager()
      def customFieldManager = ComponentAccessor.getCustomFieldManager()
      def customField = customFieldManager.getCustomFieldObject(capFld.getFieldId())
      def config = customField.getRelevantConfig(getIssueContext())
      def options = optionsManager.getOptions(config)
      def optionToSelect = options.find { it.value == "Yes" }
      
      capFld.setFormValue(optionToSelect.optionId)

       

      The radio button form value is not get updated as expected.

       

      Attachments

        Activity

          People

            jechlin Jamie Echlin
            ahasan Ashraful Hasan [X] (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: