JSD reporting issues by channel

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2019

I would like to write a user report that shows issues by Channel. I can see the Channel in the issue detail view but it doesn't appear as field for reporting.

I'm not able to track down a reason for this. There are some change requests for the feature but they are quite old. Seem like an obvious requirement to me. 

Regards

Tom

5 answers

2 accepted

0 votes
Answer accepted
Emily Guadalupe March 29, 2022

I'm sure everyone here has found a solution for this since the issue was raised but I'm just now looking into this and found this article super helpful.

https://community.atlassian.com/t5/Jira-Service-Management/Campo-Request-channel-type-en-Filtros/qaq-p/1864319

It sounds like a great workaround to get the result you were looking for.

Also, this was helpful for retrieving the 'request.channel.type' of an individual issue.

https://community.atlassian.com/t5/Answers-Developer-Questions/How-can-I-retrieve-request-channel-type-via-Jira-API/qaq-p/546294

Hope that's helpful to someone!

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 29, 2022

Hi @Emily Guadalupe 

That’s a simple solution. Thanks for pointing that out.

Emily Guadalupe March 30, 2022

Continuing on this topic, I submitted a suggestion for the 'request-channel-type' to be be exposed in the API. It could use some voting love!!

https://jira.atlassian.com/browse/JSDCLOUD-11146

0 votes
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 18, 2019

Hello Tom,

What kind of reports you are trying to configure?

If you are planning to use a report based on JQL queries, you can use the request-channel-type field to report it. E.g:

Let's suppose you would like to return all issues created by e-mail on your site. This would be the query:

request-channel-type = email

 Please, let me know if it works for you.

Laurens Coppens
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2019

Gonclaves,

Magic, i didn't know you could filter like that.

Just tried it and works like a charm!

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 21, 2019

You are welcome, Laurens!

Have a nice week!

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 21, 2019

Hi @Petter Gonçalves

I was looking a column value to use in a 2 dimensional gadget showing channel against project.

Customer Request Type looks like a candidate but I can't see it in the gadget field list.

Like Boris Maksimov likes this
Boris Maksimov December 19, 2019

I would also like to have this field. I want to see issue distribution by channel type (let's say in a pie chart gadget), but without the actual field that appears to be impossible.

@Petter Gonçalves 

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 23, 2019

Hi

I have used this as a Scriptrunner Script Field

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.servicedesk.api.requesttype.RequestTypeService
import com.atlassian.servicedesk.api.requesttype.RequestTypeQuery
import com.atlassian.servicedesk.api.requesttype.RequestType
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.atlassian.servicedesk.api.util.paging.PagedResponse
import org.apache.log4j.Logger
// import com.atlassian.jira.issue.Issue
// def log
// Logger.getLogger("com.onresolve.scriptrunner.runner.ScriptRunnerImpl")

def issueManager = ComponentAccessor.getIssueManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObject("customfield_10204")
String requestType
try {
if (cField) {
def cFieldValue = issue.getCustomFieldValue(cField)
if (cFieldValue) {

def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
@WithPlugin("com.atlassian.servicedesk")
RequestTypeService requestTypeService = ComponentAccessor.getOSGiComponentInstanceOfType(RequestTypeService)
if (requestTypeService) {
RequestTypeQuery reqQ = requestTypeService.newQueryBuilder().issue(issue.id).build()
if (reqQ) {
PagedResponse<RequestType> reqT = requestTypeService.getRequestTypes(currentUser, reqQ)
List<RequestType> results = reqT.getResults()
for (item in results) {

requestType = item.getName().replace(' ', '_')
}
}
}

}
}
} catch( Exception e) {
// log.info(e.getMessage())

}
return requestType
3 votes
Tom Harris - Old Street
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 26, 2020

Hi @Tom Lister ,

If you're looking to report on the field Channel from JSD then the app Custom Charts for Jira may be able to help you. We've recently added support for Jira Service Desk specific fields including "Request Type" and "Request Channel Type".

You can easily create dashboards with custom charts and rename values and colors. You can try the app out right now on the free interactive app playground :)

Chart 2.pngChart 1.png

I hope that helps resolve your issue.

There's also an identical companion app Custom Jira Charts for Confluence for creating professional charts directly in Confluence.

Tom - Custom Charts Product Manager

Ricardo Martinez July 5, 2023

Hi @Tom Harris - Old Street 

 

I am trying to filter the "request-channel-type = api" but even the issues that I create via api, have the mentioned field as jira.

 

 

Do you need to explicitly set the request-channel-type when creating an issue via api, or why I am not getting the correct results?

1 vote
Laurens Coppens
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2019

See answer Goncalves! 

0 votes
Dana Mi February 9, 2020

@Petter Gonçalves The issue is not filtering by it, but using it in the reports (view in the dashboard gadget/pie chart by this).

Suggest an answer

Log in or Sign up to answer