jira

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const CreateIssuePayloadType = "jira.issue"
View Source
const CreateJiraIncidentPayloadType = "jira.incident.created"
View Source
const DeleteIssuePayloadType = "jira.issueDeleted"
View Source
const DeleteJiraIncidentPayloadType = "jira.incident.deleted"
View Source
const GetIssuePayloadType = "jira.issue"
View Source
const GetJiraIncidentPayloadType = "jira.incident.fetched"
View Source
const UpdateIssuePayloadType = "jira.issue"

Variables

This section is empty.

Functions

func IsIncidentManagementRequestPractice added in v0.22.0

func IsIncidentManagementRequestPractice(practice string) bool

IsIncidentManagementRequestPractice reports whether a JSM request type's `practice` field corresponds to the Incident management work category. The JSM Incidents REST API rejects create calls when the request type is not in that category.

Types

type ADFDoc

type ADFDoc struct {
	Type    string    `json:"type"`
	Version int       `json:"version"`
	Content []ADFNode `json:"content"`
}

func WrapInADF

func WrapInADF(text string) *ADFDoc

type ADFNode

type ADFNode struct {
	Type    string    `json:"type"`
	Content []ADFText `json:"content,omitempty"`
}

type ADFText

type ADFText struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

type Client

type Client struct {
	SiteURL string
	Email   string
	Token   string
	// contains filtered or unexported fields
}

Client speaks to Jira Cloud directly using the user's site URL and Basic Auth (email + API token). Endpoints resolve to `{siteUrl}/rest/api/3/...`.

func NewClient

func NewClient(httpCtx core.HTTPContext, ctx core.IntegrationContext) (*Client, error)

func (*Client) CreateIncident added in v0.22.0

func (c *Client) CreateIncident(cloudID string, req *CreateIncidentAPIRequest) (*CreateIncidentAPIResponse, error)

CreateIncident creates an incident via the JSM Incidents API.

func (*Client) CreateIssue

func (c *Client) CreateIssue(req *CreateIssueRequest) (*CreateIssueResponse, error)

func (*Client) DeleteIncident added in v0.22.0

func (c *Client) DeleteIncident(cloudID, issueID string) error

DeleteIncident deletes an incident via the JSM Incidents API.

func (*Client) DeleteIssue added in v0.22.0

func (c *Client) DeleteIssue(issueKey string, opts DeleteIssueOptions) error

func (*Client) DoTransition added in v0.22.0

func (c *Client) DoTransition(issueKey, id string) error

DoTransition advances an issue along the given workflow transition.

func (*Client) FetchCloudID added in v0.22.0

func (c *Client) FetchCloudID() (string, error)

FetchCloudID returns the Atlassian cloud id for the configured Jira site (required for the JSM Incidents API).

func (*Client) GetCurrentUser

func (c *Client) GetCurrentUser() (*User, error)

func (*Client) GetIncident added in v0.22.0

func (c *Client) GetIncident(cloudID, issueID string) (map[string]any, error)

GetIncident returns the incident from the JSM Incidents API (issueID must be the numeric Jira issue id).

func (*Client) GetIssue

func (c *Client) GetIssue(issueKey string) (*Issue, error)

func (*Client) GetIssueTransitions added in v0.22.0

func (c *Client) GetIssueTransitions(issueKey string) ([]Transition, error)

GetIssueTransitions returns the transitions available from an issue's current workflow state.

func (*Client) GetIssueWithOptions added in v0.22.0

func (c *Client) GetIssueWithOptions(issueKey string, opts GetIssueOptions) (*Issue, error)

func (*Client) GetProjectIssueTypes added in v0.22.0

func (c *Client) GetProjectIssueTypes(projectKey string) ([]IssueTypeMeta, error)

GetProjectIssueTypes returns the issue types available for creating issues in the given project. Uses the create-metadata endpoint which scopes the list to types the user is permitted to create.

func (*Client) GetProjectStatuses added in v0.22.0

func (c *Client) GetProjectStatuses(projectKey string) ([]Status, error)

