Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] Issue Getting and Setting Test Plan's Related Change Requests

Thanks for the confirmation.  The thing is, I need to create OSLC links and thus need to PUT things back.  The big lesson learned today is that if you PUT back, you better have done a GET on the entire asset, or else when you PUT it back, you're going to lose (i.e., not put back) whatever you didn't GET.  I suppose the other option would be to do a partial update.  Does the API support doing a partial update of OSLC links?


Regards,

Daniel Chirillo
IBM Software Services for Rational
1-720-395-0914  (voice & fax)
chirillo@xxxxxxxxxx



From:        Paul McMahan/Raleigh/IBM@IBMUS
To:        Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Cc:        Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>, lyo-dev-bounces@xxxxxxxxxxx
Date:        01/22/2014 03:02 PM
Subject:        Re: [lyo-dev] Issue Getting and Setting Test        Plan's        Related        Change        Requests
Sent by:        lyo-dev-bounces@xxxxxxxxxxx




If you need to get a testplan which has a particular web ID then using the query is the best approach.   You should be able to include the test plan's list of related change requests in the query response instead of doing a additional GET if you add "oslc_qm:relatedChangeRequest" to the select.

Best wishes,
Paul McMahan
IBM Rational


Inactive hide details for Daniel Chirillo---01/22/2014 02:46:00 PM---User error, which I discovered while writing this responseDaniel Chirillo---01/22/2014 02:46:00 PM---User error, which I discovered while writing this response.  Full disclosure:  in my particular use

From:
Daniel Chirillo/New York/IBM@IBMUS
To:
Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Date:
01/22/2014 02:46 PM
Subject:
Re: [lyo-dev] Issue Getting and Setting Test Plan's Related Change Requests
Sent by:
lyo-dev-bounces@xxxxxxxxxxx




User error, which I discovered while writing this response.

Full disclosure:  in my particular use case the staring point is the RQM reportable REST API; I then switch to OSLC.  Here are the details of how I was actually doing the GET (@Paul:  Is there a better way to GET a test asset if your starting point is the web ID of the asset?).  The problem was the use of setSelect():


public
TestPlan getTestPlanByWebId(String testPlanWebId) {

              TestPlan theOslcTestPlan =
null;
             
if (rqmTestPlanQueryCapability == null) {
                     
rqmTestPlanQueryCapability = getTestPlanQueryCapability();
              }


              OslcQueryParameters queryParams =
new OslcQueryParameters();
              queryParams.setWhere(
"oslc:shortId=" + testPlanWebId);
             
queryParams.setSelect("dcterms:identifier,oslc:shortId,dcterms:title"); //THE PROBLEM
              OslcQuery query =
new OslcQuery(rqmClient, rqmTestPlanQueryCapability,
                              1, queryParams);


              OslcQueryResult result = query.submit();


             
for (TestPlan tp : result.getMembers(TestPlan.class)) {
                      theOslcTestPlan = tp;

              }


             
return theOslcTestPlan;
}



Changing the for loop in that method to this fixed the issue:


for
(TestPlan tp : result.getMembers(TestPlan.class)) {
      theOslcTestPlan = tp;

     
try {
              theOslcTestPlan =
rqmClient.getResource(
                                      theOslcTestPlan.getAbout().toString(),

                                      OslcMediaType.
APPLICATION_RDF_XML).getEntity(
                                      TestPlan.
class);
              }
catch (IOException e) {
                      e.printStackTrace();

              }
catch (OAuthException e) {
                      e.printStackTrace();

              }
catch (URISyntaxException e) {
                      e.printStackTrace();

              }

      }




Regards,


Daniel Chirillo

IBM Software Services for Rational

1-720-395-0914  (voice & fax)

chirillo@xxxxxxxxxx




From:        
Paul McMahan/Raleigh/IBM@IBMUS
To:        
Lyo project developer discussions <lyo-dev@xxxxxxxxxxx>
Cc:        
"Lyo project developer discussions" <lyo-dev@xxxxxxxxxxx>, lyo-dev-bounces@xxxxxxxxxxx
Date:        
01/22/2014 02:13 PM
Subject:        
Re: [lyo-dev] Issue Getting and Setting Test Plan's Related        Change        Requests
Sent by:        
lyo-dev-bounces@xxxxxxxxxxx




I don't see a problem with TestPlan class in Lyo, and you mentioned that you observed this behavior with CLM 4.0.5.   Are there some intermediate steps such as GET or PUT resources to the CLM server that are required to recreate this issue?


Best wishes,
Paul McMahan
IBM Rational


Inactive hide details for Daniel Chirillo---01/22/2014 11:25:08 AM---I'm seeing the following behavior with CLM 4.0.5: 1.  TestDaniel Chirillo---01/22/2014 11:25:08 AM---I'm seeing the following behavior with CLM 4.0.5: 1.  TestPlan.getRelatedChangeRequests() always ret

From:
Daniel Chirillo/New York/IBM@IBMUS
To:
"Lyo project developer discussions" <lyo-dev@xxxxxxxxxxx>
Date:
01/22/2014 11:25 AM
Subject:
[lyo-dev] Issue Getting and Setting Test Plan's Related Change Requests
Sent by:
lyo-dev-bounces@xxxxxxxxxxx




I'm seeing the following behavior with CLM 4.0.5:


1.  TestPlan.getRelatedChangeRequests() always returns an empty array.


2.  TestPlan.addRelatedChangeRequest() sets instead of adds, i.e., adds the change request you pass it and blows away the change requests that are already linked to the plan.



Regards,


Daniel Chirillo

IBM Software Services for Rational

1-720-395-0914  (voice & fax)

chirillo@xxxxxxxxxx
_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/lyo-dev
_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/lyo-dev
_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/lyo-dev
_______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/lyo-dev


Back to the top