Threads and loops in jira script

Michael Sordo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 26, 2023

Hello, I have a script that runs when a JIRA button is pressed. I wanted to use threads to optimize the script but it gives me problems if I put in the threads the JQLs queries and loops, is there any problem with that? What alternative do we have to use threads?

Thank you very much

Example:


Thread.start{
    def historicalCommitmentSP = []
    resultsSPStartSprint.results.each { result ->
        def issueStartSprint = issueManager.getIssueObject(result.id)
        spStartSprint = (issueStartSprint.getCustomFieldValue(puntosHistoria) ?: 0) as double
}

1 answer

0 votes
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 26, 2023

Hey @Michael Sordo ,

Welcome to the Atlassian Community.
This sounds like you're doing custom development with Jira, which is awesome, but might be more the territory of the Atlassian Developer community: https://community.developer.atlassian.com

This community is focused on helping people who are using the Atlassian tools, not necessarily extending them with functionality.

Cheers,
Peter

Michael Sordo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 26, 2023

Hi Peter, thank you very much for your help and information.

Cheers,
Michael Sordo

Suggest an answer

Log in or Sign up to answer