We're looking into whether we can make use of the IssueCollector plugin (https://plugins.atlassian.com/583856), but I've been told that modifying our product to include the required JS is not an option. I have been trying to get GreaseMonkey to run the scripts without any success.
Can anyone tell me whether it's actually possible to add the trigger in this way? Thanks!
Ah-ha :-) The answer is 'yes'.
The Issue Collector JS code comes in two parts: a script downloaded from the JIRA server, and a small bit of inlined code. The trick is to use a @require statement in your GreaseMonkey script to handle the former:
// ==UserScript==
// @name Report a Bug
// @namespace asda
// @include *
// @require http://jira:8080/s/en_UK6a5s4d/664/14/1.0.14-beta/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js
// ==/UserScript==
if(window.ATL_JQ !== undefined) {
ATL_JQ(function() {
new ATL_JQ.IssueDialog({
collectorId:"1fde3e24",
collectFeedback:function() {
return {
"Location":window.location,
"User-Agent":navigator.userAgent,
"Referrer":document.referrer,
"Screen Resolution":screen.width + " x " + screen.height
};
},
triggerText: "Raise a Bug",
triggerPosition: "TOP"
});
});
}
GreaseMonkey's getting a tad over-eager and is putting the trigger on everything that moves, but that should be easy enough to fix :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.