View Issue Details

IDProjectCategoryView StatusLast Update
0003268CaseTalk ModelerDiff and Mergepublic2022-01-05 13:41
ReporterBCP Software Assigned ToBCP Software  
PriorityurgentSeveritymajorReproducibilityhave not tried
Status resolvedResolutionfixed 
Target Version12.3Fixed in Version12.3 
Summary0003268: Merge shorter expressions may fail
DescriptionWhen an expression has less expression parts and is merged using Overwite Details set, an index error results in random expression parts getting lost.
TagsNo tags attached.
CaseTalk Editionunknown

Activities

BCP Software

BCP Software

2022-01-05 11:50

administrator   ~0002152

The only solution is to merge again from the source models and overwrite the new details and expressions.
BCP Software

BCP Software

2022-01-05 13:01

administrator   ~0002153

Last edited: 2022-01-05 13:15

Query the server repository over all versions and models to find the newest mismatches:

select 
  org.item_name, max(org.ig_version) as ig_version, org.otft_name, org.exp_code, org.expparts as origin_expparts, other.item_name as used_in, max(other.ig_version) as used_in_ig_version, other.expparts as used_expparts ,
  case when len(org.expparts) < len(other.expparts)
    then 'Not truncated'
    else 'Missing parts'
    end as status
from
(
select iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version, STRING_AGG(exp_part_no,',') expparts
from ctk_expression_part ep
join ctk_expression e on e.ig_version = ep.ig_version and e.exp_code = ep.exp_code
join ctk_item_version iv on iv.item_version = e.ig_version
join ctk_information_model i on i.ig_version = ep.ig_version and derived_from_ig_version is null
group by iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version
) org
join
(
select iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version, STRING_AGG(exp_part_no,',') expparts
from ctk_expression_part ep
join ctk_expression e on e.ig_version = ep.ig_version and e.exp_code = ep.exp_code
join ctk_item_version iv on iv.item_version = e.ig_version
join ctk_information_model i on i.ig_version = ep.ig_version and derived_from_ig_version is null
group by iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version
) other
on other.exp_synclink = org.exp_synclink
and other.otft_name = org.otft_name
and other.ig_version > org.ig_version
and other.namespace_version = org.ig_version
and other.expparts <> org.expparts
and org.item_name <> other.item_name

group by
  org.item_name, org.otft_name, org.exp_code, org.expparts, other.item_name, other.expparts
BCP Software

BCP Software

2022-01-05 13:18

administrator   ~0002154

Or just a list of relevant OTFTs which are affected by the bug:


select distinct
  org.item_name, -- max(org.ig_version) as ig_version, 
  org.otft_name, 
  -- org.exp_code, org.expparts as origin_expparts, 
  other.item_name as used_in, -- max(other.ig_version) as used_in_ig_version, 
  -- other.expparts as used_expparts ,
  case when len(org.expparts) < len(other.expparts)
    then 'Not truncated'
    else 'Missing parts'
    end as status
from
(
select iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version, STRING_AGG(exp_part_no,',') expparts
from ctk_expression_part ep
join ctk_expression e on e.ig_version = ep.ig_version and e.exp_code = ep.exp_code
join ctk_item_version iv on iv.item_version = e.ig_version
join ctk_information_model i on i.ig_version = ep.ig_version and derived_from_ig_version is null
group by iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version
) org
join
(
select iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version, STRING_AGG(exp_part_no,',') expparts
from ctk_expression_part ep
join ctk_expression e on e.ig_version = ep.ig_version and e.exp_code = ep.exp_code
join ctk_item_version iv on iv.item_version = e.ig_version
join ctk_information_model i on i.ig_version = ep.ig_version and derived_from_ig_version is null
group by iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version
) other
on other.exp_synclink = org.exp_synclink
and other.otft_name = org.otft_name
and other.ig_version > org.ig_version
and other.namespace_version = org.ig_version
and other.expparts <> org.expparts
and org.item_name <> other.item_name

group by
  org.item_name, org.otft_name, org.exp_code, org.expparts, other.item_name, other.expparts
order by item_name, otft_name, used_in, status
BCP Software

BCP Software

2022-01-05 13:22

administrator   ~0002155

The mismatch of amount of expression parts during merge has been fixed. The problem should resolve itself once source models are merged again with 'Overwrite Details' turned on.
BCP Software

BCP Software

2022-01-05 13:41

administrator   ~0002158

Only model combinations which need re-merging:


select distinct
  org.item_name, -- max(org.ig_version) as ig_version, 
  -- org.otft_name, 
  -- org.exp_code, org.expparts as origin_expparts, 
  other.item_name as used_in -- max(other.ig_version) as used_in_ig_version, 
  -- other.expparts as used_expparts ,
  /*
  case when len(org.expparts) < len(other.expparts)
    then 'Not truncated'
    else 'Missing parts'
    end as status
    */
from
(
select iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version, STRING_AGG(exp_part_no,',') expparts
from ctk_expression_part ep
join ctk_expression e on e.ig_version = ep.ig_version and e.exp_code = ep.exp_code
join ctk_item_version iv on iv.item_version = e.ig_version
join ctk_information_model i on i.ig_version = ep.ig_version and derived_from_ig_version is null
group by iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version
) org
join
(
select iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version, STRING_AGG(exp_part_no,',') expparts
from ctk_expression_part ep
join ctk_expression e on e.ig_version = ep.ig_version and e.exp_code = ep.exp_code
join ctk_item_version iv on iv.item_version = e.ig_version
join ctk_information_model i on i.ig_version = ep.ig_version and derived_from_ig_version is null
group by iv.item_name, ep.ig_version, e.otft_name, ep.exp_code, e.exp_synclink, e.namespace_version
) other
on other.exp_synclink = org.exp_synclink
and other.otft_name = org.otft_name
and other.ig_version > org.ig_version
and other.namespace_version = org.ig_version
and other.expparts <> org.expparts
and org.item_name <> other.item_name

group by
  org.item_name, -- org.otft_name, org.exp_code, org.expparts, 
  other.item_name -- , other.expparts
order by item_name, -- otft_name, 
used_in --, status

Issue History

Date Modified Username Field Change
2022-01-05 11:46 BCP Software New Issue
2022-01-05 11:46 BCP Software Status new => assigned
2022-01-05 11:46 BCP Software Assigned To => BCP Software
2022-01-05 11:50 BCP Software Note Added: 0002152
2022-01-05 13:01 BCP Software Note Added: 0002153
2022-01-05 13:07 BCP Software Note Edited: 0002153
2022-01-05 13:10 BCP Software Note Edited: 0002153
2022-01-05 13:13 BCP Software Note Edited: 0002153
2022-01-05 13:14 BCP Software Note Edited: 0002153
2022-01-05 13:15 BCP Software Note Edited: 0002153
2022-01-05 13:18 BCP Software Note Added: 0002154
2022-01-05 13:22 BCP Software Status assigned => resolved
2022-01-05 13:22 BCP Software Resolution open => fixed
2022-01-05 13:22 BCP Software Fixed in Version => 12.3
2022-01-05 13:22 BCP Software Note Added: 0002155
2022-01-05 13:41 BCP Software Note Added: 0002158