GetProjectStatuses returns the unique set of statuses across all issue types in a project. /rest/api/3/project/{key}/statuses returns an entry per issue type, each with its own status list — we flatten and dedupe by status name.

func (*Client) GetRequestType added in v0.22.0

func (c *Client) GetRequestType(serviceDeskID, requestTypeID string) (*RequestType, error)

GetRequestType returns one request type, optionally expanded (always requests expand=practice).

func (*Client) ListAssignableUsers added in v0.22.0

func (c *Client) ListAssignableUsers(projectKey string) ([]User, error)

ListAssignableUsers returns the users assignable to issues in a given project. /rest/api/3/user/assignable/search is paginated; we cap at 50 entries, which matches the picker's practical UX.

func (*Client) ListCustomFieldOptions added in v0.22.0

func (c *Client) ListCustomFieldOptions(fieldID, projectKey, fieldLabel string) []RequestTypeFieldValue

ListCustomFieldOptions returns select options for a Jira field on Cloud using best-effort fallbacks.

func (*Client) ListCustomerRequestsByServiceDesk added in v0.22.0

func (c *Client) ListCustomerRequestsByServiceDesk(serviceDeskID string, maxTotal int) ([]CustomerRequestListed, error)

ListCustomerRequestsByServiceDesk pages through customer requests for a service desk. Agents often see JSM work here even when Jira platform issue search returns no rows for the same project.

func (*Client) ListFields added in v0.22.0

func (c *Client) ListFields() ([]JiraFieldInfo, error)

ListFields returns all fields visible to the integration (Jira REST API v3).

func (*Client) ListPriorities added in v0.22.0

func (c *Client) ListPriorities() ([]Priority, error)

ListPriorities returns all priorities configured on the Jira site. Priorities are instance-level, not project-scoped.

func (*Client) ListProjects

func (c *Client) ListProjects() ([]Project, error)

func (*Client) ListRequestTypeFields added in v0.22.0

func (c *Client) ListRequestTypeFields(serviceDeskID, requestTypeID string) ([]RequestTypeField, error)

ListRequestTypeFields returns fields for a service desk request type (including hidden fields).

func (*Client) ListRequestTypes added in v0.22.0

func (c *Client) ListRequestTypes(serviceDeskID string) ([]RequestType, error)

ListRequestTypes returns customer request types for a service desk.

func (*Client) ListServiceDesks added in v0.22.0

func (c *Client) ListServiceDesks() ([]ServiceDesk, error)

ListServiceDesks returns service desks the authenticated user can access.

func (*Client) ResolveNumericIssueID added in v0.22.0

func (c *Client) ResolveNumericIssueID(ref string) (string, error)

ResolveNumericIssueID returns the numeric issue id for the Incidents API path. If ref is all digits it is returned unchanged; otherwise ref is treated as an issue key and resolved with the Jira platform REST API.

func (*Client) SearchIssues added in v0.22.0

func (c *Client) SearchIssues(jql string, maxResults int) ([]IssueSearchHit, error)

SearchIssues runs a JQL search and returns the first page of issues (maxResults is capped at 100).

func (*Client) SearchIssuesUpTo added in v0.22.0

func (c *Client) SearchIssuesUpTo(jql string, maxIssues int) ([]IssueSearchHit, error)

SearchIssuesUpTo pages through POST /rest/api/3/search until maxIssues are collected, a page is short, or Jira reports no further results. Jira caps each request at 100 issues; busy service projects often need more than one page so incident pickers are not dominated by recently updated non-incident work.

func (*Client) UpdateIssue added in v0.22.0

func (c *Client) UpdateIssue(issueKey string, req *UpdateIssueRequest, opts UpdateIssueOptions) error

type CreateIncident added in v0.22.0

type CreateIncident struct{}

func (*CreateIncident) Cancel added in v0.22.0

func (c *CreateIncident) Cancel(ctx core.ExecutionContext) error

func (*CreateIncident) Cleanup added in v0.22.0

func (c *CreateIncident) Cleanup(ctx core.SetupContext) error

func (*CreateIncident) Color added in v0.22.0

func (c *CreateIncident) Color() string

func (*CreateIncident) Configuration added in v0.22.0

