Skip to content

#14542 Summary: Assign unique case ids when importing multiple cases - #14634

Merged
magnesj merged 1 commit into
OPM:devfrom
magnesj:duplicate-summary-case-id-14542
Aug 28, 2026
Merged

#14542 Summary: Assign unique case ids when importing multiple cases#14634
magnesj merged 1 commit into
OPM:devfrom
magnesj:duplicate-summary-case-id-14542

Conversation

@magnesj

@magnesj magnesj commented Aug 27, 2026

Copy link
Copy Markdown
Member

Fixes #14542

Summary cases are created and given a case id before they are added to the project. RimProject::assignCaseIdToSummaryCase() derives the next id from allSummaryCases(), which does not yet contain any of the cases being created, so every case in a batch import was given the same id.

The Data Sources tree stores the owning case id in each RimSummaryAddress, and all lookups go through RiaSummaryTools::summaryCaseById(), which returns the first match. With duplicate ids:

  • selecting the same vector from three cases collapsed to a single case id, so New Summary Plot created one curve
  • dropping a vector from one of the other cases resolved back to the first case, hit the duplicate-curve check and did nothing

The locale is unrelated. The trigger is importing more than one summary case in a single import operation; importing them one at a time gave unique ids and worked.

RimProject::assignCaseIdsToSummaryCases() resolves the next free id once and hands out consecutive ids for the whole set, and RimSummaryCaseMainCollection::createSummaryCasesFromFileInfos() assigns after the creation loop. The single-case import paths (Reveal, StimPlan, derived, observed) add each case to the collection in the same loop iteration and are unchanged.

@magnesj magnesj self-assigned this Aug 27, 2026
@magnesj
magnesj force-pushed the duplicate-summary-case-id-14542 branch from 8780b81 to 5b1861e Compare August 27, 2026 13:52
Summary cases are created and given a case id before they are added to the
project. The id search only sees cases already in the project, so every case
in a batch import was given the same id.

The Data Sources tree stores the owning case id in each summary address, and
all lookups resolve to the first case with that id. Selecting the same vector
from several cases therefore produced a single curve, and dropping a vector
from one of the other cases hit the duplicate check and did nothing.
@magnesj
magnesj force-pushed the duplicate-summary-case-id-14542 branch from 5b1861e to 621ad08 Compare August 27, 2026 13:52
@magnesj
magnesj requested a review from jonjenssen August 27, 2026 13:52
@magnesj
magnesj merged commit 6d7959d into OPM:dev Aug 28, 2026
10 checks passed
@magnesj
magnesj deleted the duplicate-summary-case-id-14542 branch August 28, 2026 05:02
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.

Select of multiple summary vectors create only a single curve

2 participants