JS globals are deprecated and due to be removed in one of the Jira 8.0.x releases . They are replaced with AMD modules.
In our code we extend global objects for example:
BoardFilter.SearcherCollection = JIRA.Issues.SearcherCollection.extend({
initialize: function(models, options) {
this.extendedFields = options.extendedFields;
BoardFilter.SearcherCollection.__super__.initialize.apply(this, arguments);
},
or
if ( typeof GH.VersionView.draw === 'function'){
var versionShow = GH.VersionView.draw;
GH.VersionView.draw = function(){
versionShow.apply(this, arguments);
DEPRECATED: The global object GH.VersionController is deprecated. Please use require(["jira-agile/rapid/ui/version/version-controller"]) instead.
How do we do the same using AMD?
Cheers
Przemek