func (c *CreateIncident) Configuration() []configuration.Field

func (*CreateIncident) Description added in v0.22.0

func (c *CreateIncident) Description() string

func (*CreateIncident) Documentation added in v0.22.0

func (c *CreateIncident) Documentation() string

func (*CreateIncident) ExampleOutput added in v0.22.0

func (c *CreateIncident) ExampleOutput() map[string]any

func (*CreateIncident) Execute added in v0.22.0

func (c *CreateIncident) Execute(ctx core.ExecutionContext) error

func (*CreateIncident) HandleHook added in v0.22.0

func (c *CreateIncident) HandleHook(ctx core.ActionHookContext) error

func (*CreateIncident) HandleWebhook added in v0.22.0

func (*CreateIncident) Hooks added in v0.22.0

func (c *CreateIncident) Hooks() []core.Hook

func (*CreateIncident) Icon added in v0.22.0

func (c *CreateIncident) Icon() string

func (*CreateIncident) Label added in v0.22.0

func (c *CreateIncident) Label() string

func (*CreateIncident) Name added in v0.22.0

func (c *CreateIncident) Name() string

func (*CreateIncident) OutputChannels added in v0.22.0

func (c *CreateIncident) OutputChannels(configuration any) []core.OutputChannel

func (*CreateIncident) ProcessQueueItem added in v0.22.0

func (c *CreateIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateIncident) Setup added in v0.22.0

func (c *CreateIncident) Setup(ctx core.SetupContext) error

type CreateIncidentAPIRequest added in v0.22.0

type CreateIncidentAPIRequest struct {
	ServiceDeskID string         `json:"serviceDeskId"`
	RequestTypeID string         `json:"requestTypeId"`
	Fields        map[string]any `json:"fields"`
	Update        map[string]any `json:"update,omitempty"`
	AlertIDs      []string       `json:"alertIds,omitempty"`
}

CreateIncidentAPIRequest is the JSON body for JSM Incidents POST /v1/incident.

type CreateIncidentAPIResponse added in v0.22.0

type CreateIncidentAPIResponse struct {
	ID   string `json:"id"`
	Key  string `json:"key"`
	Self string `json:"self"`
}

CreateIncidentAPIResponse is returned when an incident is created successfully.

type CreateIncidentNodeMetadata added in v0.22.0

type CreateIncidentNodeMetadata struct {
	ServiceDeskName string `json:"serviceDeskName,omitempty"`
	RequestTypeName string `json:"requestTypeName,omitempty"`
	ImpactFieldID   string `json:"impactFieldId,omitempty"`
	UrgencyFieldID  string `json:"urgencyFieldId,omitempty"`
}

CreateIncidentNodeMetadata is stored on create-incident nodes at setup for canvas labels and field mapping.

type CreateIncidentSpec added in v0.22.0

type CreateIncidentSpec struct {
	ServiceDesk            string `json:"serviceDesk" mapstructure:"serviceDesk"`
	ServiceDeskRequestType string `json:"serviceDeskRequestType" mapstructure:"serviceDeskRequestType"`
	Summary                string `json:"summary" mapstructure:"summary"`

	Description      string `json:"description,omitempty" mapstructure:"description"`
	DueDate          string `json:"dueDate,omitempty" mapstructure:"dueDate"`
	Priority         string `json:"priority,omitempty" mapstructure:"priority"`
	Impact           string `json:"impact,omitempty" mapstructure:"impact"`
	Urgency          string `json:"urgency,omitempty" mapstructure:"urgency"`
	OriginalEstimate string `json:"originalEstimate,omitempty" mapstructure:"originalEstimate"`

	AdditionalFields map[string]any `json:"additionalFields,omitempty" mapstructure:"additionalFields"`
	Update           map[string]any `json:"update,omitempty" mapstructure:"update"`
	AlertIDs         []any          `json:"alertIds,omitempty" mapstructure:"alertIds"`

	CustomFieldValues []IncidentCustomFieldRow `json:"customFieldValues,omitempty" mapstructure:"customFieldValues"`
}

