It's all about the answers!

Ask a question

how to get deleted workitems using RTC Java API


Neha Sharma (1316) | asked Aug 26 '15, 6:17 a.m.
edited Aug 26 '15, 6:22 a.m.
 I want to get list of workitems that are deleted from a project using java API.

Can anyone please share code for same?

2 answers



permanent link
Krzysztof Kaźmierczyk (7.4k373103) | answered Aug 26 '15, 6:37 a.m.
According to this thread try using following steps:

 IWorkItem workItem = workItemClient.findWorkItemById(id, IWorkItem.SMALL_PROFILE, monitor);
    IDetailedStatus status = workItemClient.deleteWorkItem(workItem, monitor);

    if (!status.isOK()) {
            throw new TeamRepositoryException("Error deleting work item",
                    status.getException());
    }

    System.out.println("Deleted work item: " + idString + ".");


Comments
Neha Sharma commented Aug 26 '15, 6:53 a.m.

Above code is to delete a workitem in RTC. I don't want to delete workitem instead I want to get the ones that are deleted.


permanent link
Geoffrey Clemm (30.1k33035) | answered Aug 28 '15, 11:30 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
My understanding is that deleted work items are really deleted (which is why ADMIN privileges are required to delete them).   Once deleted, they no longer exist in the database, and would have to be retrieved from a backup made of the database before the deletion occurred.


Comments
Neha Sharma commented Aug 31 '15, 4:47 a.m.

 Is there no concept in RTC like recycle bin that we have in HP Quality Center? If a particular item is deleted, it moves from current location to recycle bin.


Ralph Schoon commented Aug 31 '15, 4:54 a.m. | edited Aug 31 '15, 4:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As far as I am aware if they are deleted, they are gone. That is why you usually don't delete work items, but close them to be able to filter them away.

Your answer


Register or 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.