It's all about the answers!

Ask a question

OSLC query to fetch workitem that have not been soft deleted.


Sanjeet Pattnaik (1514) | asked Mar 28 '19, 2:31 a.m.

Hi,

We want to fetch WorkItems from RTC that have not been deleted from the UI and created between specific time interval.

Currently we are using the OSLC query: <o:p> </o:p>

<RTC URL>/ccm/oslc/contexts/<Proj Area UID>/workitems?oslc.where=rtc_cm%3Atype+%3D%22<WorkItem Backend name>%22+and+dcterms%3Amodified%3E%22<Creation Start Date>%22+and+%20rtc_cm%3Astate%21%3D%22%7Bclosed%7D%22+and+dcterms%3Amodified%3C%3D%22<Creation End Date>%22&amp;oslc.select+=+dcterms%3Aidentifier <o:p> </o:p>

 

This query fetches both types of WorkItems, valid and deleted ones. <o:p> </o:p>

Kindly let us know how to fetch only the valid, non-deleted WorkItems. <o:p> </o:p>

 

Thanks, <o:p> </o:p>

Sanjeet <o:p> </o:p>


Comments
Lawrence Smith commented Mar 29 '19, 12:50 p.m.
JAZZ DEVELOPER

Can you clarify how the delete of the work items was performed?  There is not a "soft delete" for work items so the items are removed from the repository when they are deleted using the user interface, which is enabled by permissions and JazzProjectAdmins or JazzAdmin repository role


Sanjeet Pattnaik commented Apr 01 '19, 4:49 a.m. | edited Apr 01 '19, 4:51 a.m.

The ISSOFTDELETED column is used to check the validity, here as the value is 0 only the non-deleted workitems are fetched. For example, in report builder we write:-

SELECT DISTINCT T1.PROJECT_NAME,T1.URL AS URL1, T1.REQUEST_TYPE FROM RIDW.VW_REQUEST T1 WHERE T1.PROJECT_ID=85 AND (T1.REQUEST_TYPE='ADT Task') AND T1.ISSOFTDELETED=0 AND (T1.REQUEST_ID <> -1 AND T1.REQUEST_ID IS NOT NULL

So, we wanted to know if the same SQL query can be converted to OSLC query.

2 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered Apr 02 '19, 11:50 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The "delete" for a work item should be destructive, so that no remnant of that work item exists in the repository for retrieval in any fashion, including by a query.   If you have deleted a work item, and it is still accessible via a query, then that is a bug that should be reported.


permanent link
David Honey (1.8k17) | answered Apr 02 '19, 9:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Have you tried including "oslc:archived=false" to your query?

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.