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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
i used this script , it's working fine but i want to extract id or name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nairi salma you can use Stream API to map the returnted list to a list of organization names (or ids).
organizationService.getOrganizations(user, organizationsQuery).getResults().stream().map((org)->org.getName()).toList()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.