🤖

본 콘텐츠의 이미지 및 내용은 AI로 생성되었습니다.

⚠️

본 콘텐츠의 이미지 및 내용을 무단으로 복제, 배포, 수정하여 사용할 경우 저작권법에 의해 법적 제재를 받을 수 있습니다.

이미지 로딩 중...

Jira 최신 기능 소개 2024 - 슬라이드 1/9
A

AI Generated

2025. 11. 5. · 8 Views

Jira 최신 기능 소개 2024

Jira의 최신 기능들을 개발자 관점에서 소개합니다. REST API 활용부터 자동화 규칙, JQL 쿼리까지 실무에 바로 적용할 수 있는 기능들을 다룹니다.


카테고리:JavaScript
언어:JavaScript
메인 태그:#Jira
서브 태그:
#API#Automation#JQL#Integration

들어가며

이 글에서는 Jira 최신 기능 소개 2024에 대해 상세히 알아보겠습니다. 총 8가지 주요 개념을 다루며, 각각의 개념에 대한 설명과 실제 코드 예제를 함께 제공합니다.

목차

  1. Jira_REST_API_기본_사용
  2. 이슈_생성_자동화
  3. JQL_쿼리_활용
  4. 이슈_상태_변경
  5. 커스텀_필드_조회
  6. 코멘트_추가_기능
  7. Webhook_설정_예제
  8. 대시보드_데이터_수집

1. Jira REST API 기본 사용

개요

Jira REST API를 사용하여 이슈를 조회하는 기본적인 방법입니다. 프로젝트의 이슈 목록을 가져올 수 있습니다.

코드 예제

const fetchJiraIssues = async () => {
  const response = await fetch('https://your-domain.atlassian.net/rest/api/3/search', {
    headers: {
      'Authorization': `Basic ${btoa('email:api_token')}`,
      'Content-Type': 'application/json'
    }
  });
  return await response.json();
};

설명

Jira Cloud REST API v3를 사용하여 이슈를 검색합니다. Basic 인증으로 이메일과 API 토큰을 사용합니다.


2. 이슈 생성 자동화

개요

Jira API를 통해 새로운 이슈를 프로그래밍 방식으로 생성할 수 있습니다. 버그 리포트나 작업을 자동으로 등록할 때 유용합니다.

코드 예제

const createJiraIssue = async (summary, description) => {
  const issue = {
    fields: {
      project: { key: 'PROJ' },
      summary: summary,
      description: { type: 'doc', content: [{type: 'paragraph', content: [{type: 'text', text: description}]}] },
      issuetype: { name: 'Task' }
    }
  };
  return await fetch('https://your-domain.atlassian.net/rest/api/3/issue', {
    method: 'POST',
    headers: { 'Authorization': `Basic ${btoa('email:token')}`, 'Content-Type': 'application/json' },
    body: JSON.stringify(issue)
  });
};

설명

프로젝트 키, 제목, 설명을 지정하여 새 이슈를 생성합니다. Atlassian Document Format으로 설명을 작성합니다.


3. JQL 쿼리 활용

개요

JQL(Jira Query Language)을 사용하여 특정 조건의 이슈를 검색합니다. 복잡한 필터링이 가능합니다.

코드 예제

const searchWithJQL = async (jql) => {
  const params = new URLSearchParams({
    jql: jql,
    maxResults: 50,
    fields: 'summary,status,assignee'
  });
  const response = await fetch(
    `https://your-domain.atlassian.net/rest/api/3/search?${params}`,
    { headers: { 'Authorization': `Basic ${btoa('email:token')}` }}
  );
  return await response.json();
};

설명

JQL 쿼리로 원하는 조건의 이슈를 검색하고, 필요한 필드만 선택하여 가져올 수 있습니다.


4. 이슈 상태 변경

개요

Jira 이슈의 상태를 프로그래밍 방식으로 변경할 수 있습니다. 워크플로우의 전환(transition)을 수행합니다.

코드 예제

