microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.49k stars 2.61k forks source link

[BUG]: Task Group using IIS web app manage task #19987

Open remkm01 opened 3 months ago

remkm01 commented 3 months ago

New issue checklist

Task name

IIS web app manage

Task version

0.*

Issue Description

Trying to create a Task Group using the IIS web app manage task. I have the task configured type set to IIS Application Pool and filled in 2 fields with variables.

image

Saved the task group.

Then, I wanted to make $(AppCmds) optional. Using the Azure DevOps API (https://dev.azure.com/{our subscription}/{my project collectdion}/_apis/distributedtask/taskgroups/{task group id}?api-version=7.1-preview.1), I updated the $(AppCmd) input parameter with "visibleRule": "AppCmds != ''" like so:

    {
        "aliases": [],
        "options": {},
        "properties": {},
        "name": "AppCmds",
        "label": "AppCmds",
        "defaultValue": "$(AppCmds)",
        "required": true,
        "type": "multiLine",
        "helpMarkDown": "",
        **"visibleRule": "AppCmds != ''",**
        "groupName": ""
    },

Posted without issues.

When viewing the Task Group after hitting the refresh button, the IIS web app manage task resets:

image

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

N/A

Operation system

N/A

Relevant log output

There are no logs.

Full task logs with system.debug enabled

N/A

Repro steps

# Not using YAML, but here is what I'm setting.
steps:
- task: IISWebAppManagementOnMachineGroup@0
  displayName: 'Manage IISApplicationPool'
  inputs:
    IISDeploymentType: IISApplicationPool
    AppPoolName: '$(AppPoolName)'
    AppCmdCommands: '$(AppCmds)'
remkm01 commented 3 months ago

Then, I wanted to make $(AppCmds) optional <= meant to say hidden.