CreateIncidentSpec configures JSM Incidents API create (see Atlassian JSM Incidents REST reference).

type CreateIssue

type CreateIssue struct{}

func (*CreateIssue) Cancel

func (c *CreateIssue) Cancel(ctx core.ExecutionContext) error

func (*CreateIssue) Cleanup

func (c *CreateIssue) Cleanup(ctx core.SetupContext) error

func (*CreateIssue) Color

func (c *CreateIssue) Color() string

func (*CreateIssue) Configuration

func (c *CreateIssue) Configuration() []configuration.Field

func (*CreateIssue) Description

func (c *CreateIssue) Description() string

func (*CreateIssue) Documentation

func (c *CreateIssue) Documentation() string

func (*CreateIssue) ExampleOutput

func (c *CreateIssue) ExampleOutput() map[string]any

func (*CreateIssue) Execute

func (c *CreateIssue) Execute(ctx core.ExecutionContext) error

func (*CreateIssue) HandleHook added in v0.18.0

func (c *CreateIssue) HandleHook(ctx core.ActionHookContext) error

func (*CreateIssue) HandleWebhook

func (*CreateIssue) Hooks added in v0.18.0

func (c *CreateIssue) Hooks() []core.Hook

func (*CreateIssue) Icon

func (c *CreateIssue) Icon() string

func (*CreateIssue) Label

func (c *CreateIssue) Label() string

func (*CreateIssue) Name

func (c *CreateIssue) Name() string

func (*CreateIssue) OutputChannels

func (c *CreateIssue) OutputChannels(configuration any) []core.OutputChannel

func (*CreateIssue) ProcessQueueItem

func (c *CreateIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateIssue) Setup

func (c *CreateIssue) Setup(ctx core.SetupContext) error

type CreateIssueFields

type CreateIssueFields struct {
	Project     ProjectRef `json:"project"`
	IssueType   IssueType  `json:"issuetype"`
	Summary     string     `json:"summary"`
	Description *ADFDoc    `json:"description,omitempty"`
	Assignee    *UserRef   `json:"assignee,omitempty"`
}

type CreateIssueRequest

type CreateIssueRequest struct {
	Fields CreateIssueFields `json:"fields"`
}

type CreateIssueResponse

type CreateIssueResponse struct {
	ID   string `json:"id"`
	Key  string `json:"key"`
	Self string `json:"self"`
}

type CreateIssueSpec

type CreateIssueSpec struct {
	Project     string `json:"project" mapstructure:"project"`
	IssueType   string `json:"issueType" mapstructure:"issueType"`
	Summary     string `json:"summary" mapstructure:"summary"`
	Description string `json:"description" mapstructure:"description"`
	Assignee    string `json:"assignee" mapstructure:"assignee"`
	Status      string `json:"status" mapstructure:"status"`
}

type CustomerRequestListed added in v0.22.0

type CustomerRequestListed struct {
	IssueKey string `json:"issueKey"`
	Summary  string `json:"summary"`
}

CustomerRequestListed is one row from GET /rest/servicedeskapi/request (Jira Service Management).

type DeleteIncident added in v0.22.0

type DeleteIncident struct{}

func (*DeleteIncident) Cancel added in v0.22.0

func (c *DeleteIncident) Cancel(ctx core.ExecutionContext) error

func (*DeleteIncident) Cleanup added in v0.22.0

func (c *DeleteIncident) Cleanup(ctx core.SetupContext) error

func (*DeleteIncident) Color added in v0.22.0

func (c *DeleteIncident) Color() string

func (*DeleteIncident) Configuration added in v0.22.0

func (c *DeleteIncident) Configuration() []configuration.Field

func (*DeleteIncident) Description added in v0.22.0

func (c *DeleteIncident) Description() string

func (*DeleteIncident) Documentation added in v0.22.0

func (c *DeleteIncident) Documentation() string

func (*DeleteIncident) ExampleOutput added in v0.22.0

func (c *DeleteIncident) ExampleOutput() map[string]any

func (*DeleteIncident) Execute added in v0.22.0

func (c *DeleteIncident) Execute(ctx core.ExecutionContext) error

