Package com.microsoft.tfs.core.clients.workitem

Examples of com.microsoft.tfs.core.clients.workitem.WorkItem


        // Run the query and get the results.
        WorkItemCollection workItems = client.query(wiqlQuery);

        for (int i = 0; i < workItems.size(); i++) {
            WorkItem workItem = workItems.getWorkItem(i);

            stringStatusMap.put(String.valueOf(workItem.getID()),
                    (String) workItem.getFields().getField("State")
                            .getOriginalValue());
            openStatusMap.put(String.valueOf(workItem.getID()),
                    workItem.isOpen());
        }

        client.close();
    }
View Full Code Here


            if (project == null) {
                LOG.warn("Product was not found. Unable to create defect.");
                return null;
            }

            WorkItem item = client.newWorkItem(project
                    .getVisibleWorkItemTypes()[0]);

            if (item == null) {
                LOG.warn("Unable to create item in TFS.");
                return null;
            }

            item.setTitle(metadata.getDescription());
            item.getFields().getField("Description").setValue(description);
            item.getFields().getField("Priority").setValue(metadata.getPriority());

            String itemId = null;

            if (checkItemValues(item)) {
                item.save();
                itemId = String.valueOf(item.getID());
            } else {
                LOG.error("Failed to create issue because one or more fields were invalid. " +
                        "Check the above logs for more details.");
            }
View Full Code Here

TOP

Related Classes of com.microsoft.tfs.core.clients.workitem.WorkItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.