Skip to content
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

Get-JiraIssueAttachmentFile: Set Accept header based on Mime time of attachment #333

Merged

Conversation

wisemoth
Copy link

@wisemoth wisemoth commented Jan 22, 2019

Description

The attachment objects have a MimeType property. This should be used to set the Accept header in the request to download the actual attachment; however the existing code refers to (non-existing) MediaType property on the Powershell object, thereby setting the Accept header value to null.

Motivation and Context

A partial fix for apparently "successful" download of file attachments. Without this change the pipeline output is True for each attachment downloaded, but the attachment did not download. This PR doesn't change the fautly error handling, but implements a trivial underlying fix to constructing the request to fetch the download.
I believe that the error handling code needs to be fixed too, but I've not had a chance to do that.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have added Pester Tests that describe what my changes should do.
  • I have updated the documentation accordingly.

@wisemoth wisemoth requested review from a team as code owners January 22, 2019 16:51
@ghost ghost added the Status:In Review label Jan 22, 2019
@lipkau lipkau changed the base branch from master to develop February 21, 2019 19:47
@ghost ghost assigned lipkau Feb 21, 2019
@lipkau lipkau added this to the Next Minor milestone Feb 21, 2019
@lipkau lipkau merged commit a42a82b into AtlassianPS:develop Feb 21, 2019
@ghost ghost removed the Status:In Review label Feb 21, 2019
@lipkau lipkau mentioned this pull request Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants