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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

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

JIRA Issue "update"/ Refresh via Groovy

This is for the nFeed Plugin.

 

I need to get a value from an SQL database with colums C1 and C2

I have made 2 fields, F1 and F2

F1 is a SELECT C1 from table
F2 is a SELECT C2 from where customfield(C1)=X

From the UI it works, I can select a C1 value, and F2 field is populated with C2

In groovy, I populate C1 with a value and use issueService.Update - but F2 is not populated, its just "null"

How can I populate F2 (like a "UI refresh/update") from groovy?

1 answer

As I understand it, F1 and F2 are 2 NFeed field.
F2 is set with automatically select the value when there is only 1 option.
So if you select F1, then f2 get automatically selected and so it works. 
But when you're setting F1 from scripts, it doesn't update F2 because NFeed UI javascript doesn't trigger to select the value it could have selected through the UI. 
And this is a normal behaviour as there is no UI activated for it and thus the JS can't run.

Your solution would be to run the same sql select that you have in your nfeed to set F2 when you set F1, but in your script where you do set F1. 

Triggering an Update or anything that is not using the UI won't put any value in F2.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

Share your Confluence Cloud experience for a chance to win $500!

Take our 5-minute survey to win a $500 Visa gift card! Are you currently using Confluence Cloud? We want to hear from you! Fill out this quick survey about your Confluence Cloud experience so we ...

238 views 5 13
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