func (*DeleteIncident) HandleHook added in v0.22.0

func (c *DeleteIncident) HandleHook(ctx core.ActionHookContext) error

func (*DeleteIncident) HandleWebhook added in v0.22.0

func (*DeleteIncident) Hooks added in v0.22.0

func (c *DeleteIncident) Hooks() []core.Hook

func (*DeleteIncident) Icon added in v0.22.0

func (c *DeleteIncident) Icon() string

func (*DeleteIncident) Label added in v0.22.0

func (c *DeleteIncident) Label() string

func (*DeleteIncident) Name added in v0.22.0

func (c *DeleteIncident) Name() string

func (*DeleteIncident) OutputChannels added in v0.22.0

func (c *DeleteIncident) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteIncident) ProcessQueueItem added in v0.22.0

func (c *DeleteIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteIncident) Setup added in v0.22.0

func (c *DeleteIncident) Setup(ctx core.SetupContext) error

type DeleteIncidentSpec added in v0.22.0

type DeleteIncidentSpec struct {
	Project string `json:"project,omitempty"`
	Issue   string `json:"issue"`
}

type DeleteIssue added in v0.22.0

type DeleteIssue struct{}

func (*DeleteIssue) Cancel added in v0.22.0

func (c *DeleteIssue) Cancel(ctx core.ExecutionContext) error

func (*DeleteIssue) Cleanup added in v0.22.0

func (c *DeleteIssue) Cleanup(ctx core.SetupContext) error

func (*DeleteIssue) Color added in v0.22.0

func (c *DeleteIssue) Color() string

func (*DeleteIssue) Configuration added in v0.22.0

func (c *DeleteIssue) Configuration() []configuration.Field

func (*DeleteIssue) Description added in v0.22.0

func (c *DeleteIssue) Description() string

func (*DeleteIssue) Documentation added in v0.22.0

func (c *DeleteIssue) Documentation() string

func (*DeleteIssue) ExampleOutput added in v0.22.0

func (c *DeleteIssue) ExampleOutput() map[string]any

func (*DeleteIssue) Execute added in v0.22.0

func (c *DeleteIssue) Execute(ctx core.ExecutionContext) error

func (*DeleteIssue) HandleHook added in v0.22.0

func (c *DeleteIssue) HandleHook(ctx core.ActionHookContext) error

func (*DeleteIssue) HandleWebhook added in v0.22.0

func (*DeleteIssue) Hooks added in v0.22.0

func (c *DeleteIssue) Hooks() []core.Hook

func (*DeleteIssue) Icon added in v0.22.0

func (c *DeleteIssue) Icon() string

func (*DeleteIssue) Label added in v0.22.0

func (c *DeleteIssue) Label() string

func (*DeleteIssue) Name added in v0.22.0

func (c *DeleteIssue) Name() string

func (*DeleteIssue) OutputChannels added in v0.22.0

func (c *DeleteIssue) OutputChannels(configuration any) []core.OutputChannel

func (*DeleteIssue) ProcessQueueItem added in v0.22.0

func (c *DeleteIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*DeleteIssue) Setup added in v0.22.0

func (c *DeleteIssue) Setup(ctx core.SetupContext) error

type DeleteIssueOptions added in v0.22.0

type DeleteIssueOptions struct {
	DeleteSubtasks bool
}

type DeleteIssueOutput added in v0.22.0

type DeleteIssueOutput struct {
	ID      string `json:"id"`
	Key     string `json:"key"`
	Deleted bool   `json:"deleted"`
}

type DeleteIssueSpec added in v0.22.0

type DeleteIssueSpec struct {
	Project        string `json:"project" mapstructure:"project"`
	IssueKey       string `json:"issueKey" mapstructure:"issueKey"`
	DeleteSubtasks bool   `json:"deleteSubtasks" mapstructure:"deleteSubtasks"`
}

type GetIncident added in v0.22.0

type GetIncident struct{}

func (*GetIncident) Cancel added in v0.22.0

func (c *GetIncident) Cancel(ctx core.ExecutionContext) error

func (*GetIncident) Cleanup added in v0.22.0

