2017-08-08 10 views
0

VSTSタスクでは、いくつかの入力があります。私は別のものに依存して入力を行いたい。以下の私のJSONの関連部分:Wakeupが選択されている場合は他の入力に依存するVSTS入力

"inputs": [ 
     { 
      "name": "Wakeup", 
      "type": "boolean", 
      "label": "Wakeup", 
      "defaultValue": "false", 
      "required": false, 
      "helpMarkDown": "Makes a wake-up request to the site after deploying.", 
      "groupName": "advanced" 
     }, 
     { 
      "name": "SiteUrl", 
      "type": "string", 
      "label": "SiteUrl", 
      "defaultValue": "", 
      "required": false, 
      "helpMarkDown": "The url to the site.", 
      "groupName": "advanced" 
     } 
    ] 

、そしてSiteUrlが必要とされなければなりません。しかし、Wakeupが選択されていない場合は、SiteUrlは(可能であれば)ユーザーには編集できないはずです。

私はbuild task-schemaを見てきましたが、わかりません。私はvisibleRuleを使用できるはずですが、どうすればよいか分かりません。

答えて

0

このコードを試してみてください。

{ 
     "name": "SiteUrl", 
     "type": "string", 
     "label": "SiteUrl", 
     "defaultValue": "", 
     "required": true, 
     "helpMarkDown": "The url to the site.", 
     "visibleRule": "Wakeup = true", 
     "groupName": "advanced" 
    } 
関連する問題