Getting exception when trying to remove change set linked to work item
Hello,
Currently, I want to remove the change set links to work item programmatically.
I am using RTC 6.0.5.
Below is the snip code to remove link:
IFileSystemWorkItemManager fileSystemWorkItemManager =
But the below exception is thrown:
Note: It worked fine one year ago.
Is there any issue with this API?
Is there any API to remove change set link?
|
2 answers
The stack trace that is attached to this post is for a work item save. We would expect this to fail if the save attempted to add or remove a change set link.
A call to IFileSystemWorkItemManager#deleteLinks would remove the link from the server and then apply the link changes to the link manager so local copies of the work item can be updated. Is it possible you have an editor on the work item open or created a working copy of the work item before the link was removed. It is possible that the link was removed but the subsequent save of the work item working copy failed because it was not in-sync with the latest state of the work item.
Comments
Nguyen Sy Nguyen
commented Oct 18 '18, 10:22 a.m.
Thank you for your answer.
When calling remove link, I don't update anything on this work item.
And the link was NOT removed too.
Geoffrey Clemm
commented Oct 22 '18, 12:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Do we know why an exception from a call to fileSystemWorkItemManager.deleteLinks() is producing a stack trace for WorkItemWorkingCopyImpl.save() ?
Krzysztof Kaźmierczyk
commented Oct 24 '18, 2:56 a.m.
@gmclemm - is your question to the customer or to the development?
Geoffrey Clemm
commented Oct 24 '18, 4:51 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I'm happy for an answer from either source (:-), but I expect that we'd need one from development.
Krzysztof Kaźmierczyk
commented Nov 06 '18, 4:30 a.m.
Geoffrey Clemm
commented Nov 18 '18, 12:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
We have discussed with Support, and for an RTC API, you can get help from IBM support by creating a simple program that demonstrates the bug when running against the sample project area ("Money that Matters"). That would be the best way to track this down.
Nguyen Sy Nguyen
commented Dec 18 '18, 10:01 p.m.
Thank you all for your supports.
It works fine on 6.0.6_ifix002.
showing 5 of 7
show 2 more comments
|
Ralph Schoon (63.3k●3●36●46)
| answered Sep 28 '18, 3:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER In my experience, the RTC SCM service reserves certain operations for itself. That means, there is a component ID that is associated to services such as SCM or work item etc. The operation checks the requests component ID and can reject operations that come from someone that should not request it. Links of this type may only be modified by the defining component. Link Type: com.ibm.team.filesystem.workitems.change_set Defining Component: com.ibm.team.filesystem.workitems Requesting Component: com.ibm.team.workitemThis has always been the case. I remember that I ran into the same issue when working on the work item command line. I have also seen this in the server API.
In the server AI, you can basically use the component ID you want, when defining your server extension. I am not sure about what to do in the client API. I would search the SDK for where change set links are created and removed in the Client API and check if there is a method in one of the classes com.ibm.team.filesystem that does this and can be used instead.
Comments Having said that, if the same code worked for other 6.0.x versions, this could be an issue with the API. The Work item API is supported, so maybe asking support is an option. Ideally providing the source code.
Geoffrey Clemm
commented Sep 30 '18, 1:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I'll ask development to take a look at this question, and add a response. |
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.
Comments
the statement "it worked fine one year ago" means, with RTC 6.0.3 and 6.0.4