Skip to content

Made it possible to have a value included in many group values#168

Merged
likp merged 6 commits intomasterfrom
fix/multi-grouping
Jun 23, 2025
Merged

Made it possible to have a value included in many group values#168
likp merged 6 commits intomasterfrom
fix/multi-grouping

Conversation

@likp
Copy link
Contributor

@likp likp commented Jun 17, 2025

There is a bug in the 2.4 version where you get an exception in MetaQuery see

myOut.Add(outRow.ValueCode, outRow);
when you have a ValueCode that is in many groups which should be ok.

This PR checks change the dictionary to be a list of row instead of a single row and also checks if the key i already in the dictionary before trying to add it.

@JohannesFinsveen
Copy link
Collaborator

JohannesFinsveen commented Jun 18, 2025

On the bug ( for when we revist this in the future :-) ):
When ValueGroup is queried with 1 parent code, the child codes will be unique.
When ValueGroup is queried with more than 1 parent code, the same child code can occur in rows where parent codes differ.

Our metadata editors have an instruction not to create groupings where 2 groups have the same child.
table 04321 has one such grouping (something with 2002). if you select Drammen and Skoger you get 500, not data :-)

JohannesFinsveen and others added 2 commits June 18, 2025 14:52
Change from valueCode to parentCode as keys in dicts holding data from value group
Copy link
Collaborator

@JohannesFinsveen JohannesFinsveen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarqubecloud
Copy link

Copy link
Collaborator

@JohannesFinsveen JohannesFinsveen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@likp likp merged commit bac1aea into master Jun 23, 2025
10 checks passed
@likp likp deleted the fix/multi-grouping branch June 23, 2025 05:36
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.

2 participants