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-FSTimeEntry optional parameter -executed_at will always return (400) Bad Request #26

Open
brempfer2468 opened this issue Oct 11, 2024 · 0 comments

Comments

@brempfer2468
Copy link

Expected Behavior

This command should allow the creation of a new time entry on the ticket specified. Submitting the command with the "-executed_at" parameter should allow the modifying of the "executed_at" property during creation.

Ex:
New-FSTimeEntry -type Ticket -parent_id 22 -billable $true -time_spent "00:01" -note "Custom note" -agent_id 12345678901 -executed_at "2024-09-13T08:00:03Z"

This should create a new time entry on ticket 22 executed at the date_time "09-13-2024 08:00:03 am UTC".

Current Behavior

When using the optional parameter "-executed_at", we receive the error "The remote server returned an error: (400) Bad Request." for any combination of DateTime or string of dates and times.
Without using the optional parameter "-executed_at", the ticket is successfully created at with the "executed_at" property dated with the date_time of when the command was sent.

Possible Solution

I have attempted all combinations for date_time that I could think of as well as all combinations of input date fields directly from the FreshService API reference documentation: https://api.freshservice.com/v2/#schema
It is possible I have just not found the correct format to use for this parameter, but have exhausted all ideas.

Steps to Reproduce (for bugs)

1.Connect to your FreshService Instance
2.Test creating a new time entry with default settings to confirm functionality:
New-FSTimeEntry -type Ticket -parent_id 31316 -time_spent "00:01" -note "Testing issue" -agent_id $agentId
3.Test same command with added "-executed_at" parameter:
$executedAt = [DateTime]"2024-09-13T17:00:00Z"
New-FSTimeEntry -type Ticket -parent_id 31316 -time_spent "00:01" -note "Testing issue" -agent_id $agentId -executed_at $executedAt

Context

Attempting to quickly enter a batch of time entries for a previous date but unable to do so without manually navigating to each ticket and manually entering time and dates. While this command works great for time entries for todays date, any previous date currently needs to be done manually.

Your Environment

  • Module version used: 0.1.6
  • Operating System and PowerShell version: Windows 10 Enterprise LTSC 21H2, PowerShell 5.1.19041.5007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant