@harborppm/cli 0.116.0 → 0.117.0

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.
Files changed (2) hide show
  1. package/dist/app.mjs +23 -4
  2. package/package.json +1 -1
package/dist/app.mjs CHANGED
@@ -12395,11 +12395,14 @@ function sourceLine(external) {
12395
12395
  /**
12396
12396
  * The fields Harbor may not change on this task: none for Harbor's own tasks
12397
12397
  * and for ones gone from the other tool. Jira owns priority and subtask
12398
- * parents; Asana owns the start day instead.
12398
+ * parents. Asana owns the start day instead, on the tasks it gives one
12399
+ * (`external.start`, set by the read); a task Asana gives none keeps the
12400
+ * start day it has in Harbor, and that one is changed here.
12399
12401
  */
12400
12402
  function lockedFields(t) {
12401
12403
  if (!isExternal(t)) return NONE$1;
12402
- return t.external.from === "asana" ? ASANA_LOCKED : JIRA_LOCKED;
12404
+ if (t.external.from !== "asana") return JIRA_LOCKED;
12405
+ return t.external.start ? ASANA_LOCKED : ASANA_LOCKED_NO_START;
12403
12406
  }
12404
12407
  /** `patch` without the fields the other tool owns; the same object when it held none. */
12405
12408
  function withoutLocked(t, patch) {
@@ -12432,7 +12435,7 @@ function externalDeleteRefusal(t) {
12432
12435
  const tool = sourceLabel(ext.from);
12433
12436
  return `“${t.title}” is kept in step from ${tool}${ext.key ? ` (${ext.key})` : ""}. Remove it there, or unlink the project; Harbor follows.`;
12434
12437
  }
12435
- var SOURCE_LABEL, sourceLabel, isExternal, JIRA_LOCKED, ASANA_LOCKED, NONE$1, FIELD_WORD, sameValue;
12438
+ var SOURCE_LABEL, sourceLabel, isExternal, JIRA_LOCKED, ASANA_LOCKED, ASANA_LOCKED_NO_START, NONE$1, FIELD_WORD, sameValue;
12436
12439
  var init_rollup_lock = __esmMin((() => {
12437
12440
  SOURCE_LABEL = {
12438
12441
  jira: "Jira",
@@ -12463,6 +12466,7 @@ var init_rollup_lock = __esmMin((() => {
12463
12466
  "approval",
12464
12467
  "repeat"
12465
12468
  ];
12469
+ ASANA_LOCKED_NO_START = ASANA_LOCKED.filter((k) => k !== "startDate");
12466
12470
  NONE$1 = Object.freeze([]);
12467
12471
  FIELD_WORD = {
12468
12472
  title: "title",
@@ -12488,13 +12492,28 @@ function moveTask(store, go, task, status) {
12488
12492
  const refusal = externalRefusal(task, { status });
12489
12493
  if (refusal) return go.notify(refusal);
12490
12494
  const overflow = columnWip(s, task.projectId, status, 1);
12491
- if (!overflow) return s.moveTask(task.id, status);
12495
+ if (!overflow) {
12496
+ s.moveTask(task.id, status);
12497
+ return saidDone(store, go, task, status);
12498
+ }
12492
12499
  if (s.myRole !== "owner") return go.notify(wipFullMessage(overflow));
12493
12500
  go.confirm(`${wipFullMessage(overflow)} Raise its limit by one and move it?`, () => {
12494
12501
  store.getState().raiseColumnCap(task.projectId, status);
12495
12502
  store.getState().moveTask(task.id, status);
12503
+ saidDone(store, go, task, status);
12496
12504
  }, "Raise the limit");
12497
12505
  }
12506
+ /**
12507
+ * Finishing takes the task off Today and most lists, so say which one went
12508
+ * and how to bring it back. Not when the store held it back (it still waits
12509
+ * on another task, and the store asks about that itself).
12510
+ */
12511
+ function saidDone(store, go, task, status) {
12512
+ if (status !== "done") return;
12513
+ const s = store.getState();
12514
+ if (s.tasks.find((t) => t.id === task.id)?.status !== "done") return;
12515
+ go.notify(`${keyOf$1(s, task)} “${task.title}” done. u undoes it.`);
12516
+ }
12498
12517
  /** Whether a new task fits its column; an owner's go raises the limit first. */
12499
12518
  function roomFor(store, projectId, status) {
12500
12519
  const s = store.getState();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harborppm/cli",
3
- "version": "0.116.0",
3
+ "version": "0.117.0",
4
4
  "description": "Harbor from the terminal: a full-screen app with everything, plus commands for scripts and agents.",
5
5
  "keywords": [
6
6
  "harbor",