From: Nick T. <Nic...@co...> - 2006-06-20 14:30:23
|
Hi all, For those who remember Undergrid who did the original development work on the custom date fields, that's me, but this time I'm doing some work on my companies bill.. (And to those who had to fix my sql, sorry!). Anyway we have the requirement to allow DEVELOPER level users clone a bug into a number of destination projects. Currently mantis only allows the user to create one clone of an issue at a time and only within the same project as the original issue so I was tasked with making some changes. Obviously I'd like these changes (assuming their acceptable) to be included in the official mantis release so I wont have to patch them in every time we upgrade, so I thought I'd outline the concept of what I'm doing here to see if its acceptable to the mantis devs. Most of the modifications are in bug_report_advanced_page right now, with a few others in appropriate places (for example print_api.php). When cloning an issue using the advanced view, the user will be presented with a hierarchy of projects they can access. Projects they have report_bug_threshold access to will have a checkbox. By default, the source project of the selected issue will be checked maintaining current behaviour. If JavaScript is in use, the project list will be collapsible using the same method as (for example) the Relationships section of bug views. The collapsed or expanded state of the list will be remembered between accesses of the page. The user can then check as many of the checkboxes as they like and click Submit Report generating a new issue report for each checked project, creating a relationship between the new issue and the original issue and generating an email for each new issue. Now I'm aware that could cause categories to be used from the original issue project in projects where they do not exist. Mantis' behaviour seems reasonable though, and the categories show up properly in the filters even though they are not set in the project settings. I believe this is the same behaviour as moving an issue from one project to another. Normally cloning an issue would produce an email for each relationship added, however I've modified the code to generate only one email for the last issue added to reduce the number of emails generated (I'm flexible though, so if this needs to be reverted that's fine). I've also modified the "Operation Successful" screen so that it shows a table of new issue ID's, the issue summary and the project that issue is in instead of just a link to the new issue. This will effect issues reported using the advanced view as well as cloning and I didn't think that should be a problem, but I can make the submit use the original behaviour if you like. Hopefully I'll be able to put up a demo install shortly to show the changes I've made, but now would be a good time to point out any problems or suggest changes. So what do you think? Whats the chances of getting something like this into the main release? Thanks Nick Thomson (AKA Undergrid) -- Nick Thomson=20 Senior Software Engineer=20 Cognito Ltd Tel: +44 (0) 1635 508200 www.cognitomobile.com NOTICE: This e-mail message and any attachment is confidential. It may not = be disclosed to or used by anyone other than the intended recipient. If you= have received this e-mail in error please notify the sender immediately th= en delete it from your system. Whilst every effort has been made to check t= his mail is virus free we accept no responsibility for software viruses and= you should check for viruses before opening any attachments. Opinions, con= clusions and other information in this email and any attachments which do n= ot relate to the official business of the company are neither given by the = company nor endorsed by it. This message has been scanned for viruses by Mail Controller - www.MailCont= roller.altohiway.com |