githubbob42 / mingle2github2

0 stars 1 forks source link

When Job_Share__c field is visible on fxForms, the form name is duplicated #5316

Closed githubbob42 closed 6 years ago

githubbob42 commented 6 years ago

Mingle Card: 5675 Steps to Reproduce

| | |
|-|-|
|**Version #**| |
|**Hardware**| |
|**OS**| |
|**Browser**| |
|**Username**| |
|**Password**|Use LastPass|
|ORG ID| |
|User ID| |
|RayGun Error ID| |
  1. Create/Edit an fxForm (job or ticket)
    1. (make sure Job_Share__c field exists afterwards)
  2. click the details of the Job_Share__c field and click the “Set Field Level Security” button at the top of the details page
    !clip-35d4-04d2.png!
  3. Click the “Visible” checkbox at the top to select all checkboxes and click save
    !clip-0d80-6f22.png!
  4. Sync mobile
  5. goto the Forms tab and click add new button

Expected Result

Form name should only be displayed once

Actual Result

Form name is displayed twice

!clip-f01e-5cea.png!

Analysis

The Job_Share__c field gets created automatically via a trigger (?) when saving an eFormConfig entry.  By default, the Field Level Security is not set to Visible on the new Job_Share__c field so it’s not an issue.  But when the field is set to visible, mobile filters for the FX5__eForm_SObject__c name and matches it with the  childRelationship object, so both the Job__c Master/Detail and the Job_Share__c lookup match.

We just need to filter out any Job_Share__c field childRelationships.  We can do this because Job_Share__c should never be used by anything except the sync engine.  

However, if they add another lookup to Job (or whatever parent) they will get multiple entries.  I tried to get the Related List Label but there appears to be no way to retrieve this value via the api (or apex for that matter: https://salesforce.stackexchange.com/questions/9140/access-the-related-list-label-for-a-lookup-relationship).

So we are at least back to where we were before the Sync v4 Config feature…

Related Cards

Originally found here but no card created: [alpine_mobile/#5451] Related to backoffice card 952: Adding a new eform entry for a ticket in mobile doesn't work

Test Result 

| | |
|-|-|

   Result: Pass  
    

   |

Fixed Version: 4.0.1.pr2737

   |

Login:

   |

Username: pradeepfield2@six.com

   |

Password: computer50

   |

URL: https://dev.fieldfx.com

   |

OS/Browser:

   |

Windows 10/Chrome

   |

x

   |

IOS10/Safari

   |

x

   |

IOS 11/Safari

   |

   |

Android 7/Chrome

   |

   |

Testing Notes:

Setup the form eform object: Job Inspection for the job object. Ensured job share field on the eform object has read access to field user and admin user.

Login as the mobile user using 4.0.1.4033 , Trying to create the new form,

Job inspection was displayed twice (as attached)

!Capture-2de971.JPG!

After changing to the PR2737,

Job inspection Name displayed once,

Created an job inspection entry and double synced.. Verified entry is displayed correctly in both mobile app and backoffice

Followed the same tests for eForm on ticket and verified it listed once on mobile and entry is displayed correctly in the mobile app and backoffice

Test Case – 

_C6993 Ensure Eforms are not duplicated when job_share field is given read access (#567_5)  

| | |
|-|-|

   |
githubbob42 commented 6 years ago

Patty : 10/29/2018 14:49 CDT Documented as bug fix in 5/10/2018 Mobile release notes.

githubbob42 commented 6 years ago

Pull Request #2737