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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to update values for a single select field using Scriptrunner custom job?

I'm looking to update the values of a single-select custom field based on data retrieved from an external database set up as a resource in Scriptrunner. I have the initial query to get the new dataset and then want to do the following:

  1. Compare the current list to the new list and:
    1. Retain values in the current list that match the new list
    2. Remove any values from the current list (customfieldoption table) that don't match the new list but only if the value in the current list hasn't been used on a ticket (no records in the customfieldvalue table)
    3. Do not update any existing values that have been used on a ticket (record in the customfieldvalue table)
    4. Append new values to the current list (insert into customfieldoption)

I'm guessing that someone has done something like this before ...

Thanks in advance for any and all assistance!


0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

672 views 2 18
Read article

Community Events

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

Events near you