public List<Object> selectIssuesColumn(
     IssueQuery query, String column, @Nullable Integer userId) {
   SqlSession session = mybatis.openSession();
   try {
     IssueStatsMapper mapper = session.getMapper(IssueStatsMapper.class);
     return mapper.selectIssuesColumn(
         query, column, query.componentRoots(), userId, query.requiredRole());
   } finally {
     MyBatis.closeQuietly(session);
   }
 }
Exemple #2
0
  @Override
  public void handle(Request request, Response response) {
    String issueKey = request.requiredParam("key");
    IssueQueryResult queryResult =
        issueFinder.find(IssueQuery.builder().issueKeys(Arrays.asList(issueKey)).build());
    if (queryResult.issues().size() != 1) {
      throw new NotFoundException("Issue not found: " + issueKey);
    }
    DefaultIssue issue = (DefaultIssue) queryResult.first();

    JsonWriter json = response.newJsonWriter();
    json.beginObject().name("issue").beginObject();

    writeIssue(queryResult, issue, json);
    writeTransitions(issue, json);
    writeActions(issue, json);
    writeComments(queryResult, issue, json);
    writeChangelog(issue, json);

    json.endObject().endObject().close();
  }