microsoft / microsoft/powerplatform-vscode

Inconsistent formatting of values for `pac env list-settings` and `pac env update-settings`

Open
#1,075 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
277
Forks
60
Avg merge
1d 1h
Merged PRs (30d)
14

Description

The --json flag could perhaps provide additional fields for the actual values, but as mentioned in #1058 there seems to be an issue with this where it only returns "ValueKind": "3".

I tried falling back to parsing the non json text output, but it's clear that from pac env list-settings are formatted, while pac env update-settings take unformatted values. e.g.:

% pac env list-settings --environment *** -f fullname                                                             
Connected as ******
Setting                Value
fullnameconventioncode First Name

The input takes a int value such as 0, 1, 2, ... 7 representing a choice:

% pac env update-settings --environment *** --name fullnameconventioncode --value 3                                   
Connected as ******
Setting 'fullnameconventioncode' updated successfully to '3'.

https://learn.microsoft.com/en-us/power-apps/developer/data-platform/reference/entities/organization#fullnameconventioncode-choicesoptions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the pac env list-settings and pac env update-settings command entry points in the Power Platform VS Code extension. Compare how fullnameconventioncode is formatted and parsed, including the --json output and the linked choice-options reference. Done means the two commands represent choice values consistently and the relevant output is usable without manual conversion.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.