Add a condition for opened issues

Relates #338