From 68d0262464933a158e31f76fd927b72b19fdf497 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Mon, 18 Oct 2021 18:25:53 -0400 Subject: Add additional info / controls to issueListItem The list of assignees, the owner (opener), and quick controls for advancing or closing an issue are now available in the issue listing for pad stages (or the closed issue list, which is missing the new control buttons). If using the quick control buttons to manipulate an issue, the issue modal is not called-up on the page reload. Signed-off-by: Malfurious --- app/model/issue.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/model') diff --git a/app/model/issue.php b/app/model/issue.php index dd904e4..3f7b620 100644 --- a/app/model/issue.php +++ b/app/model/issue.php @@ -25,6 +25,7 @@ if (isAction("iss-mesg-add")) $form->text("issue"); $form->text("mesg", false); $form->text("assignee"); + $form->flag("nopop"); if (!$form->populate(input())) return; @@ -106,7 +107,8 @@ if (isAction("iss-mesg-add")) } /* automatically redisplay issue modal */ - setAutoModal("#issueModal-" . $issue->guid); + if ($form->nopop != "1") + setAutoModal("#issueModal-" . $issue->guid); } ?> -- cgit v1.2.3 From d74fcf9e8bfb15158fce16a9920ce638f4c675cf Mon Sep 17 00:00:00 2001 From: Malfurious Date: Mon, 18 Oct 2021 19:42:58 -0400 Subject: Automatically call-up issue modal for newly-opened issues This patch will cause the interface for new issues to be immediately visible after page load on opening a new issue, as it is likely the user may wish to perform some action on it. This patch also fixes a bug which has previously prevented this from being the default behavior. The pad view's script imports have been reordered such that all issue state manipulation is done and pushed to the DB before any of the pad view page content is rendered. This prevents situations where the page would often load in a broken state (the reason for the previous 'location()' call - to force a reload), and enables us to use the new issue as the autoModal window as this patch does. Signed-off-by: Malfurious --- app/model/datamods.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/model') diff --git a/app/model/datamods.php b/app/model/datamods.php index 0b7f3da..b3384a7 100644 --- a/app/model/datamods.php +++ b/app/model/datamods.php @@ -114,7 +114,7 @@ if (isAction("dm-issue-add")) $issue = issue::initNew($mesg, $user, $stages[0]); $log = mesg::initNewLog("%s opened issue", $user, $issue); - location(); // bug mitigation + setAutoModal("#issueModal-" . $issue->guid); } ?> -- cgit v1.2.3 From a2f522583ef35e009f1f0be7086fc511d52c2b36 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Mon, 18 Oct 2021 20:14:26 -0400 Subject: 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 --- app/model/issue.php | 6 +++--- app/model/pad.php | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'app/model') 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(); ?> -- cgit v1.2.3