Forums

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

Using Automation to take custom field value and add it to another customer field values context

Adam Taylor December 30, 2022

Hi,

I want to be able to automate the population of a custom field within out Jira instance. Customer names are stored within a custom field call clients as a drop down however as part of the onboarding proces we have another customer field which is just a text field called New Customer Name. If that New Customer Name field doesn't match anything in the Clients list then i would like it to be add to the selectable contexts list so it can be selected in the future.

not sure if this is possible so any advice would be great.

3 answers

1 vote
Trudy Claspill
Community Champion
December 30, 2022

Hello @Adam Taylor 

I think the only way you might be able to do this with an Automation Rule would be by using the Send Web Request action to call the JIRA REST API for updating field context.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-contexts/

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Send-web-request

The API requires the Field ID, so you would have to get that also as part of your automation, or find it in advance and plug in the explicit value.

0 votes
Joseph Chung Yin
Community Champion
December 30, 2022

@Adam Taylor -

I agreed with what @Trudy Claspill suggested using REST APIs to adjust the custom field's dropdown content options in conjunction with Automation rule setup.

However there is one problem I can see in your current fields designs/usage - Your "New Customer Name" is a field of text data type, thus there is no nomenclature control or formatting that you can apply to the entered value.  This makes difficult when you are using it to determine if new dropdown content options should be created.

Hope this makes sense.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

0 votes
Cathi Davey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 30, 2022

Hello,

Are you using Assets for these lists of clients? 

https://www.atlassian.com/software/jira/service-management/features/asset-and-configuration-management 

If so, I have a similar onboarding use case where the form includes a simple text field for the new employee Name (I use the Summary field for this).

An automation rule uses a lookup to see if it exists in the People schema (Query: Name = "{{issue.Summary}}")

  • If {{lookupObjects}} is empty (meaning they aren't already in the system) then we create the new People object for them which can be used in subsequent requests.
  • If it's found, then we flag up or alter their onboarding process (e.g. re-hire)

If you skip to ~minute 9 of this, you can see what I mean: https://www.loom.com/share/db387636c4ba47a58de59d86a472a7f1 

Suggest an answer

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

Atlassian Community Events