Skip to content

Commit fb1321a

Browse files
author
Lionel Laské
committed
Merge branch 'pr/2117' into dev
2 parents 62794a3 + a79a77e commit fb1321a

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5353
- Chess Activity: AI crashes due to undefined variables (missing 'this' and 'flags') #2062
5454
- In Flip activity grid size not saved & robot fails to complete the game after reopen #2083
5555
- Duplicate 'width' property in actionButtons across Tangram activity #2090
56+
- Undefined titles and logging occurs without pressing Record in Measure Activity #2097
5657

5758
## [1.9.0] - 2025-03-25
5859
### Added

activities/Chart.activity/js/activity.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@ const app = new Vue({
303303
this.LZ = this.SugarJournal.LZString;
304304
if (metadata.mimetype === "text/csv") {
305305
this.isCsvFile = true;
306-
this.csvTitle = this.currentenv.activityName;
306+
this.csvTitle = metadata.title || (this.currentenv ? this.currentenv.activityName : "Chart Data.csv");
307+
this.updateActivityTitle(this.csvTitle);
307308
this.pref.chartType = "csvMode";
308309
const json = CSVParser.csvToJson(data);
309310
if (this.$refs.csvView) {

activities/Measure.activity/js/activity.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,12 @@ var app = new Vue({
858858
}
859859

860860
var vm = this;
861+
var userName = (vm.currentenv && vm.currentenv.user && vm.currentenv.user.name) ? vm.currentenv.user.name : "Unknown";
862+
var logTitle = this.SugarL10n.get("MeasureLoggingBy", { name: userName });
863+
var csvTitle = logTitle ? logTitle + ".csv" : "Measure Data.csv";
861864
var metadata = {
862865
mimetype: "text/csv",
863-
title: this.SugarL10n.get("MeasureLoggingBy", { name: vm.currentenv.user.name}) + ".csv",
866+
title: csvTitle,
864867
activity: "org.sugarlabs.ChartActivity",
865868
timestamp: new Date().getTime(),
866869
creation_time: new Date().getTime(),

0 commit comments

Comments
 (0)