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

New-FreshServiceProblem attachments not working #1

Open
rasimmers opened this issue Jun 6, 2023 · 1 comment
Open

New-FreshServiceProblem attachments not working #1

rasimmers opened this issue Jun 6, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rasimmers
Copy link
Contributor

Expected Behavior

New-FreshserviceProblem will create a problem with specified attachment(s).

Current Behavior

Error message from API: We're sorry, but something went wrong.

Possible Solution

As a workaround, create Problem without attachment(s) and then use Set-FreshServiceProblem to attach items.

Steps to Reproduce (for bugs)

  1. Create a new problem and specify the path to a file with -attachments:
$newFreshServiceProblemSplat = @{
    requester_id = 21000418005
    description = "A new problem"
    status = 1
    impact = 1
    priority = 1
    subject = "A new problem"
    due_by = (Get-Date).AddDays(5)
    problem_impact = "This is the impact of this problem"
    known_error = $true
    category = "Hardware"
    sub_category = 'Peripherals'
    item_category = 'Router'
    problem_cause = "The cause of the problem"
    problem_symptom = "The symptom of the problem"
    **attachments = 'C:\Scripts\Attachments\attachment.txt'**
}

$prob = New-FreshServiceProblem @newFreshServiceProblemSplat
  1. Execute command and API produces: We're sorry, but something went wrong.

Context

Cannot create Freshservice Problems with attachments.

Your Environment

  • Module version used: 0.1.1
  • Operating System and PowerShell version: Windows 11 with Powershell 7.3.4
@rasimmers rasimmers added the bug Something isn't working label Jun 6, 2023
@rasimmers
Copy link
Contributor Author

This issue has been raised with Freshservice Product Management. Based on initial findings and behavior, it needs to be investigated as a bug in the Freshservice API. Attachments are supported with Invoke-WebRequest -Form and the same code is used in all API endpoints.

@rasimmers rasimmers self-assigned this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant