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

I have a groovy script where new updates of the methods is not corresponding


I did updates in java library and now the script displays errors in the lines 50/53/54

# def results =, user, PagerFilter.getUnlimitedFilter())

# for (def issue : results.getIssue()){

1 answer

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.jql.parser.JqlQueryParser
import com.atlassian.jira.web.bean.PagerFilter
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
// FUNCTION: CÁLCULO DE LAS HORAS LINEALES /////////////////////////////////
def calculoHorasLinealesQ1(Issue issue){
def cfManager = ComponentAccessor.getCustomFieldManager();
def horas= cfManager.getCustomFieldObject(16135); //'Horas lineales 2020-Q1'
def estimacionesFieldIds=[
'Estimación Loyalty 2020-Q1':16125,
'Estimación MCR 2020-Q1':16126,
'Estimación Campañas 2020-Q1':17409,
'Estimación iBlue 2020-Q1':16133,
'Estimación Salesforce 2020-Q1':16129,
'Estimación Voz 2020-Q1':16132,
'Estimación APP 2020-Q1':16117,
'Estimación Assistant 2020-Q1':16118,
'Estimación Booking Engine 2020-Q1':16119,
'Estimación Channel Manager 2020-Q1':16121,
'Estimación 2020-Q1':16127,
'Estimación Extranet & Switch 2020-Q1':16123,
'Estimación RMS 2020-Q1':16128,
'Estimación Sirius 2020-Q1':16131,
'Estimación Servicios y Pasarela & Message Broker 2020-Q1':16130,
'Estimación Customer Intelligence & ETL 2020-Q1':16122,
'Estimación Focus 2020-Q1':16124
if(horas != null && estimacionesFieldIds != null){
double hl = 0;
for (def id: estimacionesFieldIds.values()){
def estimacion = cfManager.getCustomFieldObject(id)?.getValue(issue);
if(estimacion != null) hl += (double) estimacion;
def changeHolder = new DefaultIssueChangeHolder()
log.warn(issue.key + "|" + hl);
horas.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(horas), hl),changeHolder); // Actualizar el campo de horas lineales con el valor de 'hl'
// JQL QUERY ///////////////////////////////////////////////////////////////
def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser)
def SearchService = ComponentAccessor.getComponent(SearchService)
def issueManager = ComponentAccessor.getIssueManager()
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
// edit this query to suit
def query = jqlQueryParser.parseQuery("issuetype = Épica AND category = 'BUSINESS DEVELOPMENT TECHNOLOGIES'")
def results =, user, PagerFilter.getUnlimitedFilter())
// ACCIONES SOBRE LAS ÉPICAS BDT ////////////////////////////////////////////
for (def issue : results.getIssue()){

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events