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

Editing schedule results in invalid parameter when using ValidateSet #4450

Open
realslacker opened this issue Mar 3, 2025 · 0 comments
Open
Labels
requires triage Issue has not yet been verified by the development team. v4 Version 4 issue.
Milestone

Comments

@realslacker
Copy link

Description of Issue

Editing a schedule with a parameter using ValidateSet causes the insertion of quotes into the schedules.ps1

Example Code:

param(
    [Parameter( Mandatory )]
    [ValidateSet( 'Test1', 'Test2', 'Test3' )]
    [string] $Param
)

Using the GUI create a schedule:

Image

Using the GUI edit the schedule:

Image

Notice that the value for Param now has double quotes...

Editing the schedule again results in additional double quotes being inserted...

Image

Since the double quotes are inserted into the the schedules.ps1 wrapped in single quotes the schedule will fail to run as the parameter value does not pass validation.

Version

4.5.2

Severity

High

Hosting Method

MSI (Windows Service)

Operating System

Windows

Database

LiteDB

Licensed

Yes

Features

No response

Additional Environment data

No response

Screenshots/Animations

No response

@realslacker realslacker added requires triage Issue has not yet been verified by the development team. v4 Version 4 issue. labels Mar 3, 2025
@adamdriscoll adamdriscoll added this to the 4.5.4 milestone Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires triage Issue has not yet been verified by the development team. v4 Version 4 issue.
Projects
None yet
Development

No branches or pull requests

2 participants