Discourse Jira

:discourse: 요약 Discourse Jira는 프로젝트, 이슈 유형, 필드, 이슈 상태를 동기화하고 이슈를 관리합니다.
:hammer_and_wrench: 리포지토리 링크 https://github.com/discourse/discourse-jira
:open_book: 설치 가이드 Discourse에 플러그인 설치하는 방법

기능

  • Jira 프로젝트, 이슈 유형, 필드 및 필드 옵션이 자동으로 동기화됩니다.
  • 동적 이슈 생성 양식을 사용하여 Discourse 게시물에 대한 새 Jira 이슈를 생성합니다.
  • 기존 Jira 이슈를 Discourse 게시물에 연결합니다.
  • 웹훅을 사용하여 Jira 이슈 상태를 동기화합니다.

스크린샷

게시물 메뉴

설정

플러그인을 활성화하기 전에 아래 사이트 설정 값을 설정하세요.

  • discourse_jira_url: Jira 인스턴스의 URL을 입력하세요. / 기호로 끝나야 합니다.
  • discourse_jira_username: 이슈를 생성할 사용자의 사용자 이름입니다.
  • discourse_jira_password: 이슈를 생성하는 사용자에게 할당된 API 키입니다. 비밀번호도 작동할 수 있지만 안전하지 않으며, Atlassian에서 해당 API를 비추천(deprecated) 처리했습니다.
  • discourse_jira_enabled: Discourse에서 Jira 플러그인을 활성화합니다.
  • discourse_jira_allowed_groups: Jira 플러그인 기능에 액세스할 수 있는 그룹을 선택하세요. 기본값은 관리자(admin)와 모더레이터(mods)입니다.

웹훅

Jira에서 들어오는 웹훅을 검증하기 위해 비밀 토큰을 설정하세요.

  • discourse_jira_webhook_token: 이 토큰은 웹훅의 ‘t’ 쿼리 매개변수로 전달되어야 합니다.

예를 들어, 웹훅 토큰이 supersecret이고 기본 Discourse URL이 discourse.example.com이라면, Jira 인스턴스의 웹훅 설정에서 웹훅 URL을 https://discourse.example.com/jira/issues/webhook?t=supersecret 으로 설정해야 합니다.

웹훅이 트리거되고 출력된 바디가 올바른지 확인하는 것만 원한다면, RequestBin이나 Webhook.site와 같은 외부 웹사이트를 사용하여 임시 웹훅 URL을 설정하는 것도 좋습니다.

디버깅

discourse_jira_verbose_log: 이 설정을 활성화하면 들어오는 웹훅과 나가는 API 요청의 페이로드를 로그에 기록합니다.

:discourse2: 저희가 호스팅하고 계신가요? 이 플러그인은 저희의 엔터프라이즈 플랜에서 사용할 수 있습니다.

10개의 좋아요

@vinothkannans we’ve noticed that our users cannot actually see the status of these tickets, that only admins can see them. Can anything be done to make the “status” more visible to users?

