jettypod 4.4.71 → 4.4.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/work-tracking/index.js +11 -2
- package/package.json +1 -1
|
@@ -485,8 +485,8 @@ function printTree(items, prefix = '', isRootLevel = true, expandedIds = null) {
|
|
|
485
485
|
// Update status
|
|
486
486
|
function updateStatus(id, status) {
|
|
487
487
|
return new Promise((resolve, reject) => {
|
|
488
|
-
// First get the work item to check its parent
|
|
489
|
-
db.get('SELECT id, parent_id FROM work_items WHERE id = ?', [id], (err, item) => {
|
|
488
|
+
// First get the work item to check its type, mode, and parent
|
|
489
|
+
db.get('SELECT id, parent_id, type, mode FROM work_items WHERE id = ?', [id], (err, item) => {
|
|
490
490
|
if (err) {
|
|
491
491
|
console.error(`Error: ${err.message}`);
|
|
492
492
|
return reject(err);
|
|
@@ -497,6 +497,15 @@ function updateStatus(id, status) {
|
|
|
497
497
|
return resolve();
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
+
// Prevent marking features as done while still in speed mode
|
|
501
|
+
if (status === 'done' && item.type === 'feature' && item.mode === 'speed') {
|
|
502
|
+
console.error(`\n❌ Cannot mark feature as done - still in speed mode\n`);
|
|
503
|
+
console.error(`Feature #${id} is still in speed mode.`);
|
|
504
|
+
console.error(`Speed mode chores must complete, then stable mode must run.\n`);
|
|
505
|
+
console.error(`The feature will be marked done automatically when all modes complete.\n`);
|
|
506
|
+
process.exit(1);
|
|
507
|
+
}
|
|
508
|
+
|
|
500
509
|
// Update the status and completed_at if marking as done
|
|
501
510
|
const completedAt = status === 'done' ? new Date().toISOString() : null;
|
|
502
511
|
const sql = status === 'done'
|