Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: swizzle-jirareport-1.2
-
Fix Version/s: swizzle-stream-1.0.3
-
Component/s: swizzle-jira
-
Labels:None
-
Environment:windows with Jira 4
-
Number of attachments :
Description
Hi,
I would like to create a issue with the specific component.
here is the code piece
issue.setAssignee(new User("veramasu"));
issue.setProject(new Project("CWM"));
issue.setDescription("Use VMWare for testing on other operating systems");
issue.setReporter(new User("veramasu"));
issue.setSummary("Jira for SR tracking.");
issue.setType(jira.getIssueType(2));
issue.setPriority(jira.getPriority(3));
issue.setCreated(new Date());
//Following code gets all the compoenents list and create the issue for all the componenets. But i need specfic compon
List components1 = jira.getComponents("CWM");
issue.setComponents(components1)
----------
So i thought of creating a List of components but it fails
List components = new ArrayList();
components.add("CM");
components.add("EM");
issue.setComponents(components);
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to org.codehaus.swizzle.jira.MapObject
at org.codehaus.swizzle.jira.MapObject.toMap(MapObject.java:259)
at org.codehaus.swizzle.jira.Issue.toMap(Issue.java:361)
at org.codehaus.swizzle.jira.Jira.createIssue(Jira.java:148)
at JiraExample.main(JiraExample.java:85)
Could you please help me. It is very urgent