One option could be of course making that quote block visible, or it would also be nice if you could map Jira statuses to tags, and that the topic tag updated to reflect the ticket progress (#backlog, #in-progress, #complete, etc.).

To piggy back off of Jordan, I have some additional ideas to improve this plugin.

  1. Ability to detach a JIRA ticket. I don’t see an option to detach or delete a JIRA ticket that I linked to a post.
  2. Choose which groups can see attached JIRA tickets. Right now it only looks like site admins can see them, but we would like the option to select one or more additional groups that can see them.
  3. Visibility levels. Ability to specify which part(s) of the ticket will appear to non-admins. For example, maybe we want all groups to see the ticket number and status, but not the title of the ticket, which may contain sensitive information. Then, we can specify trusted groups that can see the ticket title.
2개의 좋아요

Your suggestions would really enhance the experience with this plugin.

We really need to have the content be able to be revealed to a specified group (that isn’t admins).

Is there a OpenProject version of this? Would be great to have since we use OpenProject for managing our tasks.

@jordan-violet @colin.mckibben these are good suggestions to make the plugin more useful. I will keep this in mind when I work on it next time.

1개의 좋아요

Hi, I have a question about configuring the plugin. I have been getting 500 errors when creating/ attaching issue so I think my settings are not entirely right. What did i do wrong?

First, I copied and pasted where I normally accessed my Jira instance into discourse jira url, although I am not completely certain about the URL since dependent on the selected Jira view the URL is different.

First, I set a random discourse jira username, with the discourse jira password copied and pasted from a generated Atlassian API token.



Then I added a Jira Webhook and set the URL of the Jira webhook to the URL of my discourse instance plus /jira/issues/webhook?t=

Then I set the Webhook secret, and copy and paste that secret back to the plugin config field discourse jira webhook token.

Any thoughts? Help much appreciated! Thanks.

Can anyone share your working plugin settings in Discourse (without the password/ token of course) so I can see how you get it to work? Thanks!

I copied the webhook token back into the URL in the Jira webhook setup, so it says https://example.com/jira/issues/webhook?t=abcdefghijk, and also your discourse_jira_url is supposed to be https://modernsquared.atlassian.net/ without the path.

@vinothkannans I have another question though: Is it possible to change which issue is attached to a topic after attaching, or simply remove/delete the attachment? If not, have you thought about implementing it?

Thanks @mikael.gundhus , I was able to get the plugin to connect to Jira.

But I ran into some oddity. I am not sure if I am the only one running into this issue, but the button Create and Attach issues seems to be reversed? When I click on the Create Issue button the plugin takes me to the attach issue screen:

And when I click on the Attach issue button the plugin takes me to the create issue screen: MS-155 is an existing issue in Jira. If I type in a new issue, say, MS-200, which doesn’t exist in Jira, it tells me An error occurred: You are not permitted to view the requested resource.

@mikael.gundhus yes, there should be an option to remove the existing attachment. @ckshen seems like it have wrong headings on modal windows. We will work on these in next iteration.

Are there plans to make this accessible to users who aren’t admins/mods? We have internal teams that are looking to move their operations to Discourse, and as it stands, the only way for them to use the JIra tool is by giving them site-wide moderation privileges.

4개의 좋아요

I’ve just updated this plugin with Group permissions! It defaults to and must always include Admins, but with this update users can now make Jira tickets without needing to be Admin-level. Enjoy!

5개의 좋아요

Hey Folks,

Has anyone successfully got this plugin working with Jira server or Datacenter?

I am not seeing any attachment option and seeing an error in the logs.

Job exception: DiscourseJira::InvalidURI

1개의 좋아요

So far we’ve only built this plugin using APIs for Jira Cloud. So you might not be successful with Jira DC.

Jira Cloud REST doc: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-get
Jira DC/Server REST doc: https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples

1개의 좋아요

Thanks Natalie, after adding our host to the allowed internal hosts under Security, we were able to link and create issues. This probably is helpful to know for anyone using an internal instance of Jira. Still working on comment sync but I believe that is a config issue.

2개의 좋아요

Does this feature work with Jira Service Management Projects as well?

Seems there is an incompatibility between jira and reactions

1개의 좋아요

자체 호스팅한 Jira Datacenter 인스턴스에서 이 방법을 시도해 보았지만 막혀 있는 것 같습니다. 도움을 주시면 정말 감사하겠습니다.

요약 - 201과 JSON을 반환해야 하는데 403과 HTML이 반환되고 있습니다:

`/var/www/discourse/plugins/discourse-jira/lib/discourse_jira/api.rb:63:in ‘DiscourseJira::Api.getJSON’`

  • Jira 개인 액세스 토큰을 생성했습니다.
  • API 경로로 /, /rest, /rest/api, /rest/api/latest를 여러 번 시도해 보았습니다 :left_arrow: 마지막 경로가 작동하는지 확인했습니다.
  • 어떤 설정을 하든 JSON 대신 HTML이 계속 반환됩니다.

플러그인 설정에서 무언가 잘못하고 있는 것 같지만, 어디가 문제인지 파악이 되지 않습니다. JIRA Datacenter에서 이 기능을 성공적으로 작동시킨 분이라면, 조언을 구할 수 있을까요?

감사합니다

Bruce