Howdy,
I am trying to modify the default trigger button that calls the collector form from a Confluence page.
I am not into development and web development specifically, so most of JavaScript stuff is all greek to me. I'd appreaciate your help greately.
So I have created a new Collector in Jira and set the trigger to Custom.
Then I have added a Markdown macro to the Confluence page where I want to modify the trigger button. The macro should allow me to inject JavaScript into the page.
Inside the Markdown macro I have added the following script:
<script src="https://code.jquery.com/jquery-latest.js"></script> <script> jQuery.ajax({ url: "https://example.net/jira/s/9513b004b8a6dcfc358427f3364b533d-T/ |
However, when I click the Report Feedback link-button, nothing happens, Jira Issue Collector's form does not show up.
What am I doing wrong here? TIA.
For anyone else that finds this issue, closing following this SO article resolved my issue.
https://stackoverflow.com/questions/44673689/window-atl-jq-page-props-in-jqgrid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Stan Ry Can you post your full script? I've tried piecing together your original post and your solution but it isn't working for me. This is for a Classic Project in JIRA Cloud that supports Issue Collectors if that makes a difference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wonder why isn't it suggested in the official docs? Uhm... Or are there any other ways to workaround the delays and make it so the button to which you assign opening of the Issue Collector form is always clickable?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, the issue is ridiculous.
If Jira cannot be immediately accessed, the trigger function doesn't fire on time. To work this around I had to add a timeout:
<script type="text/javascript">
$(document).ready(function(){
window.ATL_JQ_PAGE_PROPS = {
"triggerFunction": function(showCollectorDialog) {
var intId = setInterval(function(){
if($('#myIssueTrigger').length>0){
jQuery("#myIssueTrigger").click(function(e) {
e.preventDefault(); showCollectorDialog();
});
clearInterval(intId);
}
},500);
}}; });
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any other ways to trace down the issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd suggest first having a look for errors in the Console.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The code you pasted also has a different id (feedback-button vs myCustomTrigger)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Johan,
Thanks for your response. That's a glitch here. I was using the custom code, then forgot to modify it for this post.
Unfortunately, the ID name doesn't seem to be the cause. Here's the screenshot:
And there's the console output:
No visible issues whatsoever.
What could it be? I am running out of ideas...
Thank you in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.