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

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.3.1
    • Fix Version/s: 5.3.5
    • Component/s: None
    • Labels:
      None
    • Critical Points:
      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

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

              Dates

              Created:
              Updated:
              Resolved: