go-jira icon indicating copy to clipboard operation
go-jira copied to clipboard

attachments created by PostAttachment method cannot be viewed by customers

Open jfgsilva opened this issue 2 years ago • 1 comments

What would you like to be added?

  • IssueService method PostAttachment creates attachment which cannot be viewed by customers. It would be nice to be able to set visibility for customer also (maybe even as default). (This exists for comments based on role. Default is public for customer).
  • Attachment Type has no visibility field
type Attachment struct {
	Self      string `json:"self,omitempty" structs:"self,omitempty"`
	ID        string `json:"id,omitempty" structs:"id,omitempty"`
	Filename  string `json:"filename,omitempty" structs:"filename,omitempty"`
	Author    *User  `json:"author,omitempty" structs:"author,omitempty"`
	Created   string `json:"created,omitempty" structs:"created,omitempty"`
	Size      int    `json:"size,omitempty" structs:"size,omitempty"`
	MimeType  string `json:"mimeType,omitempty" structs:"mimeType,omitempty"`
	Content   string `json:"content,omitempty" structs:"content,omitempty"`
	Thumbnail string `json:"thumbnail,omitempty" structs:"thumbnail,omitempty"`
}

Why is this needed?

Most tickets are created through the Jira Portal. It stands to reason, that any work processed for a ticket that produces an attachment result should be visible to the reporter.

Anything else we need to know?

N/A

jfgsilva avatar Feb 20 '23 16:02 jfgsilva

This sounds like an issue with your Jira configuration or a limitation of your Jira product. Jira REST API doesn't provide means to get/set attachment visibility.

vladimir-ch avatar Feb 22 '23 14:02 vladimir-ch