Skip to content
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

Fixing Issue 3275 - Add SharingStatus to Get-PnPFlow #3287

Merged
merged 12 commits into from
Aug 6, 2023

Conversation

NishkalankBezawada
Copy link
Contributor

@NishkalankBezawada NishkalankBezawada commented Jul 21, 2023

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #3275

What is in this Pull Request ?

Add the option for SharingStatus to the Get-PnPFlow command.
Added a new property SharingStatus, by which the below scenarios can be fulfilled.
SharedWithMe returns flows that are shared with you, or created by you and shared with someone.
Personal returns all flows created by you which are not shared.
All combines both Personal and SharedWithMe

Created a new enum as below

image

namespace PnP.PowerShell.Commands.Enums
{
    /// <summary>
    /// Scopes to which flow sharing status is defined
    /// </summary>
    public enum FlowSharingStatus
    {
        /// <summary>
        /// returns flows that are shared with you, or created by you and shared with someone
        /// </summary>
        SharedWithMe,

        /// <summary>
        /// returns all flows created by you which are not shared.
        /// </summary>
        Personal,

        /// <summary>
        /// Combines personal and sharedwith me
        /// </summary>
        All

    }
}

And used this property as below

        [Parameter(Mandatory = false)]
        public FlowSharingStatus SharingStatus = FlowSharingStatus.All;

A summary of test cases are as below

Get-PnPFlow -SharingStatus sharedwithme
Get-PnPFlow -SharingStatus personal
Get-PnPFlow -SharingStatus all

image

Summary

copilot:summary

Details

copilot:walkthrough

@KoenZomers
Copy link
Collaborator

Thanks @NishkalankBezawada for your contribution. I have cleaned it up and made some minor changes to it. Please have a look at the changes I have done. Also next time, please remember to include updated documentation whenever making a change to cmdlets. I have done that for you already. I will proceed with merging this feature. Thanks again for taking the time to contribute!

@KoenZomers KoenZomers merged commit a261de8 into pnp:dev Aug 6, 2023
3 checks passed
@NishkalankBezawada
Copy link
Contributor Author

Thanks @KoenZomers for your guidance on my first ever contribution to PnP Powershell. I will make sure to comply with the documentation hereafter :)

@NishkalankBezawada NishkalankBezawada deleted the Feature-3275 branch August 7, 2023 07:22
@sp00kyDD
Copy link

Nice feature thank you! But SharingStatus is not working, is it still unreleased?

@KoenZomers
Copy link
Collaborator

KoenZomers commented Oct 16, 2023

@sp00kyDD Its available in the latest nightly release. It's not available in 2.2.0. We don't have an ETA yet on the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add --sharingStatus to Get-PnPFlow [FEATURE]
3 participants