@ Override public DataResponse < List < Feature > > getCurrentSprintDetail ( ObjectId componentId , String teamId , String projectId , Optional < String > agileType ) { Component component = componentRepository . findOne ( componentId ) ; if ( ( component == null ) || CollectionUtils . isEmpty ( component . getCollectorItems ( ) ) || CollectionUtils . isEmpty ( component . getCollectorItems ( ) . get ( CollectorType . AgileTool ) ) || ( component . getCollectorItems ( ) . get ( CollectorType . AgileTool ) . get ( 0 ) == null ) ) { return getEmptyLegacyDataResponse ( ) ; } CollectorItem item = component . getCollectorItems ( ) . get ( CollectorType . AgileTool ) . get ( 0 ) ; // Get teamId first from available collector item, based on component List < Feature > sprintResponse = getFeaturesForCurrentSprints ( teamId , projectId , item . getCollectorId ( ) , agileType . isPresent ( ) ? agileType . get ( ) : null , true ) ; Collector collector = collectorRepository . findOne ( item . getCollectorId ( ) ) ; return new DataResponse <> ( sprintResponse , collector . getLastExecuted ( ) ) ; }
Retrieves the current sprint s detail for a given team .