Start a new topic

Update-VaultItem does not update comment

I'm using powerJobs 19.0.7, and one of my jobs needs to update an Item


The job contains this code

Write-Host "Item Number [$($item._Number)]: 'Update Item'"
Write-Host "Item Engr Approved By [$($item._EngrApprovedBy)]: 'Update Item'"
Write-Host "Item Comment [$($item._Comment)]: 'Update Item'"
$newitem = Update-VaultItem -Number $item._Number -Properties @{'_EngrApprovedBy'='NH'} -Comment 'Updated'
Write-Host "Item Property Updated: 'Update Item'"
Write-Host "Item Engr Approved By [$($newitem._EngrApprovedBy)]: 'Update Item'"
Write-Host "Item Comment [$($newitem._Comment)]: 'Update Item'"

The output is 

 

2019-05-21 14:36:24,323 [Pipeline Execution Thread] INFO  coolOrange.Powershell.Hosting.Host.PowershellHost - Starting job 60751: 'Update Item'
2019-05-21 14:36:24,365 [Pipeline Execution Thread] INFO  coolOrange.Powershell.Hosting.Host.PowershellHost - Item [100-01]: 'Update Item'
2019-05-21 14:36:24,367 [Pipeline Execution Thread] INFO  coolOrange.Powershell.Hosting.Host.PowershellHost - Item [Nick]: 'Update Item'
2019-05-21 14:36:24,370 [Pipeline Execution Thread] INFO  coolOrange.Powershell.Hosting.Host.PowershellHost - Item [Released to manufacturing]: 'Update Item'
2019-05-21 14:36:24,484 [Pipeline Execution Thread] INFO  coolOrange.Powershell.Hosting.Host.PowershellHost - Item Property Updated: 'Update Item'
2019-05-21 14:36:24,501 [Pipeline Execution Thread] INFO  coolOrange.Powershell.Hosting.Host.PowershellHost - Item [Updated]: 'Update Item'
2019-05-21 14:36:24,504 [Pipeline Execution Thread] INFO  coolOrange.Powershell.Hosting.Host.PowershellHost - Item []: 'Update Item'

As you can see, the Update-VaultItem cmdlet doesn't update the Comment on the item, it just sets it to an empty string


Has anyone any ideas why this isn't working, or if there is a workround?


Thanks 

Nick


Hello Nick,

As you mentioned there are multiple API calls where you can also specify a new comment. One of those being the lifecycle update.


Kind regards,

Manuel Cassan


Please mark this thread as solved if this answered your questions.

Thanks Manuel


I'm looking at rejigging the lifecycle to work around this


Nick

Hello Nick,

There is a known issue with Update-VaultItem. It is not possible to update some of the properties at the moment. The issue is already tracked and our development team will take care of it.


Kind regards,

Manuel Cassan

Login or Signup to post a comment