fixes progress percentages always floored resulting in 1% open even if there are no open issues

Thu, 15 Oct 2020 11:42:43 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 15 Oct 2020 11:42:43 +0200
changeset 126
4148e6de0f21
parent 125
decc4c3854a1
child 127
6105ee2cceaf

fixes progress percentages always floored resulting in 1% open even if there are no open issues

src/main/java/de/uapcore/lightpit/entities/IssueSummary.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/main/java/de/uapcore/lightpit/entities/IssueSummary.java	Fri Oct 09 19:14:40 2020 +0200
     1.2 +++ b/src/main/java/de/uapcore/lightpit/entities/IssueSummary.java	Thu Oct 15 11:42:43 2020 +0200
     1.3 @@ -39,12 +39,12 @@
     1.4  
     1.5      public int getActivePercent() {
     1.6          int total = getTotal();
     1.7 -        return total > 0 ? 100*active/total : 0;
     1.8 +        return total > 0 ? Math.round(100.f*active/total) : 0;
     1.9      }
    1.10  
    1.11      public int getDonePercent() {
    1.12          int total = getTotal();
    1.13 -        return total > 0 ? 100*done/total : 100;
    1.14 +        return total > 0 ? Math.round(100.f*done/total) : 100;
    1.15      }
    1.16  
    1.17      /**

mercurial