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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Trigger kb search from scriptrunner

Laurens Coppens
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jun 20, 2018

We have a scriptrunner script that populates the summary field based on other custom fields, but after populating it, it should trigger the kb search.

When i start typing at the end of summary, it searches, but it doesn't search without human interaction.

Any idea how to trigger the kb search from within scriptrunner?

2 answers

Hi there,

I did something similar with scriptrunner, but i didn't find how to specially trigger a kb_search with a value.

Instead, I catch the value of a customfield (my need here) and inject it in the summary field value and then trigger the search action through 'jQuery(\"#summary\").trigger(\"paste\");' who's calling the search. I did it by injecting js in summary.helpText

/* Behaviour for composant field */
def composant=getFieldById(getFieldChanged())
def composantVal=composant.getValue()

def summary=getFieldById("summary")
def summaryVal=summary.getValue() as String

if (composantVal!=null) {
    summary.setHelpText("<script>jQuery(\"#summary\").val(\""+(String)composantVal+"\"); jQuery(\"#summary\").trigger(\"paste\");</script>")
} else {
    summary.setHelpText("<script>jQuery(\"#summary\").val(\"\"); jQuery(\"#summary\").trigger(\"paste\");</script>")

Hi Laurens,

I just finished to implement the behavior to fill summary field but i'm now facing the exact same issue than you ... trigger the kb search..

A solution would be to add js script but i can't find any documentation on the topic ... (change the js listenner on the field)

Did you found any solution ?

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events