func (c *GetIncident) Cleanup(ctx core.SetupContext) error

func (*GetIncident) Color added in v0.22.0

func (c *GetIncident) Color() string

func (*GetIncident) Configuration added in v0.22.0

func (c *GetIncident) Configuration() []configuration.Field

func (*GetIncident) Description added in v0.22.0

func (c *GetIncident) Description() string

func (*GetIncident) Documentation added in v0.22.0

func (c *GetIncident) Documentation() string

func (*GetIncident) ExampleOutput added in v0.22.0

func (c *GetIncident) ExampleOutput() map[string]any

func (*GetIncident) Execute added in v0.22.0

func (c *GetIncident) Execute(ctx core.ExecutionContext) error

func (*GetIncident) HandleHook added in v0.22.0

func (c *GetIncident) HandleHook(ctx core.ActionHookContext) error

func (*GetIncident) HandleWebhook added in v0.22.0

func (*GetIncident) Hooks added in v0.22.0

func (c *GetIncident) Hooks() []core.Hook

func (*GetIncident) Icon added in v0.22.0

func (c *GetIncident) Icon() string

func (*GetIncident) Label added in v0.22.0

func (c *GetIncident) Label() string

func (*GetIncident) Name added in v0.22.0

func (c *GetIncident) Name() string

func (*GetIncident) OutputChannels added in v0.22.0

func (c *GetIncident) OutputChannels(configuration any) []core.OutputChannel

func (*GetIncident) ProcessQueueItem added in v0.22.0

func (c *GetIncident) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetIncident) Setup added in v0.22.0

func (c *GetIncident) Setup(ctx core.SetupContext) error

type GetIncidentSpec added in v0.22.0

type GetIncidentSpec struct {
	Project string `json:"project,omitempty"`
	Issue   string `json:"issue"`
}

type GetIssue added in v0.22.0

type GetIssue struct{}

func (*GetIssue) Cancel added in v0.22.0

func (c *GetIssue) Cancel(ctx core.ExecutionContext) error

func (*GetIssue) Cleanup added in v0.22.0

func (c *GetIssue) Cleanup(ctx core.SetupContext) error

func (*GetIssue) Color added in v0.22.0

func (c *GetIssue) Color() string

func (*GetIssue) Configuration added in v0.22.0

func (c *GetIssue) Configuration() []configuration.Field

func (*GetIssue) Description added in v0.22.0

func (c *GetIssue) Description() string

func (*GetIssue) Documentation added in v0.22.0

func (c *GetIssue) Documentation() string

func (*GetIssue) ExampleOutput added in v0.22.0

func (c *GetIssue) ExampleOutput() map[string]any

func (*GetIssue) Execute added in v0.22.0

func (c *GetIssue) Execute(ctx core.ExecutionContext) error

func (*GetIssue) HandleHook added in v0.22.0

func (c *GetIssue) HandleHook(ctx core.ActionHookContext) error

func (*GetIssue) HandleWebhook added in v0.22.0

func (*GetIssue) Hooks added in v0.22.0

func (c *GetIssue) Hooks() []core.Hook

func (*GetIssue) Icon added in v0.22.0

func (c *GetIssue) Icon() string

func (*GetIssue) Label added in v0.22.0

func (c *GetIssue) Label() string

func (*GetIssue) Name added in v0.22.0

func (c *GetIssue) Name() string

func (*GetIssue) OutputChannels added in v0.22.0

func (c *GetIssue) OutputChannels(configuration any) []core.OutputChannel

func (*GetIssue) ProcessQueueItem added in v0.22.0

func (c *GetIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetIssue) Setup added in v0.22.0

func (c *GetIssue) Setup(ctx core.SetupContext) error

type GetIssueOptions added in v0.22.0

type GetIssueOptions struct {
	Fields string
	Expand string
}

type GetIssueSpec added in v0.22.0

type GetIssueSpec struct {
	Project  string `json:"project" mapstructure:"project"`
	IssueKey string `json:"issueKey" mapstructure:"issueKey"`
	Expand   string `json:"expand" mapstructure:"expand"`
}

