-
Notifications
You must be signed in to change notification settings - Fork 157
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
Ambiguity or bug in Update-VSTeamUserEntitlement #393
Comments
just to clarify
Is this correct? |
Apologies for being unclear.
|
Gonna check this, when I find time. Thanks! If you are willing to make a PR we would also be happy to review. |
@wembleyford: I have checked it and the parameter set is with the name "ByIdLicenseOnly" should make it possible to only use @DarqueWarrior or @smurawski I think something must be wrong with all the parameter sets. I have not enough knowledge maybe one of you know what could be wrong? This is the cmdlet: https://github.com/MethodsAndPractices/vsteam/blob/trunk/Source/Public/Update-VSTeamUserEntitlement.ps1 |
@SebastianSchuetze My guess (which should be confirmable with a Trace-Command watching for parameter binding) is that the engine can't differentiate between ByIdLicenseOnly and ByIdWithSource. My suggestion would be that you don't need the two parameter sets - just a ById and make the behavior conditional on whether or not a Source was provided. You may have similar challenges with the ByEmail variant. If you look at the command metadata in the engine - it builds the appropriate parameter sets, but parameter sets need something that distinguishes them from all other parameter sets. The absence of one parameter doesn't differentiate enough. It's not the same as method overloads because there are runtime behaviors for binding, transformation, and user prompting. |
makes completely sense. The set's looked too complicated to me anyways. Maybe I try to simplify without braking any existing scripts using this cmdlet. |
@smurawski would you be so kind to quickly check for me if you think the change would not break existing scripts using the cmdlet? I basically just merged parameter sets. By this at max one parameter is not mandatory anymore. This is the PR #400 |
Steps to reproduce
Expected behavior
The license for the specified user should be updated. It can be updated by using the following format
Actual behavior
There's no detail in the get-help documentation for this particular cmdlet specifying any examples, other than to indicate that the combination of id and license should be valid.
It's also unclear as to what input that this command is accepting via the pipeline in the second example which does work.
Environment data
The text was updated successfully, but these errors were encountered: