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

Jira smart value for a customer's organization

Sam Osborne December 18, 2023

I have customers and their email addresses assigned to different organizations. The customers submit tickets via the request portal.

I'm trying to create an automation rule that, upon creation of a new issue (i.e. submission of a new request ticket), populates a custom field on the issue named "Requester org" with the organization that is associated with the requester.

The custom "Requester org" field is a "Short text" field and is added to the proper field configuration and screens. 

My automation rule is as follows: When an issue is created THEN edit the issue field "Requester org" to this value: {{issue.reporter.customer?.organization?.name}}.

The "Requester org" field still appears blank as I test this with customers. Is my Jira expression to fetch the requester's org incorrect?

2 answers

0 votes
Marc Koppelaar - Devoteam
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.
December 19, 2023

Hi @Sam Osborne 

I looked at your request and the replies already on this.

The issue is that when having an automation on creation, the information to use an edit action is not available yet.

Can you add another action between the creation trigger and the edit action, use the action Re-fetch issue data.

This action lets the automation now that it's populating the rule cache with all the data in the issue after creation.

This should now set the field "Requestor Org"

Sam Osborne January 8, 2024

Hey thanks for the response. I tried your suggestion, but it unfortunately did not work either. Here is my automation rule (I'm testing multiple jira smart values):

b;ah.png

Upon submitting a ticket with 'share with: no one' selected, as so:

blah1sdf.png

the ticket still appears without the Requester Org field populated:
sdfsdfdf.png

 

I'm beginning to think this is an issue with the smart value itself. Or the Organization entity is not even available when 'no one' selected.

For what it's worth, I tried {{reporter.emailAddress}} and the email address populated successfully. {{reporter.Organizations}} did not, however.

Marc Koppelaar - Devoteam
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 9, 2024

Hi @Sam Osborne and @Stanley Duback 

I think I know why the field stays blank.

As @Sam Osborne mentions that the Organizations ootb field is only populated when the issue is shared with an Organization, than if not shared the field is empty.

I have seen this mentioned before:

"If a customer who belongs to an organization creates a ticket via the portal, their organization will be added to the ticket unless they are members of more than on organization, then it will be a private request (Organization is null)."

I haven't seen or been able to find a solution for this

Sam Osborne January 24, 2024

Thank you. The submitter's email address does come through, however. So I'm working through pulling their organization using that.

0 votes
Stanley Duback
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.
December 18, 2023

The field for "Organizations" already automatically populates the organization of the reporter when the issue is created, is there a specific reason why you would need a different custom field that provides the same functionality? and if so did you already try fetching issue.organizations 

Sam Osborne December 18, 2023

Thanks for the answer. It's my understanding that the Organizations field populates with the reporter's organization ONLY when the reporter selects their organization from the "Share with" drop down field that appears when they're filing a request ticket. If they select Share with - "No one", then the Organizations field does not populate. 

This is the experience I have seen when testing. Altering this functionality so that the Organizations field always populates would of course solve my problem. Is there something I can do?

Stanley Duback
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.
December 18, 2023

Thanks for expanding on that Sam,

I just tested out a few different smart values for Issue organizations, and heres what I found

The smart value for trying to fetch data based on reporter populates blank, by trying to fetch issue org name I was successful, and just issue org gave all of the properties of the issue.

I have a user with a org called "Test org" had that user submit a ticket, then ran this automation to see if it pulled the smart value properly.

When using {{Issue.Organizations.first.name}} the smart value pulled the users org properly every time. Have you attempted automation using this smart value?

issueorg.png

automation.png

Like Natalya Ozhigova likes this
Sam Osborne December 18, 2023

This did not work unfortunately. Here's what I did:

automation rule:

Screenshot 2023-12-18 154404.png

results in queue after test submissions:

Screenshot 2023-12-18 154518.png

The Requester org custom field is still blank after running a couple tests. I am very new to Jira so might be missing something elsewhere. Thanks

Stanley Duback
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.
December 20, 2023

Hey Sam,

I am not sure why your field would be pulling blank, it would be hard to find a root cause without looking at it.

Can you try this JQL and see if it pulls up tickets for you?

reporter in organizationMembers("")

and inside the parentheses would be the name of whatever org this would help determine if those users are getting assigned to the org properly

Sam Osborne December 21, 2023

Okay I dropped this in the JQL line. It does work for different orgs, but it only filters to show closed items. Any open items from different orgs do not appear (I have 'All Issue' selected as well for what it's worth). 

Since the tickets I was testing with are still open, they do not appear when I drop their associated org into the parenthesis.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events