type IncidentCustomFieldRow added in v0.22.0

type IncidentCustomFieldRow struct {
	FieldID   string `json:"fieldId" mapstructure:"fieldId"`
	ValueJSON string `json:"valueJson" mapstructure:"valueJson"`
}

IncidentCustomFieldRow maps one Jira field id to a JSON value (object or string) as expected by the Jira API.

type Issue

type Issue struct {
	ID     string         `json:"id"`
	Key    string         `json:"key"`
	Self   string         `json:"self"`
	Fields map[string]any `json:"fields"`
}

type IssueSearchHit added in v0.22.0

type IssueSearchHit struct {
	ID     string         `json:"id"`
	Key    string         `json:"key"`
	Fields map[string]any `json:"fields"`
}

IssueSearchHit is one element from GET /rest/api/3/search.

type IssueType

type IssueType struct {
	Name string `json:"name"`
}

type IssueTypeMeta added in v0.22.0

type IssueTypeMeta struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Subtask bool   `json:"subtask"`
}

type Jira

type Jira struct{}

func (*Jira) Actions

func (j *Jira) Actions() []core.Action

func (*Jira) Cleanup

func (j *Jira) Cleanup(ctx core.IntegrationCleanupContext) error

func (*Jira) Configuration

func (j *Jira) Configuration() []configuration.Field

func (*Jira) Description

func (j *Jira) Description() string

func (*Jira) HandleHook added in v0.18.0

func (j *Jira) HandleHook(ctx core.IntegrationHookContext) error

func (*Jira) HandleRequest

func (j *Jira) HandleRequest(ctx core.HTTPRequestContext)

func (*Jira) Hooks added in v0.18.0

func (j *Jira) Hooks() []core.Hook

func (*Jira) Icon

func (j *Jira) Icon() string

func (*Jira) Instructions

func (j *Jira) Instructions() string

func (*Jira) Label

func (j *Jira) Label() string

func (*Jira) ListResources

func (j *Jira) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*Jira) Name

func (j *Jira) Name() string

func (*Jira) Sync

func (j *Jira) Sync(ctx core.SyncContext) error

func (*Jira) Triggers

func (j *Jira) Triggers() []core.Trigger

type JiraFieldInfo added in v0.22.0

type JiraFieldInfo struct {
	ID     string         `json:"id"`
	Name   string         `json:"name"`
	Custom bool           `json:"custom"`
	Schema map[string]any `json:"schema,omitempty"`
}

func FindGlobalFieldByLabel added in v0.22.0

func FindGlobalFieldByLabel(fields []JiraFieldInfo, fieldLabel string) *JiraFieldInfo

FindGlobalFieldByLabel finds a field id by display name (e.g. "Urgency").

type Metadata

type Metadata struct {
	User     *User     `json:"user,omitempty" mapstructure:"user,omitempty"`
	Projects []Project `json:"projects" mapstructure:"projects"`
	CloudID  string    `json:"cloudId,omitempty" mapstructure:"cloudId,omitempty"`
}

type NodeMetadata

type NodeMetadata struct {
	Project   *Project `json:"project,omitempty"`
	IssueType string   `json:"issueType,omitempty"`
	Status    string   `json:"status,omitempty"`
}

NodeMetadata stores metadata on action component nodes.

type Priority added in v0.22.0

type Priority struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Project

type Project struct {
	ID   string `json:"id"`
	Key  string `json:"key"`
	Name string `json:"name"`
}

type ProjectRef

type ProjectRef struct {
	Key string `json:"key"`
}

type RequestType added in v0.22.0

type RequestType struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Practice string `json:"practice,omitempty"`
}

RequestType is returned by GET /rest/servicedeskapi/servicedesk/{id}/requesttype (use expand=practice for the practice field).

type RequestTypeField added in v0.22.0

type RequestTypeField struct {
	FieldID     string                  `json:"fieldId"`
	Name        string                  `json:"name"`
	Required    bool                    `json:"required"`
	ValidValues []RequestTypeFieldValue `json:"validValues"`
}

RequestTypeField is returned by GET .../requesttype/{id}/field.

