Converting Tempo Scripted Attributes to Custom JavaScript for JIRA

Most Scripted Attributes can be copy-pasted to Custom JavaScript for JIRA, however there is a slight difference between the way the script is called. While the Scripted Attrbutes are loaded together with the 'Log Work' screen, the Custom JavaScript script is loaded when the entire page is loaded.

This means that you'll need to add a check whether the 'Log Work' screen is shown to get the same functionality.

Example

This simple example will show a popup.

Scripted Attribute
AJS.$(document).ready(function() {
      alert("This is a pop up");
});
Custom JavaScript for JIRA
AJS.$(document).ready(function() {
  AJS.$('#time-popup').live('focus', function() {
      alert("This is a pop up");
  });
});