Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.12
-
None
Description
Current Situation
When the audit_log setting "force_comments_for_audit_log" set to true in joc.properties then it affects all cmdlets that modify an object in JOC Cockpit or JobScheduler.
For example syntax to add-order in JobChain:
Add-JobSchedulerOrder -JobChain <String> [-Order <String>] [-Directory <String>] [-Parameters <Hashtable>] [[-Title] <String>] [-At <String>] [-State <String>] [-EndState <String>] -Replace -NoImmediate [<CommonParameters>]
The above syntax used to add-order but there is no parameter available to add a mandatory comment and the command shows the following error on executing:
At /opt/microsoft/powershell/6/Modules/JobSchedulerClient/JobSchedulerClient.psm1:996 char:21 + ... throw $answer.error.code + ': ' + $answer.error.message + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (JOC-300: JocMis...missing comment:String) [], RuntimeException + FullyQualifiedErrorId : JOC-300: JocMissingCommentException: missing comment
Desired Behavior
All cmdlets of the PowerShell API that modify JobScheduler objects should allow to add an Audit Log comment when "force_comments_for_audit_log" set to true in joc.properties.
Maintainer Notes
- As a result of this issue the PowerShell module was updated to make use of the JOC Cockpit REST API exclusively.
- Consider use of release 1.1.0 of the PowerShell module from https://github.com/sos-berlin/scheduler-cli-powershell