Esri / local-government-desktop-addins

A series of ArcGIS Desktop Add-ins used in the ArcGIS for Local Government editing maps.
Apache License 2.0
61 stars 57 forks source link

BUG-000113515 Attribute Assistant - Parcel Fabric 'On-Create' event triggers update during un-join/join process #279

Closed ChrisBuscaglia closed 5 years ago

ChrisBuscaglia commented 6 years ago

Un-joining parcel manually (keeps original OID of record) and then joining it triggers 'On-create' overwriting parcel numbers. Reproducible with our standard Tax Parcel Editing map that we ship (FGDB source). Reproduced on SQL Server enterprise as well.

  1. Open MXD and Start Editing
  2. Select a Tax Parcel
  3. Right click-unjoin
  4. Right click the parcel in the Parcel Explorer and choose Join
  5. Click OK on the join dialog
  6. Examine the new parcel - new Parcel ID Salesforce ID: BUG-000113515
MikeMillerGIS commented 5 years ago

Comments from bug Steps:

  1. Configure Attribute Assistant to auto-generate a ParcelID field with an auto-incrementing ID using the DynamicValue and GenerateID tables.

To do so, add a record in the DynamicValue table that comes with the Attribute Assistant download with the following attributes: DynamicValue: Table Name Field Name Value Method Value Info <PARCEL_SEQ|True> On Create On Change (Attribute) On Change (Geometry) Manual Only Rule Weight Comments

Also, add a record in the GererateID table that comes with the Attribute Assistant download: GenerateID: Sequence Name Sequence Counter <1045167> Interval Value <1> Comments

  1. Create a new empty file geodatabase.
  2. Import the two tables that you've modifed DynamicValues and GenerateID in the new file geodatabase.
  3. Create a new Feature Dataset.
  4. Create a new parcel fabric named with field in the Parcels table.
  5. Add the attribute assistant toolbar to your map.
  6. Create a new parcel with the Attribute Assistant Turned ON. Make note of the auto-generated ParcelID value.
  7. Unjoin this parcel.
  8. Join this parcel.
  9. Note that the ParcelID value has changed and has incremented by 1.
MikeMillerGIS commented 5 years ago

Traced this to pFeatChange.OriginalShape.IsEmpty. When a parcel is unjoined and join, the original shape is empty

 if (bIsFabricRecord)
                            {
                                if (pFeatChange.OriginalShape.IsEmpty)
                                    sendEvent(obj, "ON_CREATE"); //original shape empty, but shape change means new parcel
                                else
                                    sendEvent(obj, "ON_CHANGE");//treat geometry changes as standard change for fabric
                            }
                            else
                                sendEvent(obj, "ON_CHANGEGEO");
                        }

The workaround is to use the fourth parameter, this will only create an ID when the field is null: PARCELID|0|[seq]|True

MikeMillerGIS commented 5 years ago

Issue on hold, waiting from response from parcel fabric team, work around is validate if the create event is required.

MikeMillerGIS commented 5 years ago
<!--Option to suppress stored event on all cases, only disable if experiancing issue with the parcel fabric.  May case issues with other rules-->
    <add key="SetStoreEventsRequired" value="True"/>
MikeMillerGIS commented 5 years ago

options are True | False