AtlassianPS / JiraPS

PowerShell module to interact with Atlassian JIRA
https://AtlassianPS.org/module/JiraPS
MIT License
323 stars 131 forks source link

Add-JiraIssueWorklog DateStarted different from today #324

Closed SrpAlexis closed 5 years ago

SrpAlexis commented 5 years ago

Description

Hi all, I try to add Issue worklog whith another date from today. I see all the time in exemple date with (Get-Date) but I don't see any other way to do it.

Steps To Reproduce

Add-JiraIssueWorklog "Comment" -Issue "666" -TimeSpent "00:30" -DateStarted (get-date -Date 11/12/2018) But work with : Add-JiraIssueWorklog "Comment" -Issue "666" -TimeSpent "00:30" -DateStarted (get-date)

Also with ((get-date).AddDays(-1)) but i whant specify the date.

I try with another time format but without any results.

Your Environment


Get-Module JiraPS -ListAvailable | Select Name, Version
Name   Version
----   -------
JiraPS 2.8.7
$PSVersionTable
PSVersion                      5.1.14409.1018   
lipkau commented 5 years ago

Thank you for reporting this. This is indeed a bug. You can see the difference between the two commands you showed with this:

(Get-Date).ToString("o");(get-date -Date 12/12/2018).ToString("o")
SrpAlexis commented 5 years ago

Thanks @lipkau , i'm doing some test and it's can work with this way : (get-date -Year 2018 -Month 12 -Day 11)

SrpAlexis commented 5 years ago

Great it's woking with get-date -date dd/MM/yyyy) Thanks :+1: