FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Generate guid for FormatViewDefinition InstanceId if not provided by SteveL-MSFT · Pull Request #11896 · PowerShell/PowerShell · GitHub

Generate guid for FormatViewDefinition InstanceId if not provided - #11896

Merged
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:export-formatdata
Feb 20, 2020
Merged

Generate guid for FormatViewDefinition InstanceId if not provided#11896
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:export-formatdata

Conversation

Steve Lee (SteveL-MSFT) commented Feb 19, 2020
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

InstanceId for a FormatViewDefinition is the key to help differentiate views with the same name for the same type. However, when using the constructor for FormatViewDefinition that doesn't take an InstanceId, it keeps the default guid value of all zeros. During export time, the cmdlet builds a dictionary with the InstanceId as the key and with multiple views with same key, you only get the first one. Fix is to generate a new guid for InstanceId if one is not provided.

PR Context

Fix #11825

PR Checklist

Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Feb 20, 2020
Ilya (iSazonov) added this to the 7.1.0-preview.1 milestone Feb 20, 2020
Ilya (iSazonov) merged commit a098550 into PowerShell:master Feb 20, 2020

Copy link
Copy Markdown

🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export-FormatData only exports first view

3 participants


Back | FazBrowse Home | New Git URL