Skip to content

Extend Set-IshBaselineItem to update a baseline using the incoming IshDocumentObj versions #222

@ddemeyer

Description

@ddemeyer

When #126 gets implemented, and this with -AutoCompleteMode parameter which is about retrieving used objects that are not yet persisted in teh Baseline. The end result of that new cmdlet Get-IshPublicationOutputContent is a list of IshDocumentObj objects. Those objects are complex but in essence hold the LogicalId (GUID) and Version number. This issue is about using this result to update the Baseline object linked from the Publication version.

Actions...

  • Parameter Set IshDocumentObjGroup next to existing IshBaselineItemsGroup
  • Add Pester tests, this can be written over Get-IshFolderContent which requires less data set preparation
  • Add help like Set-IshBaselineItem -IshObject $ishPublicationOutput.FISHHBASELINE -IshDocumentObj (Get-IshPublicationOutputContent AutoCompleteMode ...) ... so a report that is persisted in the Baseline object linked to the publication
  • If incoming IshDocumentObj offer 2+ versions for the same LogicalId (GUID) the cmdlet will error out and not persist. This check is created in the ProcessRecord() method, the actual update is in the EndProcessing() method.
  • There will be no partial update, so any existing Baseline Items will be updated, potentially to the same version number which was already there.

Ideas...
When #126 and this entry is done, it is possible to write a blog post and updating the community thread as a better/crisper solution is available.

New-IshSession
$ishPublicationOutputObject = Find-IshPublicationOutput or Get-IshFolder | Get-IShFolderContent
Set-IshPublicationOutput -IshObject $ishPublicationOutputObject -Metadata (Set-IshMetadataField -Level Version -Name FISHMASTERREF -Value $ditaMapGuid)
$ishDocumentObjects = Get-IshPublicationOutputContent -IshObject $ishPublicationOutputObject -AutoCompleteMode LatestAvailable
$ishDocumentObjects = Set-IshDocumentObj -IshObject $ishDocumentObjects -Metadata (Set-IshMetadataField -Level Lng -Name FSTATUS -ValueType Element -Value $targetStatusTransitionReleasedState)
Set-IshBaselineItem -IshObject $ishPublicationOutputObject.FISHHBASELINE -IshDocumentObj $ishDocumentObjects
Publish-IshPublicationOutput -IshObject $ishPublicationOutputObject

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions