zendesk/jira_app — pull request #2 by jakeisonline (2012-11-15 22:13:14+00:00)
Title: Try preventing the app loading the JIRA form before it has been able to ...

When you go to a ticket which has an active JIRA agreement, and details about the story in JIRA, the app should display those details using the "details" template.

This does happen, but when the interface is drawing the app also picks up on change events on the sharing drop down causing the app to load the form rather than the details.

This adds a guard to stop the app is it's already showing the "details" template or if it hasn't completed the AJAX call to get project details.

**Problems**

1. If the AJAX call fails, there's no good way to recover. Might need to extract a `detailRetrievalFailed` function to control exactly what happens when the AJAX fails
2. If the user changes to "Unshare ticket" and then back to the currently active agreement, the app will revert back to the JIRA form not the details. We need a more solid way in the framework to make a distinction between the drop down values, and what's actually saved on the DB.