Trouble with default values in Issue Collector

Trying to create a simple issue collector to give our non-JIRA users a way to request accounts, etc. I have a basic, out of the box implementation (locally hosted on my laptop - for experimentation). Have a basic issue collector, creating issues (issue-type "Task") in my project - all that seems to work fine, but I'd like to set the Priority field to "normal" or "non-critical", but when using the fieldValues in the test, it's not setting the value in the created task.

Here's the simple code to display the issue collector:

<html>
<body>
<h1>JIRA Request - Localhost!</h1>

<script type="text/javascript" src="http://localhost:8080/s/en_USclb6b2-418945332/846/3/1.2.9/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=eb2f7ebc"></script>

<script type="text/javascript">
window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {
 
    // ==== custom trigger function ====

    triggerFunction : function( showCollectorDialog ) {
            //Requries that jQuery is available! 
            $('#myCustomTrigger').on( 'click', function(e) {
                    e.preventDefault();
                    showCollectorDialog();
            });
       },
    // ==== we add the code below to set the field values ====
    fieldValues: {
        priority : '1'
    }    
});

</script>

    <a href="#" id="myCustomTrigger"><button>submit</button></a>

    </body>

</html>

It runs just fine, but when I look at the created task, there's no priority set.

I can modify the collector itself, add the priority field onto the screen, but that lets anyone who's using the form say their request is critical (are they ever?)... seriously, I'd really just like to default the priority to normal.

what am I missing?

2 answers

1 accepted

resolved... wasn't working properly in locally hosted (on my laptop) instance, but worked ok for our on-demand JIRA version.

thanks.

-Peter

0 vote

Hi Peter,

Did you turn on the "Collect Browser Info" in Issue Collection configuration form? Hope its help.

Regards,

John Chin

John, yes, "collect browser info" had been checked...

When I said the "Priority" field - I was speaking of the JIRA field value (e.g., blocker, critical, etc.). The code snipped above follows (almost to the letter) the documentation for Advanced Use of the issue collectors: https://confluence.atlassian.com/display/JIRA/Advanced+Use+of+the+JIRA+Issue+Collector#AdvancedUseoftheJIRAIssueCollector-SettingfieldvaluesfromJavaScript

not quite sure what the Browser Info might have to do with that, but regardless, it was checked when I tested the collector.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,198 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot