Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Fill custom date attribute with value for artifacts in dng

 I am trying to fill custom date field with some custom date value for artifacts, through oslc, by extending the extended properties of artifact.

But this do not throw any exception but neither update the date field for the artifact.
Suggest me how to update the date values programmatically.

0 votes

Comments

 Hi,   Are you using OSLC reqeust directly or using o library like Eclipse Lyo ?

Best Regards.



2 answers

Permanent link

Using o library like Eclipse Lyo

0 votes


Permanent link

 In that case you can try following workaraound:

                                //Get Feature Requirement Type URL
ResourceShape featureInstanceShape = RmUtil.lookupRequirementsInstanceShapes(
serviceProviderUrl, OSLCConstants.OSLC_RM_V2,
OSLCConstants.RM_REQUIREMENT_TYPE, client, "Feature");


// We need to use Resource shapes to properly handle date attributes attributes,
// so they aren't interpreted as dateTime.
// The following 4 lines will enable the logic to properly handle date attributes
List<ResourceShape> shapes = new ArrayList<ResourceShape>();
shapes.add(featureInstanceShape);
OSLC4JUtils.setShapes(shapes);
OSLC4JUtils.setInferTypeFromShape("true");

After that Eclipse Lyo seems to handle dtaeTime fields better,

Good luck

0 votes

Comments

 Thanks for the feedback, but this I have already tried and it do not work. Can you please send me the date format or the code how you create a date for requirement management.

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,700

Question asked: Dec 11 '17, 8:36 a.m.

Question was seen: 2,223 times

Last updated: Dec 14 '17, 4:48 a.m.

Confirmation Cancel Confirm