programmatic way to change "modified by","cre
I've found the eclipse UI allows you to change the "Owned by" field when you right click in the area of the "Owned by" column.
We have an issue because due to problems with bug migration from Bugzilla we have ended up with two very similar users on the system. (we use ldap for authentication which refers to jkelly as JKELLY@company.com So our server already had JKELLY@company.com as a user, but the migration process also created a user called jkelly@company.com and set the - Owned by - Created by - Modified by - Resolved by to be jkelly@company.com Is there a programmatic way to fix this up, so i can modify ALL references to jkelly@company.com to be changed to JKELLY@company.com ? |
7 answers
You should be able to fix the createdBy, OwnedBy and ResolvedBy fields. But modifiedBy field would be set to the user you logged in as when you ran the program.
To fix the fields, you need to do the following 1. Get the item id for user " jkelly@company.com" and "JKELLY@company.com". You can use contributorManager to perform this query 2. Perform a query to get all the Work items owned by / resolved by / created by " jkelly@company.com" item id. Use query service to perform this query. 3. replace " jkelly@company.com" item id with "JKELLY@company.com" item id and save the item. --- Balaji I've found the eclipse UI allows you to change the "Owned by" field when you right click in the area of the "Owned by" column. |
hey - thanks - very useful
also started to look at https://jazz.net/learn/LearnItem.jsp?href=content/docs/hello-jazz/index.html but can't seem to find com.ibm.team.repository.service.serviceProvider has some refactoring gone on since the example was written ? regards John |
ok - found the SDK now....
...but, if i call item.setCreator() i get a com.ibm.team.repository.common.internal.ImmutablePropertyException is there a way to override this? I'm sure Javadoc would help, but I can't find any... |
When you fetch an item, we return an immutable copy of the item.
Get the working copy of the item before setting the new values. Basic flow : 1. Get the item 2. Get the working copy of the item using item.getWorkingCopy 3. set the values 4. Save the item --- Balaji Jazz Server Team ok - found the SDK now.... |
|
What attribute id do you use for work item's Resolved By attributes?
I added the following to the mapping file: attribute sourceId="resolutiondate" targetId="com.ibm.team.workitem.attribute.resolutiondate" attribute sourceId="ResolvedBy" targetId="com.ibm.team.workitem.attribute.resolvedby" and got Resolution Date work, but can't get the Resolved By imported. |
What attribute id do you use for work item's Resolved By attributes? I've put the source of my application on my personal website blog at http://www.greenelk.co.uk/index.php/blogmenu/15-rtc-utility-to-move-workitems-from-one-user-to-another - hope it's of some help.. regards John |
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.