How can I set a workitem resolution date using plain Java API?
I thought I was all set because the work item in the API has a getResolutionDate() method. Unfortunately, it doesn't have a setResolutionDate()... !
I had been working in the weeds with the API last year but now it's been a while and I'm pretty fuzzy on it. I thought I'd ask for guidance before digging in again. Would I be using the generic setAttribute method, find the attribute ID of the resolution date field and set it that way?
Thanks!
Andy
I had been working in the weeds with the API last year but now it's been a while and I'm pretty fuzzy on it. I thought I'd ask for guidance before digging in again. Would I be using the generic setAttribute method, find the attribute ID of the resolution date field and set it that way?
Thanks!
Andy
Accepted answer
The Resolution Date shows up with the ID resolutionDate (type Timestamp) in the process template/Work Item customization. It can be set like any other attribute as far as I am aware. Find the code to work with Timestamp type attributes in the work item commandline: A RTC WorkItem Command Line Version 2.2.
Comments
1 vote
One other answer
Hi Andy,
like you said, you do not have a setResolutionDate, and the reason is quite simple, since this date is filled when you execute an action that resolve the work item.
I'm not sure if you try to set using the generic setAttribute you will be succeed. Once, I had trouble setting the description attribute using the generic method besides the setDescription.
In this case, I think you need to rethink the reason behind of your need. Maybe you actually need to invoke a resolution action via API, or have a custom date that stores a kind of "Secondary Resolution Date".
Best regards!
Comments
1 vote