TFS 2015 plugin - multiple task inputs - tfs-2015

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?

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');

Related

In blender, how to get the full parameter list of modifier and change specific parameter in python?

I have been searching for this online for a while but no proper answer solves my confusion.
There is a stair generator which contains several parameters in the modifier
Example snapshot
I want to change certain parameters such as
Dict["stair Count"] = 20
and somehow regenerate the model and output a ply/glb file.
In order to do so I want to get the list that modifier is showing, but I don't know how to do so in python.
import bpy
ctx = bpy.context
obj = ctx.object
nodes = obj.modifiers["STAIR GENERATOR"]
list(nodes.keys())
list(nodes.values())
I can see a list of the parameter values, but the keys seem quite wrong comparing to the GUI. So I have two questions.
How do I get a full list of the key label from python just like the GUI? (e.g. “Switch”, “stair count”, “stair height”, …)
How do I apply the change on the script and update the stairs?
Thank you in advance

How to parameterize the locators in selenium page object model with TestNg or any other framework?

I need to automate two applications in which the navigation almost looks similar but the locators (xpath,id etc.,) are difderent.So,I have created a project with TestNg in eclipse and able to run one testcase for one application.But to maintain code reusability, I wanted to parameterize the locators( eg: in one application it is "//div[contains(text(),'abc')]" whereas in the other application it is "//div[contains(text(),'def')].Searched in google but nothing is helpful.
Please let me know your comments. Am okay to start a new framework where the locators can be parameterised.
Define all your locators in application like Excel,
The structure of Excel should be in a way that, the first row refers to key, the Second row refers to the locators for "application A", the third row refers to the locators for application B corresponding to the key. The structure of excel should be as below
Excel reader class should be row iterator, the first row serves as Key and corresponding row serves as values. first iteration row 1 and row 2 values are placed in key and value mapping in a hashmap and the execution will be on Application A.
I would suggest you to keep different packages for test and page(locators).
In the locator you can create java classes for different kind of pages that you have in your application, where you can keep our locators as per the pages(java class) and can create methods where you can parameterize them for reusability.
In the test class you'll have to just create objects of the pages(java class) so that you can use the methods
Hope this helps!
In your specific case you can try to write a utility function like this:
public static String setlocator(String param){
String test = "//div[contains(text(),'" +param+"')]";
return test;
}
and call that function in your any application to get the locator.

Filter lookup inside a Dialog- CRM 2015 Online

How can we filter a lookup that is in a page of the dialog process.
E.g. I have a lookup to "incident" on Prompt and Response, I would like to filter it based on the value of a field in incident entity.
I tried:
Creating new views, also setting it as default.
addPreSearch and addCustomFilter on the field on the form(Not sure how to use these scripts inside the Dialog)
Any Ideas ?
Thanks you
Unfortunately this is not possible.
As an alternative you could consider adding a query to the dialog and a page with a prompt having an Option Set (picklist) response type.

PsychoPy Builder - How to I take a rest part way through a set of trials?

In PsychoPy builder, I have a lot of trials and I want to let the participant take a rest/break part way through and then press SPACE to continue when they're ready.
Any suggestions about how best to do this?
PsychoPy Builder uses the TrialHandler class and you can make use of its attributes to do control when you want to take a rest.
Assuming you're trial loop is utilising an Excel/csv file to get the trial data then make use of trialHandler's attribute : thisTrialN
e.g.
1/ Add a routine containing a text component into your loop (probably at the beginning) with your 'now take a rest...' message and a keyboard component to take the response when they are ready to continue.
2/ Add a custom code component as well and place something similar to this code into its "Begin Routine" tab:
if trials.thisTrialN not in [ int(trials.nTotal / 2) ]:
continueRoutine=False
where 'trials' is the 'name' of your trial loop.
The above will put a rest in the middle of the current set of trials but you could replace it with something like this
if trials.thisTrialN not in [10,20]:
continueRoutine=False
if you wanted to stop after 10 and again after 20 trials.
Note, if you're NOT using an Excel file but are simply using the 'repeat' feature of a simple trial loop, then you'll need to replace thisTrialN with thisRepN
If you're using an Excel file AND reps you'll need to factor in both when working out when you want to rest.
This works by using one of Builder's own variables - continueRoutine and sets it false for most trials so that most of the time it doesn't display the 'take a rest' message.
If you want to understand more, then use the 'compile script' button (or F5) and take a look at the python code that Builder generates for you.

change type from user stories to feature

I want to move about 100 user stores to features. I use query to get the type, but I don't know how to change it.
query.query_string = "(FormattedID = \"US4332\")"
results = #rally.find(query)
#res = results.first
puts #res["_type"]
Unfortunately it is not possible to change work item type, and this limitation is not specific to Web Services API, and applies to UI too, with the exception of converting a defect to a story in the UI.
The closest you'll be able to get is to create new features as close to copies of the original stories as possible (including moving children, etc).