Project

General

Profile

Actions

Task #1413

closed

EAVs are deleted&created when updating a contract from a slice

Added by Alena Peterová over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Vít Švanda
Category:
Contractual relationship
Target version:
Start date:
12/11/2018
Due date:
% Done:

100%

Estimated time:
Owner:

Description

Version 9.3.1

When a contract is updated from its current slice, the EAV attributes should be copied from the slice to the contract. But the EAVs are deleted and created, not copied.
It creates:
  • useless records in the audit log (too many records are generated and it's hard to distinguished real changes)
  • useless events (Contract EAV_SAVE)

Related issues

Has duplicate IdStory Identity Manager - Task #1948: Implement merging of EAVs from slices to contractRejectedVít Švanda11/19/2019

Actions
Actions #1

Updated by Radek Tomiška over 5 years ago

  • Assignee changed from Radek Tomiška to Vít Švanda

Yes, eav values from slice are moved to contract values.

Actions #2

Updated by Alena Peterová over 4 years ago

Note: ClearDirtyStateForContractSliceTaskExecutor removes and creates the EAV for all slices, that have dirty flags. Even if the valid slice is processed first (which it is), then processing of all invalid slices makes again update of contract from actual slice.
If there are 2 slices of one contract and 10 EAVs of contract, this creates 42 audit records:
  • 10 Remove + 10 Create of IdmIdentityContractFormValue when the first (valid) slice is processed
  • 1 update of IdmIdentityContract when the first (valid) slice is processed
  • 10 Remove + 10 Create of IdmIdentityContractFormValue when the second (invalid) slice is processed
  • 1 (empty) update IdmIdentityContract when the second (invalid) slice is processed

This is hell - huge amount of useless data and you can't find the real changes in the audit log.

Actions #3

Updated by Radek Tomiška over 4 years ago

  • Has duplicate Task #1948: Implement merging of EAVs from slices to contract added
Actions #4

Updated by Vít Švanda over 4 years ago

  • Status changed from New to In Progress
  • Target version set to Rhyolite (9.7.12)
Actions #5

Updated by Vít Švanda over 4 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška

I implemented merge of EAV values when slice is copied to the contract.

I use same mechanism as identity-role attributes using for copy of EAVs from concept.
I created tests for this feature too.

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/84d4eac5c4a7873b11c962f990d5570026537944

Actions #6

Updated by Radek Tomiška over 4 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 0 to 100

I did test and code review, it works and code is nice, thx!

Actions #7

Updated by Radek Tomiška over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF