The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

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

Richard Bone
Contributor
July 20, 2021

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!

Rich

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

DEPLOYMENT TYPE
SERVER
VERSION
8.14.3
TAGS
AUG Leaders

Atlassian Community Events