civicrm/civicrm-core — pull request #2803 by pratik-joshi (2014-04-02 13:35:56+00:00)
Title: CRM-14327 : Tab page refresh

possible fix for point 1 of #comment-58811 (this root cause of issue is tab page doesn't get refreshed after multiple 'save and new' of any entity tab form)

Following tested for Contribution and Multi custom data tabs:
- A tab consists of record listing and a button to add new record.
- click on add new record and fill details and click on 'save and new' [the record gets saved and record listing gets refreshed and a fresh form gets displayed]
- click on 'save' or 'save and new' button the form details gets saved but the record listing doesn't gets updated. Later when user closes the dialog upon form submission through 'save and new' click, he finds old records listed and not the new one.

The fix:
added tab reset code on crmFormSuccess event trigger. There was one more suitable point at which that would have taken place, but due to a condition $.isPlainObject(data.updateTabs) it won't get executed. Upon looking more into the use of 'updateTabs', it occurred to me that its a right thing for this code to not get executed(i.e not fulfilling above condition).