Fill custom date attribute with value for artifacts in dng
Sagnick Banerjee (11●1●2)
| asked Dec 11 '17, 8:36 a.m.
edited Dec 11 '17, 1:54 p.m. by Geoffrey Clemm (30.1k●3●30●35) 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.
|
2 answers
|
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
Comments
Sagnick Banerjee
commented Dec 14 '17, 4:48 a.m.
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
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
Hi, Are you using OSLC reqeust directly or using o library like Eclipse Lyo ?