Flyspray - The bug killer!

  • Status Confirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category User Interface
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Low
  • Reported Version 1.0 devel (github master)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Flyspray - The bug killer!
Opened by Ted Hess - 08.06.2016
Last edited by peterdd - 23.07.2016

FS#2136 - After updating user properties as admin - return to wrong screen

Logged in as admin, modify a users group membership. After clicking update, you are returned to your logged-in profile (admin in this case). It should re-display the user’s profile you are editing.

The ‘back’ button will return to updated page.

Project Manager
peterdd commented on 10.06.2016 00:25

Ah, thats because actions ‘admin.edituser’ and ‘myprofile.edituser’ share the same switch/case code in includes/modify.inc.php :

case 'admin.edituser':
case 'myprofile.edituser':
# action handling ..
..
break;

and forgot to redirect to the best fitting page after it.

So we either split that code sharing - or replace the redirection at the end of the action handling with soemthing like

#Flyspray::Redirect(CreateURL('myprofile'));
        if ($action === 'myprofile.edituser'){
                Flyspray::Redirect(CreateURL('myprofile'));
        } elseif($action === 'admin.edituser' && Post::val('area') === 'users'){
                Flyspray::Redirect(CreateURL('admin', Post::val('user_id')));
        } else {
                Flyspray::Redirect(CreateURL('user', Post::val('user_id')));
        }

?
(untested, not finished, just as an idea)

Ted Hess commented on 10.06.2016 17:00

Gives error: #6 invalid admin area. I think the 2nd redirect (elseif) should read:

Flyspray::Redirect(CreateURL('edituser', Post::val('user_id')));
Project Manager
peterdd commented on 23.07.2016 07:04

Well, this is not nicest solution, but thats how the former devs invented that form...:

We must also pass the project_id around within the form (because it will be used to fill the $proj object in header.php we use later.

So to stay on the current project, the redirect url is like

/user/123?project=4

after switching project on a user page:
/user/123 ('all projects'-mode)

Then select project 4:
/index.php?project=4&do=user&id=123

Change group of user in project 4
and Redirect to /user/123?project=4

And we must also check that only legal group_id's of the same project can be set!

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing