How to set creator of a WI and Attachments in WI through Plain Old Java Client?
Is there a way/method by which we could change the 'Created By' attribute by Plain Old Java Client? I know how can do it by Bugzilla. We have created a tool to upload bulk Attachments for WIs as a part of HP QC to Jazz migration. Though we are able to perform this operation, the creator and created date of the attachment remaining unsuccessful.
so thought of keeping you updated about this to discuss this further. |
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Aug 09 '12, 12:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Harish,
you can use the following built in methods on IWorkitem to set the creator/owner: IWorkItem workItem = workingCopy.getWorkItem(); workItem.setCreator(contributor); workItem.setOwner(contributor); Please see https://rsjazz.wordpress.com/2012/08/02/subscribing-to-a-work-item-using-the-java-api/ how to use
fTeamRepository.contributorManager().fetchContributorByUserId()
to get the user if you just have the ID. Harish Raj selected this answer as the correct answer
Comments
Harish Raj
commented Aug 09 '12, 2:25 a.m.
Thanks, Ralph. Any Idea how to set the creator of the attachment and creation date of the attachment in a WI through Java API? |
2 other answers
Ralph Schoon (63.5k●3●36●46)
| answered Aug 09 '12, 2:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Harish,
I looked into the API and could not find a setter for the creator or the the creation date. It might be impossible to do. I am not sure but I think I remember that I have seen a similar issue with the ClearQuest Synchronizer. |
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.