Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes


Accepted answer

Permanent link
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.
Andy Jewell selected this answer as the correct answer

2 votes

Comments

Wow, that is VERY cool!  I learned just about everything I know about RTC API from your posts but somehow never ran across WCL.  Thank you so much!

It is pretty recent, when I found time to pull all my code together. I have tested it as good as I could. I am waiting for feedback and will try to address issues, if they come up.

1 vote


One other answer

Permanent link
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!

2 votes

Comments

I am with Tiago. why do you want to do this?

OH, I see what you guys are saying.  I think my case is a little special because this particular work item doesn't proceed through the lifecycle in normal terms.  It acts as a proxy record for another internal system we have.  I have code that periodically updates the RTC proxy record (custom work item).  So it wouldn't be accurate for the resolution date to reflect the date the record was closed since that is usually ex-post-facto.  I want to set the record close date to the system of record.  Normally, I would agree with you but I don't think that approach works in this case.

The code to change the workflow state is also available in my blog, in case you want to rather use a workflow in your proxy work item Andy.

Well, I guess this does not apply in a batched process. But please be aware that if you really resolve the work item later, the attribute might be overwritten.

1 vote

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 411
× 169

Question asked: Apr 29 '15, 7:34 p.m.

Question was seen: 4,751 times

Last updated: Apr 30 '15, 11:17 a.m.

Confirmation Cancel Confirm