Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-17541

Can't add or edit build plan branch variables in Bamboo Cloud

    Details

    • Last commented by user?:
      true
    • Comments:
      6

      Description

      Summary

      It is not possible to add or edit build plan branch variables in Bamboo Cloud version 5.12.0. This was working fine in 5.11.2.


      Environment

      Affected version: 5.12.0-D20160504T132229


      Steps to Reproduce

      1. In Bamboo open a build plan branch (e.g. https://bambooprod.atlassian.net/builds/branch/admin/config/editChainBranchVariables.action?buildKey=TP-JST1897914)
      2. Go to Actions > Configure plan
      3. Expand the Branches section in the left hand menu. Select a branch in there and then select the Variables tab.
      4. Try to add a variable


      Expected Results

      When you click on the Add button the variable is added


      Actual Results

      Nothing happens. No variable added and in the logs I can see:

      2016-05-11 06:50:42.678702500 2016-05-11 06:50:42,678 ERROR [ajp-nio-127.0.0.105-8009-exec-8] [FieldErrorUsageVerifier] CreatePlanVariable: unreported field errors: variableKey : [You must enter a valid key] 
      


      Workaround

      As a workaround for adding new plan branch variables please:

      • go to the Variables page in plan branch configuration
      • enter values as if you were adding new plan branch variable (do not click Add)
      • open "Developer Tools" in your Chrome browser (or similar tool in Firefox) and go to javascript console
      • paste and execute the following code:
        var $form = AJS.$('form#planVariables');
        var $addVariable = $form.find('tr.add-variable');
        var formUrl = $form.attr('action');
        var data = $addVariable.find(':input').serialize() + '&'
                            + BAMBOO.XsrfUtils.getAtlTokenQueryParam(formUrl)
                            + '&bamboo.successReturnMode=json&decorator=nothing&confirm=true';
        AJS.$.post(formUrl, data, function(result) {
            if (result.status.toUpperCase() == 'OK') window.location.reload();
            else console.log(result);
        });
        

        As a workaround for modifying plan branch variables please

      • delete the variable using UI
      • follow the steps above to add it with new value

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                18 Vote for this issue
                Watchers:
                26 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  1 year, 13 weeks, 5 days ago