Rivi
Rivi

Reputation: 791

TFS 2015 plugin - multiple task inputs

I'm writing a plugin for TFS 2015 and i'm trying to create a task that uses an input that may repeat itself several times dynamically.
Each time the user enters such an input I will add another field (of the same type) to the task.

So actually I'm talking about the possibility of "n" inputs of some type.
Is there a way to create such inputs (kind of a dynamic array of inputs) in the task.json file?

Upvotes: 0

Views: 242

Answers (1)

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29966

There isn't any way to achieve this feature. The alternative way would set the input type to "multiLine" and enter your items in several lines. And then you can get these items via getDelimitedInpu() method with "\n" delim.

import tl = require('vsts-task-lib');
var items:string[] = tl.getDelimitedInput('items','\n');

Upvotes: 1

Related Questions