Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically add filtered search result to custom field on issue rather than manual select

Service Desk July 20, 2022

Hi There,

I've read 100s of forum posts now and I can't get to the bottom of my issue so reaching out in hope of finding an answer.

I have an "Employee" object schema with employee linked to their jira customer and a field for their location. Only 1 location can be selected. (please note we are not using Atlassian Access).

Capture.JPG

I have a custom field setup which checks the Reporter against the User and then shows the appropriate result from the Office field.

Capture.JPG

 

When I create a new issue and select the reporter, the Office custom field is then showing the correct search result in the drop down which is great.

Capture.JPG

What I really want to achieve though is for the search result to be saved into the field without us having to manually select it each time.

 

I've been trying to automate this so that when the ticket is created it updates the Office field with the search result returned but for the life of me I cannot get it to work.

Any suggests would be appreciated.

 

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 21, 2022

Hi @Service Desk - If I'm understanding your architecture and need correctly, you could simply hide the office field from the create screen and then have it populated once the issue is created:

  • TRIGGER: Issue Created
  • ACTION: Edit Issue (Location field)
    • Name = {{issue.reporter}}
Service Desk July 24, 2022

Hi Mark,

The validate syntax button is greyed out if I type that

Capture.JPG

Also something I forgot to mention, despite the "Office" drop down showing the correct value, once I select the returned value, it seems to show me the label not the returned value.

Capture.JPG

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 25, 2022

The validate syntax button is greyed out if I type that

Correct - Automation has no way of being able to validate smart variables, but the rule will still execute.

Also something I forgot to mention, despite the "Office" drop down showing the correct value, once I select the returned value, it seems to show me the label not the returned value.

Under Object Values to display in issue view, you have it set to "Name" which is based upon your screenshot will show the name of the individual.  You would need to change this to Office.

Service Desk July 25, 2022

The automation worked! You have no idea how long I've spent on that. Thanks so much.

 

I changed Object Values to display in issue view to "Office" but it's still showing the "Name" on new tickets.

Like Mark Segall likes this
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 25, 2022

I changed Object Values to display in issue view to "Office" but it's still showing the "Name" on new tickets.

Ahh right... Yes, the label field is Name so it will display whatever is on the label field.  You can change the label to Office if that's what you prefer to see by going to Attributes, selecting the gear icon to the far right of Office and selecting Set As Label

Service Desk July 25, 2022

That would then mean that I couldn't have a field for Manager though because that would then show the Office field right?

 

Am I right in thinking, the only way around this be to have an Object Type for Office and then link all the users to the office and filter it effectively in reverse to what I've just done?

Service Desk July 25, 2022

Yep ok it's working as I wanted. Would be nice to be able to show the selected attribute on the issue rather than having to create another schema so the label is the field I want to see issue but glad it worked nonetheless

 

Thanks for your help

 

Steps:

1. created another Object type in my Employee schema called Offices with the name (label) as the offices I need to show (sydney, Brisbane etc.,)

2. Add User attribute with cardinality as unlimited

3. Assigned all required staff to the Office

4. Altered the custom field to include a filter scope of "objecttype = offices" and hey presto!

Capture.JPG

Like Mark Segall likes this
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 26, 2022

Yes - You did the right approach by breaking out office into it's own object type.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events