Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Channel shows as 'Unknown' when tickets created programmatically for brand new Issue Type


I have the below .groovy script that would create a simple ticket. 

Executing the below script on Scriptrunner's Script console creates ticket for "IssueTypeID=10002"(Service Request with Approvals) with Channel set to "Jira" by default as expected.

When trying to execute the below script with a newly created "IssueTypeID=10701"(Approval task), the Channel is set to "Unknown".


Why would the Channel be set to "Unknown" for a brand new Issue type and be set to "Jira" for the existing issue types ?

On the other note, I do know how to set the"Jira" programmatically after creating the issue. But, I don't want to set it unless needed.

Any insight on why Channel would show as "Unknown" for brand new issue type ?

import com.atlassian.jira.bc.issue.IssueService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser

long projectId = 10201 //Project Id
//def issueTypeID = "10701" //Approval task (brand new issuetype)
def issueTypeID = "10002" //Service Request with Approvals (existing issuetype)
//def issueTypeID = "10001" // Service Request (existing issuetype)

ApplicationUser currentUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
IssueService issueService = ComponentAccessor.getComponent(IssueService)

def issueInputParams = ComponentAccessor.getComponent(IssueService).newIssueInputParameters().with {
setSummary("Test Summary")
setDescription("Test Description")

def validationResult = issueService.validateCreate(currentUser, issueInputParams)
assert validationResult.valid : validationResult.errorCollection

def result = issueService.create(currentUser, validationResult)
result.valid ?"Ticket created: " + result.getIssue().getKey())[0]);

1 answer

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 08, 2022

Hi @Anita Kalidoss 

Maybe you have to enter a value for the customer channel source. Please see below the documentation (or search for your JSM version)

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events