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?
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.
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
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.
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()
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...
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