Assigning bugs to testers

In our JIRA environment, only testers may create or re-open bugs.
In order to improve our workflow, we’d like that the bug will be assigned to the relevant tester as soon as it is resolved.
The easy solution is to use the ‘assign to reporter’ post-function, but it does not work well for bugs which were re-opened and re-fixed, because we want to assign it to the tester who re-opened the bug.

So, I added a ‘Reopened By’ user-picker custom field which is set automatically to the current user when re-opening a bug. Then I came up with three approaches to implement this automatic assignment mechanism:

1. Add a ‘re-fix’ transition
2. Add a hidden ‘last tester’ field
3. Implement a Groovy script

Here are the details of each solution:

Continue reading

Inno setup – restore files on uninstall

Suppose you are using an Inno Setup project to replace existing files. When running the uninstaller it will delete the new files, instead of the expected behavior of restoring the previous ones.
Here is my implementation of a backup & restore mechanism:

1. For each file to be backed up, add a ‘Check’ parameter with the name of your backup function. This function will be called just before installing the file so we can use it to perform the backup.

2. Implement the backup function to perform the backup. Make sure to return True if everything’s OK and the file can be replaced.

3. Implement the restore function by copying all files from backup to the original location.

4. Call the restore function during uninstall (post-uninstall, after the new files have been removed).

Here is a sample Inno Setup script that implements this mechanism. In this example, the backup function supports backing up the entire folder structure, so restoring them to the original location is easy (using xcopy).

Continue reading