Skip to content

Commit

Permalink
FOPTS-5505 Fixed consumption calculation for ITAM Overused Licenses.
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusParada committed Nov 12, 2024
1 parent 85fd4d2 commit 07f2f99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions compliance/flexera/fnms/overused_licenses/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v2.4.2

- Fixed issue with consumption percentage calculation.

## v2.4.1

- Minor code improvements to conform with current standards. Functionality unchanged.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ severity "medium"
category "Compliance"
default_frequency "daily"
info(
version: "2.4.1",
version: "2.4.2",
provider: "Flexera",
service: "IT Asset Management",
policy_set: "IT Asset Management"
Expand Down Expand Up @@ -96,8 +96,8 @@ script "js_licenses", type: "javascript" do
extra = le['extra']
consumed = le['consumed']
if (available + extra != 0) {
consumption = (consumed / (available + extra)) * 100
if (available + extra + consumed != 0) {
consumption = (consumed / (available + extra + consumed)) * 100
} else {
if (consumed == 0) {
consumption = 0
Expand Down

0 comments on commit 07f2f99

Please sign in to comment.