Java WebService API: creation of work items - priority

Description
mberhorst
Posts: 15
Joined: Wed Mar 03, 2010 9:46 am

Java WebService API: creation of work items - priority

Postby mberhorst » Tue Apr 27, 2010 1:19 pm

Hallo everybody,

I try to create a new WorkItem with my own WebService. Only the setup for the priority is not working.
When my service try to set the ID for the priority, then my OC4J Server shows the following error message:

com.polarion.alm.ws.mapping.MappingException: Unabled to reverse mapping for enum id. No context.

My Java code to setup the priority:

PriorityOptionId priorityOptionId = new PriorityOptionId();
priorityOptionId.setId("90.0");
workItem.setPriority(priorityOptionId);

What is wrong with my Java code?

Thank you in advance.

Regards
Michael

ChernikovaEkaterina
Posts: 15
Joined: Mon Dec 07, 2009 9:08 pm

Re: Java WebService API: creation of work items - priority

Postby ChernikovaEkaterina » Mon May 03, 2010 1:10 pm

Hi Michael,

Unfortunately it's known defect "DPP-12121 - Cannot set priority on non-persistent workitem through WebServices"

Workaround is:
Set priority after the work item is created. Like this:

String wiURI = trackerService.createWorkItem(wi);

wi = trackerService.getWorkItemByUri(wiURI);
wi.setPriority(new PriorityOptionId("90.0"));
trackerService.updateWorkItem(wi);

Best Regards,
Ekaterina Chernikova
Support Polarion Software

mberhorst
Posts: 15
Joined: Wed Mar 03, 2010 9:46 am

Re: Java WebService API: creation of work items - priority

Postby mberhorst » Tue May 04, 2010 7:34 am

Thanks Ekaterina,

your workaround is working for me.

Regards
Michael


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: ClintonDes and 5 guests