本文整理汇总了Java中com.atlassian.jira.rest.client.api.domain.Comment类的典型用法代码示例。如果您正苦于以下问题:Java Comment类的具体用法?Java Comment怎么用?Java Comment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Comment类属于com.atlassian.jira.rest.client.api.domain包,在下文中一共展示了Comment类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: close
import com.atlassian.jira.rest.client.api.domain.Comment; //导入依赖的package包/类
@Override
public void close(String id) {
Validate.notNull(restClient, "Jira REST client must be specified.");
try {
final Issue issue = restClient.getIssueClient().getIssue(id).get();
final Iterable<Transition> transitions = restClient.getIssueClient().getTransitions(issue.getTransitionsUri()).claim();
final Transition resolveIssueTransition = getTransitionByName(transitions, "Resolve Issue");
final Collection<FieldInput> fieldInputs;
if (jiraBuildNumber > ServerVersionConstants.BN_JIRA_5) {
fieldInputs = Arrays.asList(new FieldInput("resolution", ComplexIssueInputFieldValue.with("name", "Done")));
} else {
fieldInputs = Arrays.asList(new FieldInput("resolution", "Done"));
}
final Comment closingMessage = Comment.valueOf(getClosingMessage());
final TransitionInput transitionInput = new TransitionInput(resolveIssueTransition.getId(), fieldInputs, closingMessage);
restClient.getIssueClient().transition(issue.getTransitionsUri(), transitionInput).claim();
} catch (Exception e) {
// error while getting Issue to close, doing nothing
}
}
开发者ID:arquillian,项目名称:arquillian-governor,代码行数:27,代码来源:JiraGovernorClient.java
注:本文中的com.atlassian.jira.rest.client.api.domain.Comment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论