Skip to content

Generate guid for FormatViewDefinition InstanceId if not provided #11896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Feb 19, 2020

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

@iSazonov 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
@iSazonov iSazonov added this to the 7.1.0-preview.1 milestone Feb 20, 2020
@iSazonov iSazonov merged commit a098550 into PowerShell:master Feb 20, 2020
@ghost
Copy link

ghost commented Mar 26, 2020

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

Handy links:

@SteveL-MSFT SteveL-MSFT deleted the export-formatdata branch June 6, 2020 02:30
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