Page 1 of 1

automatically monitor an issue assigned to another user

Posted: 28 Mar 2017, 09:42
by bruno.riddy
Hi all!

We are migrating to a new Mantis installation and I was wondering if anyone wanted to share any ideas on how to implement this feature?

We have certain groups of reporting users who work very closely together, and it would be brilliant if they could automatically monitor the tickets of their colleagues.

Ideally a situation where when user x logs a ticket, users y,z and w are automatically monitoring it and when user b logs an ticket, users a, c and d are automatically monitoring it.

Is this possible with plugins or some hacky method? If not, how would you go about implementing it?

Many thanks for your thoughts,
bruno

Re: automatically monitor an issue assigned to another user

Posted: 28 Mar 2017, 18:36
by atrol
You can write a plugin that uses EVENT_BUG_REPORT
https://www.mantisbt.org/docs/master/en ... bug.action

Re: automatically monitor an issue assigned to another user

Posted: 29 Mar 2017, 08:14
by bruno.riddy
Thanks for you reply atrol,

Based on my own limited research, this was the same conclusion I came to. (I presume you mean EVENT_REPORT_BUG)

I don't have any experience writing Mantis plugins though, do you happen to know if there's a very basic plugin that uses the same event which I can study to help me learn?

Many thanks,
Bruno

Re: automatically monitor an issue assigned to another user

Posted: 07 Apr 2017, 09:59
by bruno.riddy
So I have got my basic plugin to the stage where all new bugs are automatically monitored by a User whose ID I specify in the plugin. Great success.

Now I want to make it so that on a config page you can define groups of users & all people in the same group automatically monitor the bugs submitted by everyone else in the group.

Does anyone have any input on how I would go about this?

I would need to: get a list of all users in mantis, have a form to select from those users, save the selections as groups in a table & reference that table when new bugs are submitted.

I will keep on muddling through trying to work it out, but a pointer int he right direction would be very helpful!

Cheers,

Bruno

Re: automatically monitor an issue assigned to another user

Posted: 20 Apr 2017, 11:11
by bruno.riddy
Hi all!

After much work I managed to get my plugin working. On the plugin config page I called the database for a list of user emails, then presented three text boxes for users to filter this list down to create their monitor groups. I then saved the filter text boxes as strings rather than the list of users, and when a new bug is submitted used those filter strings to recreate the monitor group shortlist, checked reporter ID against that and if positive, assigned everyone in the shortlist to monitor.

If anyone ever has a question about this admittedly pretty simple process, don't hesitate to PM and ask me, however far in the future this is.

So now the problem I am going to tackle is that Mantis sends an email notification when someone monitors an issue that you are monitoring. If I have a "monitor group" of 18 people, the first person will get 17 notifications, the second will get 16 etc. That is a lot of email to receive all at once. Now I am going to poke around and find a way through the configuration options or the API to turn off these monitor notifications, either temporarily or permanently.

As always, if anyone can point me in the right direction it would be greatly appreciated!

Cheers,

Bruno

Re: automatically monitor an issue assigned to another user

Posted: 01 May 2018, 23:37
by gabrielmoreno
Dear Bruno, congrats for your job!

I'm a new user in mantisBT and I have a doubt: how to automatically monitor by e-mail a issue without the reporter having to click every new issue in monitor button?

After that, how you make to monitor issues by e-mail to a users group that belonging to the same project?

Thanks in advance :mrgreen:

Gabriel Caparroz

Re: automatically monitor an issue assigned to another user

Posted: 13 Jun 2019, 09:25
by RandyBonnette
Hello,

I'm new to MantisBT. How is it possible to add the old handler to the monitor list once the handler is going to be changed? I found an older thread with the mentioned attachment, but it can't be downloaded (AlwaysUpToDate.rar) because of my antivirus blocking the process.

Thanks,
Randy