Skip to content

Commit 9e43897

Browse files
authored
fix: resolve a core periodic minute interval bug (baserow#4912)
* Resolved a bug which caused the periodic trigger to reset its minute value if the interval was set to minute * Lint tweak
1 parent e23e945 commit 9e43897

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "bug",
3+
"message": "Resolved a bug which caused the periodic trigger to reset its minute value if the interval was set to minute.",
4+
"issue_origin": "github",
5+
"issue_number": null,
6+
"domain": "automation",
7+
"bullet_points": [],
8+
"created_at": "2026-03-04"
9+
}

web-frontend/modules/integrations/core/components/services/CorePeriodicServiceForm.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export default {
157157
day_of_week: 0, // Monday=0..Sunday=6 (LOCAL)
158158
day_of_month: 1, // 1..31 (LOCAL)
159159
},
160+
syncedFromValues: false, // Have we synced these from `values` yet?
160161
}
161162
},
162163
computed: {
@@ -259,23 +260,26 @@ export default {
259260
'user.day_of_week': 'syncValuesFromUser',
260261
'user.day_of_month': 'syncValuesFromUser',
261262
'values.interval'(newInterval, oldInterval) {
262-
// When we change *to* MINUTE, we default to the minimum frequency
263-
// that is granted to this Baserow instance type.
264-
// When we change *from* MINUTE, reset minute to 0.
265263
if (
266-
this.user.minute === 0 &&
264+
this.syncedFromValues &&
267265
newInterval === 'MINUTE' &&
268266
oldInterval !== 'MINUTE'
269267
) {
268+
// Once `syncedFromValues` is true (which happens after the initial sync in
269+
// mounted()), if the user changes the interval *to* MINUTE, we want to set the
270+
// minute field to the minimum allowed frequency for this Baserow instance type.
270271
this.user.minute = this.minimumMinuteFrequency
271272
} else if (newInterval !== 'MINUTE' && oldInterval === 'MINUTE') {
273+
// Otherwise if we're changing *from* MINUTE, then reset the `minute` to 0.
272274
this.user.minute = 0
273275
}
274276
this.syncValuesFromUser()
275277
},
276278
},
277279
mounted() {
278280
this.syncUserFromValues()
281+
// We've fully synced the user facing values.
282+
this.syncedFromValues = true
279283
},
280284
methods: {
281285
fieldHasErrors(name) {

0 commit comments

Comments
 (0)