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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

89 views 0 5
Read article

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