It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JSD reporting issues by channel

tom_lister Community Leader Jan 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

4 answers

1 accepted

0 votes
Answer accepted

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 Jan 18, 2019

Gonclaves,

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

Just tried it and works like a charm!

You are welcome, Laurens!

Have a nice week!

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

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 

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

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

See answer Goncalves! 

@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
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you