Skip to content

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

Merged
KoenZomers merged 12 commits intopnp:devfrom
NishkalankBezawada:Feature-3275
Aug 6, 2023
Merged

Fixing Issue 3275 - Add SharingStatus to Get-PnPFlow#3287
KoenZomers merged 12 commits intopnp:devfrom
NishkalankBezawada:Feature-3275

Conversation

@NishkalankBezawada
Copy link
Collaborator

@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
@NishkalankBezawada
Copy link
Collaborator 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
@broilertech
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