Page 1 of 1

[solved] Redirect to table after bug creation / update?

Posted: 29 Sep 2020, 15:35
by Tagirijus
Hey there,

I am currently trying to understand how it is possible to customize MantisBT without changing core code (which I did before ... but now I wanted to do it the right way after I updated MantisBT on my local server).

Is it somehow possible to let MantisBT redirect to the "view_all_bug_page.php" after I created an issue / a bug?


Till now I changed the redirect code in the bug_update.php, IIRC. But this is - obviously - a core file.

Thanks for your help! :)

Re: Redirect to table after bug creation / update?

Posted: 30 Sep 2020, 07:35
by cas
I assume you adjusted bug_report.php since that is used to handle new issues.
Currently there is no alternative for what you ask :mrgreen:

Re: Redirect to table after bug creation / update?

Posted: 30 Sep 2020, 08:33
by Tagirijus
cas wrote: 30 Sep 2020, 07:35 I assume you adjusted bug_report.php since that is used to handle new issues.
Eh, that could also be, sorry, yes. I had so many files open yesterday, while I wrote this thread, haha. :D


cas wrote: 30 Sep 2020, 07:35 Currently there is no alternative for what you ask
Hm, what a bummer. :( ... I am still trying to dig the plugin event hooks etc. Are you familiar with these and would say even with such event hooks it would not be possible?

Thanks for your reply, by the way! (=

Re: Redirect to table after bug creation / update?

Posted: 30 Sep 2020, 09:31
by cas
With the standard available events it is not possible. Of course you can define your own events but then you need to adjust core files to add that event.
So think you are stuck with adjusting core files. Biggest challenge there is to maintain a complete overview of all changes made in case of future updates.
Possibly for other customizations plugins do exist, so do not give up :mrgreen:

Re: Redirect to table after bug creation / update?

Posted: 30 Sep 2020, 09:35
by Tagirijus
cas wrote: 30 Sep 2020, 09:31 Biggest challenge there is to maintain a complete overview of all changes made in case of future updates.
Exactly, haha. :D

cas wrote: 30 Sep 2020, 09:31 Possibly for other customizations plugins do exist, so do not give up :mrgreen:
Thanks for your help, though. (=

Re: Redirect to table after bug creation / update?

Posted: 30 Sep 2020, 12:45
by Tagirijus
Weeeeeeell, haha. :D I made it! I actually started to write a plugin, which allows me (or others, since I made it public!) to enable some workflow tweaks. The "redirect to table after report or update" is one of these points. Feel free to use it:

https://github.com/Tagirijus/MantisBTTagiWorkflow


I am still working on it!

Re: [solved] Redirect to table after bug creation / update?

Posted: 30 Sep 2020, 18:28
by cas
Nice, will try it out. Just wondering about the action to give new status to issue when assigned since this is standard available 8O

Re: [solved] Redirect to table after bug creation / update?

Posted: 30 Sep 2020, 19:21
by Tagirijus
cas wrote: 30 Sep 2020, 18:28 Just wondering about the action to give new status to issue when assigned since this is standard available 8O
Do you mean the option on the work threshold page? Somehow this option has no effect here ... or I simply don't understand it. But in the end my plugin works like I want it to, for now, hehe.

Re: [solved] Redirect to table after bug creation / update?

Posted: 30 Sep 2020, 19:23
by cas
it is a standard config as you can find in config_defaults_inc.php

Re: [solved] Redirect to table after bug creation / update?

Posted: 30 Sep 2020, 20:10
by Tagirijus
Ah okay ... maybe I should have digged this then. But too late and nevermind. Thanks, though! (=

Re: [solved] Redirect to table after bug creation / update?

Posted: 01 Oct 2020, 08:38
by cas
Suggest you examine config_defaults_inc.php so you get a feel what is already standard available, most likely more than you expect :mrgreen:

Re: [solved] Redirect to table after bug creation / update?

Posted: 01 Oct 2020, 09:01
by Tagirijus
I just took some time to watch through the whole file: thanks for the hint, since I found some development and logging / error display options, which might become handy in the future, when developing, hehe.

Besides this, I did not find anything useful for my workflow wishes, unfortunately. The $g_bug_assigned_status did not work as I thought it would (actually it didn't make a difference). Either its buggy, or it's just something completely different than I expected, hehe. Again: I stick to my workflow plugin. It's almost done anyway. (=

Thanks again!!