formats/psworkitemreport.format.ps1xml

<!--
Format type data generated 01/02/2023 13:14:49 by PROSPERO\Jeff
 
This file was created using the New-PSFormatXML command that is part
of the PSScriptTools module.
 
https://github.com/jdhitsolutions/PSScriptTools
-->
<Configuration>
  <ViewDefinitions>
    <View>
      <!--Created 01/02/2023 13:14:49 by PROSPERO\Jeff-->
      <Name>default</Name>
      <ViewSelectedBy>
        <TypeName>PSWorkItemReport</TypeName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>Path</PropertyName>
        <Label>Path</Label>
      </GroupBy>
      <TableControl>
        <!--Delete the AutoSize node if you want to use the defined widths.-->
        <AutoSize />
        <TableHeaders>
          <TableColumnHeader>
            <Label>Category</Label>
            <Width>11</Width>
            <Alignment>left</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>Count</Label>
            <Width>8</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
          <TableColumnHeader>
            <Label>PctTotal</Label>
            <Width>11</Width>
            <Alignment>right</Alignment>
          </TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <ScriptBlock>
                if ($host.name -match 'console|code' -AND $_.Category -eq 'Overdue') {
                    "{0}{1}{2}{3}" -f $psstyle.Foreground.brightred, $psstyle.italic,$_.Category, $psstyle.reset
                }
                else {
                  $_.Category
                }
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                if ($host.name -match 'console|code' -AND $_.Category -eq 'Overdue') {
                    "{0}{1}{2}{3}" -f $psstyle.Foreground.brightred, $psstyle.italic,$_.count, $psstyle.reset
                }
                else {
                  $_.count
                }
                </ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>
                if ($host.name -match 'console|code' -AND $_.Category -eq 'Overdue') {
                    "{0}{1}{2}{3}" -f $psstyle.Foreground.brightred, $psstyle.italic,$_.PctTotal, $psstyle.reset
                }
                else {
                  $_.PctTotal
                }
                </ScriptBlock>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>
  </ViewDefinitions>
</Configuration>