我尝试将讨论添加到用户故事。部分代码
QueryResponse storyQueryResponse = restApi.query(storyRequest);
JsonObject storyJsonObject = storyQueryResponse.getResults().get(0).getAsJsonObject();
String storyRef = storyJsonObject.get("_ref").toString();
System.out.println("Ref: " + storyRef);
Ref ref = new Ref();
System.out.println(ref.getOidFromRef(storyRef));
System.out.println(ref.isRef(storyRef));
createDis.addProperty("Artifact", ref.getOidFromRef(storyRef));
createDis.addProperty("Text", "Java-Java-Java-Java-Java-Java-Java-Java-Java-Java-Java-Java");
CreateRequest createRequest = new CreateRequest("ConversationPost", createDis);
CreateResponse createResponse = restApi.create(createRequest);
System.out.println("Ref: " + storyRef) return Ref: " https://rally1.rallydev.com/slm/webservice/v2.0/hierarchicalrequirement/13097497257 "
ref.getOidFromRef(storyRef) 返回 NULL ref.isRef(storyRef) 返回 FALSE
为什么???