automatically monitor an issue assigned to another user

Get help from other users here.

Moderators: Contributor, Developer

automatically monitor an issue assigned to another user

Postby bruno.riddy » Mar 28, 2017 4:42 am

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
bruno.riddy
 
Posts: 11
Joined: Mar 14, 2017 1:05 pm

Re: automatically monitor an issue assigned to another user

Postby atrol » Mar 28, 2017 1:36 pm

You can write a plugin that uses EVENT_BUG_REPORT
https://www.mantisbt.org/docs/master/en ... bug.action
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 6691
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: automatically monitor an issue assigned to another user

Postby bruno.riddy » Mar 29, 2017 3:14 am

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
bruno.riddy
 
Posts: 11
Joined: Mar 14, 2017 1:05 pm

Re: automatically monitor an issue assigned to another user

Postby bruno.riddy » Apr 07, 2017 4:59 am

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
bruno.riddy
 
Posts: 11
Joined: Mar 14, 2017 1:05 pm

Re: automatically monitor an issue assigned to another user

Postby bruno.riddy » Apr 20, 2017 6:11 am

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
bruno.riddy
 
Posts: 11
Joined: Mar 14, 2017 1:05 pm


Return to Help

Who is online

Users browsing this forum: Bing [Bot] and 15 guests