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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

How to extract the organizations to which a customer belongs to

I am trying to create an issue filter where I can easily see which organizations have created new issues in the last week.  I can easily create an issue filter which shows me all issues created in the last week, but I am not able to display a column which shows the organization(s) to which the reporter belongs to.  This seems to be due to the issue not containing a field which can be listed.

I am aware of the "organizations" field, but this is not what I need; this field reports the organizations which the reporter chose to share the issue with (and if the reporter chose "private" then this field will be empty).

So I was thinking that I could create a custom field for the issue and then run some automation which would copy the organization(s) to which the reporter belongs to into this custom field.

I can foresee a problem in that any customer can belong to more than one company, which is useful if you want to allow your customers to share issues by department within an organization for example (by adding the same customer to multiple organizations which are the different departments in the same company).  The problem would then be choosing which of the multiple companies to select.  I would hope that a "left-index" into the array would suffice, or if I only allowed each customer to belong to one company, then it would only be possible to report one result anyway (which I am happy to live with as this feature is more important to me than having customers belong to multiple companies).

So does anyone know how to extract the organization to which a reporter belongs to so that I can add an automation to put the result of the query into a custom field which can be used as a column in my issue search results?

5 answers

2 accepted

0 votes
Answer accepted

Hi Pete,

Yes, it seems to be a missing feature.

I did find this:  JSDSERVER-4903

Which I think is the crux of the problem....

Susan

Well spotted - good to see I am not alone :)

0 votes
Answer accepted

I have discovered a work-around using an add-on.

Since we do not allow public sign-up, all customers (individual contacts) are added manually which means that we can ensure that a "property" is added to each customer called "company".

Using the add-on "Workflow Powerbox", I can add a post-function to a workflow transition which will copy the property belonging to the reporter, into a custom field belonging to the issue.  The post-fuinction enabled by the add-on is "Set Issue Field Value From User Property".  I add this post-function to the "create" transition so that the issue field is set whenever a new issue is created.

0 votes

Hi,

Via jql, I'm not sure this is possible.  You can use this jql "reporter in organizationMembers("")" to find out all the users who are members of specified organizations, but that still isn't giving you quite what you want.

Otherwise the Customers view by project does show open and closed by Organization. 

Hope that helps

Susan

Hi Susan,

Thanks for your suggestions - I was already aware of "report in organizationMembers()" but that is the inverse of what I want.

The "customers view" shows that Jira is able to extract the information itself, but it seems that Atlassian has not opened up this capability in JQL.

Maybe I will need to request an enhancement to Atlassian as IMHO this is basic functionality needed by companies using JSD as a business-to-business support portal.

Cheers,

Pete

Like Mark Hostetler likes this

I have added a custom field called 'Domain Name' and every time a ticket is opened this field is updated and anything which is xyz.com which is our domain excluded reset everything else is a customer ticket.

If you have ScriptRunner you can use some variation of this:

 

import com.atlassian.servicedesk.api.organization.OrganizationsQuery
//import com.atlassian.jira.user.ApplicationUser
import com.atlassian.servicedesk.api.organization.OrganizationService import com.atlassian.jira.component.ComponentAccessor import com.onresolve.scriptrunner.runner.customisers.PluginModule @PluginModule OrganizationService organizationService def user = ComponentAccessor.getUserManager().getUserByName("someuser") OrganizationsQuery organizationsQuery = organizationService.newOrganizationsQueryBuilder().build() organizationService.getOrganizations(user, organizationsQuery).getResults()

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

New Cloud Apps Roundup - Spring 2021

Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...

129 views 3 15
Read article

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