Add report to every projects

Get help from other users here.

Moderators: Contributor, Developer

Add report to every projects

Postby MrZZY » Jun 16, 2017 10:03 am

I have around 100 projects and would like to add an identical bug report to each.

is there an easy way to add an identical report to every project, so that it can be tracked independently per project.
MrZZY
 
Posts: 10
Joined: Feb 08, 2015 3:06 pm

Re: Add report to every projects

Postby atrol » Jun 16, 2017 10:25 am

Depends on what you mean with "easy".
You can copy issues from one project to another project, certainly not easy enough as you might want to copy to many projects in one go.

I don't understand why you need to copy again and again the same issue to many projects.
Can you tell a bit more about your use case?
Maybe there is another way to get what you want.
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 6714
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Add report to every projects

Postby MrZZY » Jun 16, 2017 10:37 am

My projects are books, and a specific update needs to be done to each as they come up for reprint. I want to be able to track when each has been updated (fixed, bugfixed - it doesn't really sound right in the context of a book!). It will probably be 2 years before every book has come up for reprint. Each will required a slightly different update as the layout is different in every case.
MrZZY
 
Posts: 10
Joined: Feb 08, 2015 3:06 pm

Re: Add report to every projects

Postby atrol » Jun 18, 2017 9:39 am

If I understand right, you would need to create the 100 issues just a single time and after that, create a new copy in a single project whenever there is one more reprint.

It takes just a few seconds to create a single issue when copying from an existing one, so I am not sure if it's worth to think about a clean new functionality in Mantis.
Maybe writing a quick and dirty script based on the existing function bug_copy is an option for you.
Code: Select all
function bug_copy( $p_bug_id, $p_target_project_id = null, $p_copy_custom_fields = false, $p_copy_relationships = false, $p_copy_history = false, $p_copy_attachments = false, $p_copy_bugnotes = false, $p_copy_monitoring_users = false )
/**
 * Copy a bug from one project to another. Also make copies of issue notes, attachments, history,
 * email notifications etc.
 * @param integer $p_bug_id                A bug identifier.
 * @param integer $p_target_project_id     A target project identifier.
 * @param boolean $p_copy_custom_fields    Whether to copy custom fields.
 * @param boolean $p_copy_relationships    Whether to copy relationships.
 * @param boolean $p_copy_history          Whether to copy history.
 * @param boolean $p_copy_attachments      Whether to copy attachments.
 * @param boolean $p_copy_bugnotes         Whether to copy bugnotes.
 * @param boolean $p_copy_monitoring_users Whether to copy monitoring users.
 * @return integer representing the new bug identifier
 * @access public
 */


Something like
Code: Select all
<?php
$t_bug_to_copy_id = 1234;
$t_project_ids_to_copy = array ( 1, 3, 4);
foreach ( $t_project_ids_to_copy as $t_project_id ) {
  bug_copy( $t_bug_to_copy_id, $t_project_id, true, false, false, true, false, false );
}
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
Site Admin
 
Posts: 6714
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Add report to every projects

Postby MrZZY » Jun 19, 2017 5:33 am

Hi Atrol

thanks for your script. I will investigate.

Just to outline my scenario a little better:

We have over 100 educational books under our control. This is just one part of our responsibilities! Let's say that an examination board makes a change to their address, we will have to change that in every book. We will make these changes when a book is up for reprint. Even though it's the same change, it will have to be handled differently each time as it will be on different pages, in a different layout for many of the books. Recently, one of the companies changed their trading name, and that had to be changed in every book. Another time, the examination board that supplies the accreditation, made us make a few small but significant changes to the wording of some of our tests. That also affected most of the books.

So in short – the new "bug" (in our case, "change" - and remember that each of our books is a project) has to be filed against every project that it affects. It's usually most, if not all of them, and this happens quite a lot!

I think I need to brush up on my PHP again and write a script that presents me with a "report issue" page and a load of pre-checked radio buttons, that I can fill out the report and maybe uncheck a few projects, then submit and it files that report individually in all the selected projects.

I was asking this question really as I suspected that this may have been something someone had already solved - but now it looks like I'm in it for the long haul!
MrZZY
 
Posts: 10
Joined: Feb 08, 2015 3:06 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 12 guests