githubbob42 / mingle2github2

0 stars 1 forks source link

Duplicate (4) eForms events created in a packet #4811

Closed githubbob42 closed 7 years ago

githubbob42 commented 7 years ago

Mingle Card: 5159 Steps to Reproduce

| | |
|-|-|
|**Version #**| |
|**Hardware**| |
|**OS**| |
|**Browser**| |
|**Username**| |
|**Password**|Use LastPass|
|ORG ID|AMI|
|User ID| |
|RayGun Error ID|http://support.liquidframeworks.com/helpdesk/tickets/3070|
  1. Goto fxForms tab (Job or Ticket)
  2. click add new button
  3. fill in any required fields and DOUBLE click add button as fast as you can

Expected Result

Only one event should be created.

Actual Result

Four duplicate events where created for a single fxForm created event (AL-49743):

https://fieldfx-7043.cloudforce.com/a0l1N000007LOQV?srPos=0&srKp=a0l

!card5159.png!

Analysis

I was able to reproduce this by double clicking on the add button and it created two duplicate events with the same Sync IDs.

I noticed that we are already using the “command” handler, which is supposed to block the UI when you click, but it doesn’t appear to be fast enough. 

I also found that the addChild button on the fxForms parent page was not wrapped in the command binding and allowed multiple clicks and thus multiple modals to open.

Related Cards

NOTE: This fix may fix several other duplicate event issues we’ve been having...

Test Plan

See note below about CPU throttling. Try to double click when creating different objects. Make sure that your sync upload works.

The full selenium suite is green.

(Not required but throttling the CPU x2 if using the desktop helps)

To test the add child form, it’s basically same as above, but get clicky on the child form add button.

NOTE:

The command binding is used on the following pages:

/bindings/report.js:

/fx-forms/add.html:

/fx-forms/create.html:

/fx-forms/templates.html:

/job/copy.html:

/job/create.html:

/quote/copy.html:

/quote/create-job.html:

/quote/create.html:

/quote/item/picker.html:

/ticket/copy.html:

/ticket/create.html:

/ticket/item/list.html:

/ticket/item/picker.html:

githubbob42 commented 7 years ago

Godswill : 06/28/2017 09:34 CDT Test Result: Passed PR Build: 4.0.1.pr2432 Admin User: godswillfield@test4.com/computer#4 Hardware: MacBook Pro OS: MacOS 10.12.5 Browser: Version 58.0.3029.110 (64-bit) URL: https://hunterpeak.herokuapp.com Test Case: Steps on 5159 Test Notes:Duplicate eform event is no longer created in the event store

githubbob42 commented 7 years ago

Pull Request #2432