Skip to content

Fix inverted Data Encoding condition in ReadValueEditDlg - #744

Merged
romanett merged 1 commit into
masterfrom
romanett-legendary-meme
Aug 13, 2026
Merged

Fix inverted Data Encoding condition in ReadValueEditDlg#744
romanett merged 1 commit into
masterfrom
romanett-legendary-meme

Conversation

@romanett

Copy link
Copy Markdown
Contributor

Proposed changes

In the Read value dialog, the Data Encoding the user typed (e.g. Default Binary / Default XML) was silently discarded, so reads were always sent with a null/empty DataEncoding.

The root cause was an inverted condition in ReadValueEditDlg.ShowDialogAsync: it only assigned valueId.DataEncoding when the encoding text was empty, and then assigned an empty QualifiedName. When the user actually entered an encoding, the assignment was skipped entirely.

This change assigns the entered encoding when present and clears it to QualifiedName.Null when the field is blank.

Related Issues

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

N/A

@romanett
romanett merged commit cb19a96 into master Aug 13, 2026
3 of 7 checks passed
The condition assigning ReadValueId.DataEncoding was inverted: it only set
the encoding when the text was empty (assigning an empty QualifiedName), so
a user-specified encoding was silently discarded. Now the entered encoding
is applied, and a blank field clears it to QualifiedName.Null.

Fixes #737

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@romanett
romanett deleted the romanett-legendary-meme branch August 14, 2026 05:15
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.

UA Sample Client: cannot set Data Encoding when reading a value (inverted condition)

1 participant