Small Improvements - #152
Conversation
…tional attributes
…g array and improve search logic
…ality and filtering
…ne project synchronization
… and update references
| function Test_SearchProjectItem_AND_Filter_SUCCESS { | ||
| Reset-InvokeCommandMock | ||
| Mock_DatabaseRoot | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| $p = Get-Mock_Project_700 ; $owner = $p.owner ; $projectNumber = $p.number | ||
| MockCall_GetProject $p -Cache | ||
|
|
||
| $i = $p.issue |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| $item = @{ | ||
| id = "1" | ||
| title = "This is a sample title for testing" | ||
| } |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
|
|
||
| # Test case 1: Single value match | ||
| $result = $item | Test-WhereLikeField -Fieldname "title" -Values "sample" | ||
| Assert-IsTrue -Condition $result |
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
|
|
||
|
|
||
| function Show-ProjectItem{ | ||
| function Format-ProjectItem{ |
Check notice
Code scanning / PSScriptAnalyzer
The cmdlet 'Format-ProjectItem' does not have a help comment. Note
| return $true | ||
| } | ||
| } | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
| [Parameter(Mandatory,ValueFromPipeline)] [object]$Item, | ||
| [Parameter(Mandatory)][string]$FieldName, | ||
| [Parameter(Mandatory)][string[]]$Values, | ||
| [Parameter()][switch]$OR |
Check warning
Code scanning / PSScriptAnalyzer
The parameter 'OR' has been declared but not used. Warning
| $title = $item.$FieldName | ||
|
|
||
| $foundCount = 0 | ||
|
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
Improve search functionality by sorting results by title and adding comprehensive tests. Implement new database functions for better storage and retrieval. Make SourceProjectNumber mandatory and enhance error handling during synchronization. Streamline project synchronization by removing unnecessary parameters and renaming functions for clarity.