View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027160 | mantisbt | ui | public | 2020-08-21 03:29 | 2021-03-07 18:29 |
Reporter | TomekAP | Assigned To | atrol | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.24.2 | ||||
Target Version | 2.25.0 | Fixed in Version | 2.25.0 | ||
Summary | 0027160: Wrong page position after bugnote add/edit | ||||
Description | After editing bugnote you go to the first bugnote (view.php?id=<bug_id>#bugnotes), but after adding a bugnote you go to the page top (view.php?id=<bug_id>). | ||||
Tags | No tags attached. | ||||
Created PR for editing https://github.com/mantisbt/mantisbt/pull/1694 Not sure if it makes sense to do the same for adding. |
|
OK, but you can edit issue and there assign to the developer and so on and also add a comment. Why make it in two steps. |
|
The mentioned workflow is to step through a list of issues generated from I implemented your proposal in my local code to try it. As a side note, there is still 0021675 open, which confuses users when using note links. Also feedback from other devs welcome. |
|
The current behavior when editing (-> #bugnotes) has always been fine for me as I sort activities in descending order (most recent on top), but I agree that when using chronological order, it would make more sense to change that and go to the edited bugnote instead. I am not so sure in the case of adding a new bugnote though, as this is a global, issue-level operation. In this context, it makes more sense IMO to return to the top of the page. |
|
@TomekAP based on other devs feedback I changed just for note editing, redirect-after-addnote.patch (783 bytes)
From e2d40b7810b6b06af8f87be2dfd38c55c153bc90 Mon Sep 17 00:00:00 2001 From: Roland Becker <roland@atrol.de> Date: Tue, 25 Aug 2020 21:48:18 +0200 Subject: [PATCH] Redirect to note after adding a note --- bugnote_add.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bugnote_add.php b/bugnote_add.php index 39b5d5248..25622535f 100644 --- a/bugnote_add.php +++ b/bugnote_add.php @@ -61,8 +61,9 @@ $t_data = array( ); $t_command = new IssueNoteAddCommand( $t_data ); -$t_command->execute(); +$t_result = $t_command->execute(); +$t_bugnote_id = $t_result['id']; form_security_purge( 'bugnote_add' ); -print_successful_redirect_to_bug( $f_bug_id ); +print_successful_redirect( string_get_bugnote_view_url( $f_bug_id, $t_bugnote_id ) ); -- 2.28.0 |
|