How to set Connect fields while creating issues using direct HTML links?


To create issues, without filling the different custom fields manually, we can construct the desired HTML link that will pre-populate the Create Screen with desired values for multiple fields including Connect fields. The user will still have to click on the 'Create' button to create the issue as with this method, it's not possible to create (submit) the issue automatically.

The above is explained in details in this Atlassian KB: How to create issues using direct HTML links in Jira Server and several examples were listed to learn how to set different custom fields.

Here's how to set Elements Connect fields using that method.

Connect Field type Live

Suppose we have a Connect field Live Text - issue picker "customfield_xxxxx"

Edit view query:

select id , summary
from jiraissue

The field Key is set on the id, and the Template is set on the summary.

  • Single value: 
    In case the field accepts single value, here's how to construct the URL link that will create the issue:

    https://JIRA_BASE_URL/secure/CreateIssueDetails!init.jspa?pid=10000&issuetype=10004&summary=Test+URL+link&reporter=admin&customfield_xxxxx=10008
  • Multiple values:
    In case the field accepts multiple values, here's how to construct the URL link that will create the issue:

    https://JIRA_BASE_URL/secure/CreateIssueDetails!init.jspa?pid=10000&issuetype=10004&summary=Test+URL+link&reporter=admin&customfield_xxxxx={%22inputValues%22:[%2210008%22,%2210012%22]}

    In both cases:

    • JIRA_BASE_URL should be replaced by the instance base URL.
    • pid: should be replaced by the id of the project where we need to create the issue.
    • issuetype: should be replaced by the issue type id for the created issue.
    • customfield_xxxxx: should be replaced by id of the Connect field (type Live).
    • 10008, 10012 should be replaced by valid Key values for the Connect field.

Connect field type Snapshot

Snapshots fields are single values and they have no Key; therefore, the value displayed on the Jira issue is the stored value that should be passed when creating the issue.

Suppose we have a Connect field Snapshot Text - issue picker "customfield_zzzzz"

Edit view query:

select id , summary
from jiraissue

Let's take an example for an issue with id 10008 and the summary "Test connection".

  • In case the field was configured to display the id on the issue view screen, here's how to construct the URL link that will create the issue:

    https://JIRA_BASE_URL/secure/CreateIssueDetails!init.jspa?pid=10000&issuetype=10004&summary=Test+URL+link&reporter=admin&customfield_zzzzz=10008
  • In case the field was configured to display the summary on the issue view screen, here's how to construct the URL link that will create the issue:

    https://JIRA_BASE_URL/secure/CreateIssueDetails!init.jspa?pid=10000&issuetype=10004&summary=Test+URL+link&reporter=admin&customfield_zzzzz=Test+connection

    In both cases the below arguments should be replaced with what matches the use case:

    • JIRA_BASE_URL should be replaced by the instance base URL.
    • pid: should be replaced by the id of the project where we need to create the issue.
    • issuetype: should be replaced by the issue type id for the created issue.
    • customfield_zzzzz: should be replaced by id of the Connect field (type Snapshot).
    • 10008 or "Test connection" should be replaced by valid values to what it's displayed in the Snapshot field.