Actions
Feature #34821
closedfind tickets assigned to former employees
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Administration
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Description
I got a question if I could find all tickets assigned to former employees and I wrote this not very pretty but working script:
#!/bin/sh disabled_users=$(echo 'select id from users where status = 3;' | mysql -N redmine) for du in $disabled_users; do echo "select project_id, id, assigned_to_id from issues where assigned_to_id = $du and status_id = 2;" | mysql -N redmine; done | \ while read project id user; do PN=$(echo "select name from projects where id = $project" | mysql -N redmine) user=$(echo "select login from users where id = $user" | mysql -N redmine) echo "Ticket $id in project '$PN' is assigned to '$user'" done
- I'm aware this could be done with one mysql statement, but my mysql skills are rather bad and this works as well. Improvements are welcome of course.
- I've read this feature has been implemented in redmine 4, so this is for all redmine 3 users.
Updated by Go MAEDA over 3 years ago
- Status changed from New to Closed
- Resolution set to Invalid
Please use forums for questions. Issues are used to report a bug, suggesting a new feature, or submitting a patch. Reading How to request help may be helpful for you.
Actions