doug-m / CollectorAuroraTesting

Manage testing feedback for Collector holistic testing.
0 stars 7 forks source link

Unable to view related records after adding them and reopening feature #184

Closed MarisaMC closed 6 years ago

MarisaMC commented 6 years ago

Issue

I have a feature layer that is related to a table which is related to another table. In Aurora, I can view a feature and add a related record, as well as add a related record for the table on the third level of the relationship.

However, after closing the feature and reopening it, there are no related records listed for the first table relationship. In AGOL, when viewing the web map, the table for the feature layer mentioned no related records to view. however, when viewing the table of the first relationship table, the records I added in Collector are visible.

Expected Behavior

If this worked correctly, the related records would display in Collector when viewing existing features. Also, this affects the way you see related records in AGOL web map. The feature should recognize related records added to it in Collector. (When clicking "View Related Records" in pop up)

Map and Credentials

Steps to Reproduce

  1. Open web map, click on and line near Zion National Park and add related record to first table, roads_survey, then add a related record to the second relationship class table, roadsrelateTAB2. Close the feature popup.
  2. Reopen the same feature popup. Click on the first relationship table. No records are there.
  3. Review in AGOL web map as well.

    Device Information

    • Device: IOS
    • OS Version:
Kevin-GIS commented 6 years ago

Hi @MarisaMC I tested this issue on my end. I was able to reproduce the issue.

Between the Primary feature layer and the first related table, the primary and foreign key fields is 'COMMENT' and 'notes'. Between the first and second related tables, the primary and foreign key fields is 'test' and 'test2'.

The reason why the related record doesn't display in the popup for the primary layer is because the 'COMMENT' field is blank, which causes the related 'notes' field to be blank, when then causes the related record to be orphaned. When a value is added to the 'COMMENT' field, it works correctly.

Whether working with GlobalID/GUID fields or user-defined fields, in either case in general, the primary key value is automatically copied over to the foreign key field. The main difference being that with GlobalID/GUID fields, because the Globalid value is system generated automatically, there's less of a risk of creating orphaned records.

Kevin-GIS commented 6 years ago

Hi @MarisaMC

With regards to preventing this type of workflow from happening, where a user can create a child record that's orphaned from the primary feature, the app currently does have safeguards in place.

However after further investigation for this particular data, if you were to select a line feature > edit that feature > tap in the Comment field, you will notice a blank space is already in that field as a default value (it shows 1/250 characters entered).

Screenshot ![file](https://user-images.githubusercontent.com/24723464/46379302-36df7700-c653-11e8-84dc-646bc60c2ea2.jpg)

If you were to then delete that space for that line feature > submit that edit so that this field is now completely null/empty > then attempt to add a new related record, you will see the following:

Screenshot ![file 1](https://user-images.githubusercontent.com/24723464/46379351-67271580-c653-11e8-9654-26c43862643e.jpg)

When the button is tapped, it will take you back to the COMMENT field in the primary feature and prevent a child record from getting created without it.