type RequestTypeFieldValue added in v0.22.0

type RequestTypeFieldValue struct {
	Label string `json:"label"`
	Value string `json:"value"`
}

RequestTypeFieldValue is an allowed option on a request type field.

type ServiceDesk added in v0.22.0

type ServiceDesk struct {
	ID          string `json:"id"`
	ProjectName string `json:"projectName"`
	ProjectKey  string `json:"projectKey"`
}

ServiceDesk is returned by GET /rest/servicedeskapi/servicedesk (Jira Service Management).

type Status added in v0.22.0

type Status struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Transition added in v0.22.0

type Transition struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	To   Status `json:"to"`
}

type UpdateIssue added in v0.22.0

type UpdateIssue struct{}

func (*UpdateIssue) Cancel added in v0.22.0

func (c *UpdateIssue) Cancel(ctx core.ExecutionContext) error

func (*UpdateIssue) Cleanup added in v0.22.0

func (c *UpdateIssue) Cleanup(ctx core.SetupContext) error

func (*UpdateIssue) Color added in v0.22.0

func (c *UpdateIssue) Color() string

func (*UpdateIssue) Configuration added in v0.22.0

func (c *UpdateIssue) Configuration() []configuration.Field

func (*UpdateIssue) Description added in v0.22.0

func (c *UpdateIssue) Description() string

func (*UpdateIssue) Documentation added in v0.22.0

func (c *UpdateIssue) Documentation() string

func (*UpdateIssue) ExampleOutput added in v0.22.0

func (c *UpdateIssue) ExampleOutput() map[string]any

func (*UpdateIssue) Execute added in v0.22.0

func (c *UpdateIssue) Execute(ctx core.ExecutionContext) error

func (*UpdateIssue) HandleHook added in v0.22.0

func (c *UpdateIssue) HandleHook(ctx core.ActionHookContext) error

func (*UpdateIssue) HandleWebhook added in v0.22.0

func (*UpdateIssue) Hooks added in v0.22.0

func (c *UpdateIssue) Hooks() []core.Hook

func (*UpdateIssue) Icon added in v0.22.0

func (c *UpdateIssue) Icon() string

func (*UpdateIssue) Label added in v0.22.0

func (c *UpdateIssue) Label() string

func (*UpdateIssue) Name added in v0.22.0

func (c *UpdateIssue) Name() string

func (*UpdateIssue) OutputChannels added in v0.22.0

func (c *UpdateIssue) OutputChannels(configuration any) []core.OutputChannel

func (*UpdateIssue) ProcessQueueItem added in v0.22.0

func (c *UpdateIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*UpdateIssue) Setup added in v0.22.0

func (c *UpdateIssue) Setup(ctx core.SetupContext) error

type UpdateIssueOptions added in v0.22.0

type UpdateIssueOptions struct {
	NotifyUsers *bool
}

type UpdateIssueRequest added in v0.22.0

type UpdateIssueRequest struct {
	Fields map[string]any `json:"fields,omitempty"`
}

type UpdateIssueSpec added in v0.22.0

type UpdateIssueSpec struct {
	Project     string    `json:"project" mapstructure:"project"`
	IssueKey    string    `json:"issueKey" mapstructure:"issueKey"`
	Summary     *string   `json:"summary,omitempty" mapstructure:"summary"`
	Description *string   `json:"description,omitempty" mapstructure:"description"`
	IssueType   *string   `json:"issueType,omitempty" mapstructure:"issueType"`
	Assignee    *string   `json:"assignee,omitempty" mapstructure:"assignee"`
	Priority    *string   `json:"priority,omitempty" mapstructure:"priority"`
	Labels      *[]string `json:"labels,omitempty" mapstructure:"labels"`
	NotifyUsers *bool     `json:"notifyUsers,omitempty" mapstructure:"notifyUsers"`
}

type User

type User struct {
	AccountID   string `json:"accountId"`
	DisplayName string `json:"displayName"`
	EmailAddr   string `json:"emailAddress,omitempty"`
}

type UserRef added in v0.22.0

type UserRef struct {
	AccountID string `json:"accountId"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL