I have over 1,000 defects in ALM, and I need to change the status of all of them from New to Closed. This would not be a problem however every time I close a defect there are five required fields that have to be entered before the defect can be closed. I have tried to re-import the defects with a status of closed but the status does not change. Is there an easy way to do this without having to go in and change the status of each defect?
Answer by jameslcoleman · Jan 12, 2016 at 09:02 PM
The easiest way will be to run a simple query in Site Admin for the project needing the defect statuses changed. First you will need to access Site Admin, highlight and expand the project, Select the BUG table, enter the query below and click the Execute SQL button. Once you have completed this process, access ALM and verify that all of the defects are in a 'Closed' status within the Defects module.
UPDATE BUG SET BG_STATUS = 'Closed' WHERE BG_STATUS = 'New'
Answer by Dan · Jan 13, 2016 at 01:46 PM
Hi Coleslaw, Be aware that the above query will change ALL defects currently with the "New" status to "Closed". If you have some, say newly opened defects currently active and under review that you wish to not be closed yet, with this query they will be marked as "Closed" as this doesn't differentiate. You may want to add something within the query (a WHERE statement) that differentiates as well, such as the BG_ID field and then have it match the defect ID(S) desired to be changed (or possibly exclude certain ones not being desired to be changed).
Answer by Jafar · Jan 13, 2016 at 02:11 PM
If you do not have access to the database you can also make the change in the project.
Set a filter in the defects grid for all defects that you would like to change.
Right click and choose "select all" to highlight all the shown defects in the grid
Right click and choose "Update selected".
You will be presented with a dialog box that allows you to choose the field that you wish to update and the value that you are updating to. You can use this approach with any defect field, not just status.
Answer by Coleslaw · Jan 13, 2016 at 03:28 PM
Thanks for your input jameslcoleman, Dan and Jafar. I had originally tried the filter method in the Defects grid, but it appears that some of the fields have been changed to required fields after the defects were originally entered. After making the updates, the ‘Required Defect Fields’ window displays in the defects grid, and won’t allow me to proceed until all of the blank required fields have been populated for each of the defects that were updated. The update query allowed me to make the changes without the the ‘Required Defect Fields’ window displaying when I revisit the defects grid. I appreciate your assistance with this.