Revize 9144b20e
Přidáno uživatelem Ondřej Váně před asi 4 roky(ů)
src/main/java/cz/zcu/fav/kiv/antipatterndetectionapp/detecting/detectors/VaryingSprintLengthDetectorImpl.java | ||
---|---|---|
47 | 47 |
|
48 | 48 |
/** |
49 | 49 |
* Postup detekce: |
50 |
* 1) najít všechny iterace pro danný projekt seřazené dle start date
|
|
50 |
* 1) najít všechny iterace pro danný projekt seřazené dle name (start date má divné hodnoty a nejdou iterace po sobě)
|
|
51 | 51 |
* 2) odebrání první a poslední iterace z důvodu možných výkyvů |
52 | 52 |
* 3) zjistit jejich délku (rozdíl mezi start date a end date) |
53 | 53 |
* 4) vždy porovnat dvě po sobě jdoucí iterace |
src/main/resources/queries/too_long_sprint.sql | ||
---|---|---|
19 | 19 |
/* Exclude first and last iteration? */ |
20 | 20 |
set @excludeFirstAndLastIteration = false; |
21 | 21 |
/* Id of first iteration */ |
22 |
set @idOfFirstIteration = (select id from iteration where iteration.superProjectId = @projectId order by startDate limit 1);
|
|
22 |
set @idOfFirstIteration = (select id from iteration where iteration.superProjectId = @projectId order by name limit 1);
|
|
23 | 23 |
/* Id of last iteration */ |
24 |
set @idOfLastIteration = (select id from iteration where iteration.superProjectId = @projectId order by startDate desc limit 1);
|
|
24 |
set @idOfLastIteration = (select id from iteration where iteration.superProjectId = @projectId order by name desc limit 1);
|
|
25 | 25 |
/* Select all too long iterations */ |
26 |
select datediff(iteration.endDate, iteration.startDate) as `iterationLength`, if(datediff(iteration.endDate, iteration.startDate) > @maxSprintLength, true, false) as `isTooLongSprint`, iteration.startDate as `iterationStartDate` from iteration where iteration.superProjectId = @projectId and iteration.id != if(@excludeFirstAndLastIteration = true, @idOfFirstIteration, -1) and iteration.id != if(@excludeFirstAndLastIteration = true, @idOfLastIteration, -1) order by iteration.startDate; |
|
26 |
select datediff(iteration.endDate, iteration.startDate) as `iterationLength`, if(datediff(iteration.endDate, iteration.startDate) > @maxSprintLength, true, false) as `isTooLongSprint`, iteration.startDate as `iterationStartDate` from iteration where iteration.superProjectId = @projectId and iteration.id != if(@excludeFirstAndLastIteration = true, @idOfFirstIteration, -1) and iteration.id != if(@excludeFirstAndLastIteration = true, @idOfLastIteration, -1) order by iteration.name; |
src/main/resources/queries/varying_sprint_length.sql | ||
---|---|---|
20 | 20 |
/* Exclude first and last iteration? */ |
21 | 21 |
set @excludeFirstAndLastIteration = true; |
22 | 22 |
/* Id of first iteration */ |
23 |
set @idOfFirstIteration = (select id from iteration where iteration.superProjectId = @projectId order by startDate limit 1);
|
|
23 |
set @idOfFirstIteration = (select id from iteration where iteration.superProjectId = @projectId order by name limit 1);
|
|
24 | 24 |
/* Id of last iteration */ |
25 |
set @idOfLastIteration = (select id from iteration where iteration.superProjectId = @projectId order by startDate desc limit 1);
|
|
25 |
set @idOfLastIteration = (select id from iteration where iteration.superProjectId = @projectId order by name desc limit 1);
|
|
26 | 26 |
/* Select all iterations with their length */ |
27 |
select datediff(endDate, startDate) as `iterationLength` from iteration where iteration.superProjectId = @projectId and iteration.id != if(@excludeFirstAndLastIteration = true, @idOfFirstIteration, -1) and iteration.id != if(@excludeFirstAndLastIteration = true, @idOfLastIteration, -1) order by iteration.startDate;
|
|
27 |
select datediff(endDate, startDate) as `iterationLength` from iteration where iteration.superProjectId = @projectId and iteration.id != if(@excludeFirstAndLastIteration = true, @idOfFirstIteration, -1) and iteration.id != if(@excludeFirstAndLastIteration = true, @idOfLastIteration, -1) order by iteration.name;
|
|
28 | 28 |
|
Také k dispozici: Unified diff
Change sorting iteration from start date to name