Skip to content

feat(project): Edit-ProjectItem with rich parameters#202

Merged
rulasg merged 10 commits intomainfrom
rulasg/issue201
Mar 4, 2026
Merged

feat(project): Edit-ProjectItem with rich parameters#202
rulasg merged 10 commits intomainfrom
rulasg/issue201

Conversation

@rulasg
Copy link
Owner

@rulasg rulasg commented Mar 4, 2026

Enhance project item management by updating parameter attributes for repository details, adding functions for retrieving project parameters, and editing project items with rich parameters. Fix issues related to function naming and test failures. Update mock data to reflect the current status of project items. Commit messages include:

  • feat(New-ProjectIssue): update parameter attributes for RepoOwner and RepoName

  • feat(project): add Update-ProjectItem function for item updates

  • fix(project): rename Update-ProjectItem function to UpdateProjectItem

  • fix(mocks): update "Todo" status to "In Progress" in project item fields

  • fix(database): update alias for GetDatabaseStorePath command and set variable to null

  • feat(project): add Get-ProjectParameters function to retrieve project details

  • feat(items): Edit-ProjectItem with rich parameters for standard projects

  • feat(test): add tests for Edit-ProjectItem functionality

  • fix(tests): fix test after product changes

  • refactor(getproject): reorder parameter positions for clarity


} Export-ModuleMember -Function Get-ProjectItem -Alias "gpi"

function Update-ProjectItem {

Check warning

Code scanning / PSScriptAnalyzer

Function 'Update-ProjectItem' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. Warning

Function 'Update-ProjectItem' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.

} Export-ModuleMember -Function Set-ProjectParameters -Alias "Set-Project","spp" No newline at end of file
} Export-ModuleMember -Function Set-ProjectParameters -Alias "Set-Project","spp"

Check warning

Code scanning / PSScriptAnalyzer

The cmdlet 'Get-ProjectParameters' uses a plural noun. A singular noun should be used instead. Warning

The cmdlet 'Get-ProjectParameters' uses a plural noun. A singular noun should be used instead.
[String[]] GetValidValues() { return @( "Status" ) }
}

function Get-ValidNames{

Check warning

Code scanning / PSScriptAnalyzer

The cmdlet 'Get-ValidNames' uses a plural noun. A singular noun should be used instead. Warning

The cmdlet 'Get-ValidNames' uses a plural noun. A singular noun should be used instead.
[Parameter()][string]$ProjectNumber,
[Parameter(Mandatory, Position = 1)][string]$RepoOwner,
[Parameter(Mandatory, Position = 2)][string]$RepoName,
[Parameter(Mandatory,ValueFromPipelineByPropertyName, Position = 1)][Alias("Owner")][string]$RepoOwner,

Check warning

Code scanning / PSScriptAnalyzer

Command accepts pipeline input but has not defined a process block. Warning

Command accepts pipeline input but has not defined a process block.
[Parameter(Mandatory, Position = 1)][string]$RepoOwner,
[Parameter(Mandatory, Position = 2)][string]$RepoName,
[Parameter(Mandatory,ValueFromPipelineByPropertyName, Position = 1)][Alias("Owner")][string]$RepoOwner,
[Parameter(Mandatory,ValueFromPipelineByPropertyName, Position = 2)][string]$RepoName,

Check warning

Code scanning / PSScriptAnalyzer

Command accepts pipeline input but has not defined a process block. Warning

Command accepts pipeline input but has not defined a process block.
@@ -0,0 +1,246 @@

class ValidStatus : System.Management.Automation.IValidateSetValuesGenerator {

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace
$db = Get-Project -Owner $Owner -ProjectNumber $ProjectNumber -ErrorAction SilentlyContinue -skipItems

$ret.ProjectTitle = $db.title

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Get-ProjectParameters' returns an object of type 'System.Collections.Hashtable' but this type is not declared in the OutputType attribute. Note

The cmdlet 'Get-ProjectParameters' returns an object of type 'System.Collections.Hashtable' but this type is not declared in the OutputType attribute.
ProjectTitle = $result.ProjectTitle
}
$ret.Owner = $result.Owner
$ret.ProjectNumber = $result.ProjectNumber

Check notice

Code scanning / PSScriptAnalyzer

Line has trailing whitespace Note

Line has trailing whitespace

} Export-ModuleMember -Function Set-ProjectParameters -Alias "Set-Project","spp" No newline at end of file
} Export-ModuleMember -Function Set-ProjectParameters -Alias "Set-Project","spp"

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Get-ProjectParameters' does not have a help comment. Note

The cmdlet 'Get-ProjectParameters' does not have a help comment.
Set-MyInvokeCommandAlias -Alias $EditFileAliasCode -Command 'code -w "{path}"'
Set-MyInvokeCommandAlias -Alias $EditFileAlias -Command "$MODULE_NAME\Invoke-$($MODULE_NAME)EditFile -Text '{text}'"

function Invoke-GetLongText{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Invoke-GetLongText' does not have a help comment. Note

The cmdlet 'Invoke-GetLongText' does not have a help comment.
@rulasg rulasg merged commit c0f1963 into main Mar 4, 2026
3 checks passed
@rulasg rulasg deleted the rulasg/issue201 branch March 4, 2026 17:40
@rulasg rulasg linked an issue Mar 5, 2026 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

feat(Edit-ProjectItem): Increase parametesrs to easy edit standar fields

1 participant