View Issue Details

IDProjectCategoryView StatusLast Update
0027160mantisbtuipublic2021-03-07 18:29
ReporterTomekAP Assigned Toatrol  
Status closedResolutionfixed 
Product Version2.24.2 
Target Version2.25.0Fixed in Version2.25.0 
Summary0027160: Wrong page position after bugnote add/edit

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>).
Can you make in this way, that after adding/editing a bugnote you go to this particular bugnote (view.php?id=<bug_id>#c<bugnote_id>)?

TagsNo tags attached.


related to 0021675 assignedsyncguru Incorrect positioning of "View Issue Details" when recalled from "Direct link to note" 




2020-08-23 05:37

developer   ~0064284

Can you make in this way, that after adding/editing a bugnote you go to this particular bugnote

Created PR for editing

Not sure if it makes sense to do the same for adding.
One of my typical workflows is to change the status or to assign a developer after adding a comment.
For such cases I would prefer to keep it as it is.



2020-08-23 05:53

reporter   ~0064286

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.



2020-08-23 07:19

developer   ~0064287

Last edited: 2020-08-23 07:30

The mentioned workflow is to step through a list of issues generated from View Issues page and discuss it with team members.
The easiest way for that is to use to the arrow buttons at the right top of the issue page view.php.
Sometimes nothing has to be changed, sometimes just someone is assigned, sometimes a note is added, ...
The edit functionality bug_update_page.php is not used that often in this workflow.

I implemented your proposal in my local code to try it.
For the mentioned workflow it would mean that I have to scroll to top after editing a note to be able to push the arrow button.
Maybe time to implement some keyboard shortcuts in Mantis (e.g. Ctrl+N: Goto next issues, Ctrl+P: Goto previous issue, ...), but that's another story.

As a side note, there is still 0021675 open, which confuses users when using note links.

Also feedback from other devs welcome.



2020-08-24 06:15

developer   ~0064290

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.



2020-08-25 16:00

developer   ~0064291

@TomekAP based on other devs feedback I changed just for note editing,
See attached patch if you want to maintain your own branch where note adding is also changed.

redirect-after-addnote.patch (783 bytes)   
From e2d40b7810b6b06af8f87be2dfd38c55c153bc90 Mon Sep 17 00:00:00 2001
From: Roland Becker <>
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_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 ) );

Related Changesets

MantisBT: master f89bb090

2020-08-23 05:29:20


Details Diff
Redirect to note after editing a note

Fixes 0027160
Affected Issues
mod - bugnote_update.php Diff File