-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Support for Jira Data Center #576
Comments
It is my understanding that Atlassian is retiring support of self-hosted Jira instances, let me know if I'm incorrect. |
See https://www.atlassian.com/migration/assess/journey-to-cloud which means that server instances will no longer receive security updates. Given this I would not support an End of Life product directly, if the functionality desired is available on cloud and would also work on server I'm open to a PR. |
Atlassian retired the single-instance Server licenses but still plan to support the clustered On-prem Data Center licenses. |
Thanks for the clarification, I'm open to supporting data center if it remains supported by Atlassian. I will take a look at what it will require to make the authentication and configuration work. |
The Data Center product will still be supported. That because Atlassian is writing on their website "Upgrade to Data Center". |
Hello, We did a reference implementation for the Jira data center integration with the library go-jira. Here are some code snippets: client.go package jira
import (
jira "github.com/andygrunwald/go-jira/v2/onpremise"
)
// New creates a new JIRA client
func New(config Config) (*Client, error) {
tp := jira.BearerAuthTransport{
Token: config.AccessToken,
}
instance, err := jira.NewClient(config.InstanceHost, tp.Client())
if err != nil {
return nil, err
}
return &Client{
instance: instance,
}, nil
} stories.go package jira
import (
"context"
jira "github.com/andygrunwald/go-jira/v2/onpremise"
)
func (c *Client) StoriesJQLSearch(ctx context.Context, jql string, fields []string, startAt int, maxResults int) (*IssuesSearchResult, error) {
iss := IssuesSearchResult{}
opt := &jira.SearchOptions{
MaxResults: maxResults, // Max results can go up to 1000
StartAt: startAt,
}
issues, respo, err := c.instance.Issue.Search(ctx, jql, opt)
if err != nil {
return nil, err
}
iss.Total = respo.Total
iss.Issues = issues
return &iss, err
} types.go package jira
import (
jira "github.com/andygrunwald/go-jira/v2/onpremise"
)
// Config is the configuration for the Jira client
type Config struct {
InstanceHost string `json:"instance_host"`
AccessToken string `json:"access_token"`
ClientMail string `json:"client_mail"`
}
// Client is the Jira client
type Client struct {
instance *jira.Client
}
// IssuesSearchResult is the result of a search for issues
type IssuesSearchResult struct {
Total int `json:"total"`
Issues []jira.Issue `json:"issues"`
} This sample works fine with the import via JQL, and we tested it with Atlassion Jira 9.15.x. An e-mail address isn't needed for the on-prem data center login, only the token. I think the only thing that is needed is some sort of switch in the UI to cover booth cases. Furthermore, we also improved the description output (maybe this can also be used in Atlassion cloud): We used a library jira2md. JQLImport.svelte import {jira_to_html } from 'jira2md';
.
.
.
description: jira_to_html(story.fields.description), This renders the Jira description output into HTML and gives a nice looking output. |
I would gladly accept a PR to support on prem as long as it maintains the cloud support as well. |
Description
We would love to utilize the Jira functionality but found that it does not support Jira Data Center as we self-host our Jira cluster.
It would be great if support could be added for Jira Data Center alongside Cloud.
Describe the solution you'd like
The primary difference I see between the two is that Jira Data Center can utilize Personal Access Tokens when interacting with the API: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html
Describe alternatives you've considered
No response
The text was updated successfully, but these errors were encountered: