Closed johnheusinger closed 4 years ago
Commenting from my phone here. But you must also change the notify param to String and value "true"
FROM [Boolean] $Notify = $true
TO [String] $Notify = "true"
@skuzzles, can you explain why it should be a string?
I agree that there might be a better way to do this, particularly with @replicaJunction's idea to identify default behavior and use a switch parameter to change it. But, adjusting the data type would be a functionality change, potentially breaking existing automation. The fix I submitted has been tested to resolve the issue and keeps this in the 'bug fix' category.
@skuzzles
it should definitely not be a string, as the user can't type anything he wants in there.
if a string true
is needed, the following would be a way to implement it:
if ($Notify) {"true"} else {"false"}
but not to allow the user to type any string
@johnheusinger Have you tested this manually? The tests in the module can't test if an email was sent or not
@lipkau Yup, tested it manually
Atlassian documentation states the notification property is a string. "true" is default and "false" is accepted alternative. The reason @johnheusinger suggestion works is because it is defaulting to true, since the property is now successfully changed from notify to notification. If you've tested it manually, try testing it with -Notify false to see if you do not receive a notification.
@johnheusinger : can you please test it with -Notify:$false
?
@lipkau I tested the following cases:
Without -Notify
param - Sends email
-Notify:$true
- Sends email
-Notify:$false
- Does not send email
Description
Changed 'notify' to 'notification' in the request body to align with API documentation
Motivation and Context
Closes issue #382
Types of changes
Checklist