summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-10-18 20:14:26 -0400
committerMalfurious <m@lfurio.us>2021-10-18 20:14:26 -0400
commita2f522583ef35e009f1f0be7086fc511d52c2b36 (patch)
tree2a1c1d14f5d92ab56df8bb9049b77a48b5b43c5b
parentd74fcf9e8bfb15158fce16a9920ce638f4c675cf (diff)
downloadscrott-a2f522583ef35e009f1f0be7086fc511d52c2b36.tar.gz
scrott-a2f522583ef35e009f1f0be7086fc511d52c2b36.zip
Keep issue modal open after closing an issue
For consistency reasons, I've decided to keep the issue UI open even after just closing an issue. That is assuming the user used the modal window to perform the close. If an issue is closed via the quick control buttons in the pad view page, no window is spawned since none was open to begin with. Other edge-cases that would interrupt the return of the issue modal have also been removed. For example, an informational message is no longer produced when an attachment is successfully uploaded, and users are no longer notified that an action resulted in an issue being closed. Signed-off-by: Malfurious <m@lfurio.us>
-rw-r--r--app/model/issue.php6
-rw-r--r--app/model/pad.php5
2 files changed, 8 insertions, 3 deletions
diff --git a/app/model/issue.php b/app/model/issue.php
index 3f7b620..41392e8 100644
--- a/app/model/issue.php
+++ b/app/model/issue.php
@@ -49,7 +49,9 @@ if (isAction("iss-mesg-add"))
$mesg = mesg::initNew($form->mesg, $user, $issue);
if ($mesg->setAttachment("attachment"))
- logError(NOTICE, "Saved attachment " . $mesg->attachment);
+ {
+ //logError(NOTICE, "Saved attachment " . $mesg->attachment);
+ }
}
if (isset(input()['advIssue']))
@@ -70,7 +72,6 @@ if (isAction("iss-mesg-add"))
else
{
$issue->signoffAssignee($user);
- logError(NOTICE, "Issue #" . $issue->numb . " closed");
$log = mesg::initNewLog("%s closed issue", $user, $issue);
}
}
@@ -102,7 +103,6 @@ if (isAction("iss-mesg-add"))
$issue->signoffAssignee($user);
$issue->close($user);
- logError(NOTICE, "Issue #" . $issue->numb . " closed");
$log = mesg::initNewLog("%s closed issue", $user, $issue);
}
diff --git a/app/model/pad.php b/app/model/pad.php
index e11a644..69f58e2 100644
--- a/app/model/pad.php
+++ b/app/model/pad.php
@@ -41,6 +41,11 @@ foreach ($stages as $s)
$issues = array_merge($issues, $i);
}
+/* this will include a 'just closed' issue on the main pad page, enabling it
+ * to be displayed via auto-modal */
+if (isset($_REQUEST['input']['issue']))
+ $issues[] = new issue($_REQUEST['input']['issue']);
+
$closed_issues = $pad->getClosedIssues_ordByClosed();
?>