const transitionIssue = async (issueKey, transitionId) => {
  const transition = {
    transition: { id: transitionId }
  };
  return await fetch(
    `https://your-domain.atlassian.net/rest/api/3/issue/${issueKey}/transitions`,
    {
      method: 'POST',
      headers: { 'Authorization': `Basic ${btoa('email:token')}`, 'Content-Type': 'application/json' },
      body: JSON.stringify(transition)
    }
  );
};

설명

이슈 키와 전환 ID를 사용하여 이슈의 상태를 변경합니다. 예: To Do → In Progress → Done


5. 커스텀 필드 조회

개요

Jira의 커스텀 필드 값을 조회하고 활용할 수 있습니다. 프로젝트별 특수한 필드 정보를 가져옵니다.

코드 예제

const getCustomFields = async (issueKey) => {
  const response = await fetch(
    `https://your-domain.atlassian.net/rest/api/3/issue/${issueKey}`,
    { headers: { 'Authorization': `Basic ${btoa('email:token')}` }}
  );
  const data = await response.json();
  return data.fields.customfield_10001; // 커스텀 필드 ID
};

설명

특정 이슈의 커스텀 필드 값을 조회합니다. 커스텀 필드는 'customfield_xxxxx' 형식의 ID를 가집니다.


6. 코멘트 추가 기능

개요

Jira 이슈에 코멘트를 프로그래밍 방식으로 추가할 수 있습니다. 자동 알림이나 업데이트에 활용됩니다.

코드 예제

const addComment = async (issueKey, commentText) => {
  const comment = {
    body: {
      type: 'doc',
      content: [{type: 'paragraph', content: [{type: 'text', text: commentText}]}]
    }
  };
  return await fetch(
    `https://your-domain.atlassian.net/rest/api/3/issue/${issueKey}/comment`,
    {
      method: 'POST',
      headers: { 'Authorization': `Basic ${btoa('email:token')}`, 'Content-Type': 'application/json' },
      body: JSON.stringify(comment)
    }
  );
};

설명

이슈 키를 지정하고 Atlassian Document Format으로 코멘트를 작성하여 추가합니다.


7. Webhook 설정 예제

개요

Jira Webhook을 받아서 이벤트를 처리하는 서버 코드입니다. 이슈 생성, 업데이트 등의 이벤트를 실시간으로 받을 수 있습니다.

코드 예제

const express = require('express');
const app = express();

app.post('/jira-webhook', express.json(), (req, res) => {
  const { webhookEvent, issue } = req.body;
  console.log(`Event: ${webhookEvent}`);
  console.log(`Issue: ${issue.key} - ${issue.fields.summary}`);
  res.status(200).send('OK');
});

app.listen(3000);

설명

Express 서버로 Jira Webhook을 받아 이벤트 타입과 이슈 정보를 처리합니다. 실시간 알림 시스템 구축에 유용합니다.


8. 대시보드 데이터 수집

개요

Jira API를 활용하여 대시보드용 통계 데이터를 수집합니다. 프로젝트의 현황을 파악할 수 있습니다.

코드 예제

const getDashboardStats = async (projectKey) => {
  const jqls = [
    `project=${projectKey} AND status="To Do"`,
    `project=${projectKey} AND status="In Progress"`,
    `project=${projectKey} AND status="Done"`
  ];
  const stats = await Promise.all(
    jqls.map(jql => searchWithJQL(jql))
  );
  return stats.map((s, i) => ({ status: ['Todo', 'InProgress', 'Done'][i], count: s.total }));
};

설명

여러 JQL 쿼리를 병렬로 실행하여 상태별 이슈 개수를 집계합니다. 프로젝트 진행 상황을 한눈에 파악할 수 있습니다.


마치며

이번 글에서는 Jira 최신 기능 소개 2024에 대해 알아보았습니다. 총 8가지 개념을 다루었으며, 각각의 사용법과 예제를 살펴보았습니다.

관련 태그

#Jira #API #Automation #JQL #Integration

#Jira#API#Automation#JQL#Integration#JavaScript

댓글 (0)

댓글을 작성하려면 로그인이 필요합니다.