Skip to content

Commit 5466ff9

Browse files
authored
Merge pull request #6445 from Countly/av-log
Update app version log and generator
2 parents 34069bf + 6b81cb8 commit 5466ff9

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Fixes:
55
- [crashes] Fix free session and free user calculation
66
- [dashboards] Delete associated widgets and reports when a dashboard is removed
77
- [star-rating] Fix widget close post message
8+
- [core] Adjust level and update content of app version log
9+
- [populator] Update getVersion to generate valid semantic version
810

911
Enterprise Fixes:
1012
- [crash_symbolication] Remove auto symbolication setting

api/parts/data/usage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ plugins.register("/sdk/user_properties", async function(ob) {
11211121
userProps.av_build = versionComponents.build;
11221122
}
11231123
else {
1124-
log.w("Invalid app version format: %s", params.qstring.metrics._app_version);
1124+
log.d("App version %s is not a valid semantic version. It cannot be separated into semantic version parts", params.qstring.metrics._app_version);
11251125
userProps.av_major = null;
11261126
userProps.av_minor = null;
11271127
userProps.av_patch = null;

plugins/populator/frontend/public/javascripts/countly.models.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,13 @@
337337
d = moment(seed);
338338
}
339339
}
340-
var year = trimYear ? d.format('YY')[1] : d.format('YY');
340+
341+
var year = d.format('YY');
342+
if (trimYear || year[0] === '0') {
343+
year = d.format('YY')[1];
344+
}
341345
var day = parseInt(d.format('DD')[0], 10) === 3 ? 2 : d.format('DD')[0];
342-
return year + "." + d.format('MM') + "." + day;
346+
return year + '.' + d.format('M') + '.' + day;
343347
}
344348
/**
345349
*
@@ -2944,4 +2948,4 @@
29442948
};
29452949

29462950
countlyPopulator.defaultTemplates = defaultTemplates;
2947-
}(window.countlyPopulator = window.countlyPopulator || {}));
2951+
}(window.countlyPopulator = window.countlyPopulator || {}));

0 commit comments

Comments
 (0)