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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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 do you get the values from a Database Picker scripted field

I have a Database Picker scripted field which pulls data from a database. The .value field shows the ID numbers. These ID numbers are used for an additional database query.

I need to show the text of of the Database Picker scripted field in a Post function email.

How do I get the text values?

1 answer

1 accepted

1 vote
Answer accepted

hi @Jon Kocen , can you provide more information? What App is used? What is the script you use (if any), etc...

I am using JIRA Server and the Database PIcker field from ScriptRunner

Set per the instructions and added the field to a screen. The database picker populates from the database and works great.

The query pulls 2 fields, ID, Name. It displays the Name field

In a workflow Post function I want to send a custom email and display the values of the Name field. However in the Post function when is use cfValues['myfield'] it displays the ID numbers as [23,4,99]

I want to display the Name field in the custom email Post function

Hi @Jon Kocen can you share scripts, screenshots so it is easier for me to help?

1) set up Database picker field called System, pulls data from database

2) Show on screen - type ahead field, allows user to select multiple items in list

3) output in Custom email in a Post Function - in Post function custom email

4) preview output, I want to display the text value - system not the ID value

I am not sure how the field knows to display the text vs. the ID, it just does it automatically

 

Database Picker field

1.PNG

Displays data in a multi-type select

2.PNG

Post function custom email to display the System selections

3.PNG

 

Preview of the custom email - shows IDs not the text displayed in the System field

4.PNG

Thank you for detail info... but unfortunatelly there is no simple way to do it. There is existing bug (https://productsupport.adaptavist.com/browse/SRJIRA-4496) which mentions the same as you do.

There is workarount but I'm not sure, it will work in email template :(

Thanks for the info, at least I know I am not going crazy :-) 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS

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