在PowerShell中使用WIQL(工作项查询语言),我想在我的VSTS团队项目中创建一个报告,其中包含特定"迭代路径"下所有工作项的工作项链接关系的详细信息。和"区域路径"。例如:Epics→功能→UserStories。由于Epics& amp;之间存在父/子关系。功能以及功能和功能之间UserStories。所以输入将是"迭代路径"和"区域路径",相应的输出将是一个报告(.csv或.xls),其中包含这些工作项及其关系的所有详细信息。有人能告诉我如何在PowerShell中使用WIQL实现这一目标吗?
答案 0 :(得分:0)
简单样本:
class LoadAllStates extends AsyncTask<String, String, ArrayList<String>> {
private ProgressDialog pDialog;
private String test;
private ArrayList<String> statedata;
private ArrayList<String> idadddata;
@Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = new ProgressDialog(ShippingAddress.this.getActivity());
pDialog.setMessage("Please wait..");
pDialog.setIndeterminate(true);
pDialog.setCancelable(true);
pDialog.show();
}
protected ArrayList<String> doInBackground(String... args) {
ServiceHandler sh = new ServiceHandler();
// Making a request to url and getting response
statedata = new ArrayList<String>();
idadddata = new ArrayList<String>();
String jsonStr = sh.makeServiceCall(GET_ADDRESS_DETAIL, ServiceHandler.GET);
Log.d("Response: ", "> " + jsonStr);
if (jsonStr != null) {
try {
jsonObj = new JSONObject(jsonStr);
for (int i = 1; i <= jsonObj.length(); i++) {
JSONObject user = jsonObj.getJSONObject(""+i);
idaddress=String.valueOf(i);
System.out.println("userr"+i);
username= (user.has("name")) ? user.getString("name") : null;
usermobile= (user.has("mobile_number")) ? user.getString("mobile_number") : null;
useraddress= (user.has("address")) ? user.getString("address") : null;
userlandmark= (user.has("landmark")) ? user.getString("landmark") : null;
usercity= (user.has("city")) ? user.getString("city") : null;
userstate= (user.has("state")) ? user.getString("state") : null;
userpincode= (user.has("pin_code")) ? user.getString("pin_code") : null;
useremail= (user.has("email")) ? user.getString("email") : null;
if(username!=null)
statedata.add(username+","+usermobile+","+useraddress+","+userlandmark+","+usercity+","+userstate+","+userpincode+","+useremail);
idadddata.add(idaddress);
Log.i("inner",user.toString());
}
System.out.println("WifeBday"+statedata.size());
} catch (JSONException e) {
e.printStackTrace();
}
} else {
Log.e("ServiceHandler", "Couldn't get any data from the url");
}
return statedata;
}
protected void onPostExecute(ArrayList<String> result) {
super.onPostExecute(result);
pDialog.dismiss();
}
}