Project

General

Profile

Show issues without child issues

Added by Peter Kovac over 7 years ago

Hello,

I'm looking for a way how to query and filter issues which do not have a child issue. In SQL, I'd do this:

SELECT i.id, i.subject
FROM issues i
WHERE NOT EXISTS (SELECT 1 FROM issues c WHERE c.parent_id = i.id)

Is there any way how to do it with Redmine or an existing Redmine plugin? (I tried to search for it but with no luck).

If there's no existing functionality, could you, please, point me to an existing similar code I can study so that I write such a plugin on my own? (I'm complete Ruby/RoR/Redmine noob, but willing to learn). I tried to look at the plugin tutorial but it's too complicated for me at the first glance.

FYI, I'm using:
  • Redmine 2.6.0
  • Rails 3.2.19
  • ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
  • Debian GNU/Linux 7 (wheezy)
  • psql (PostgreSQL) 9.1.16

Thank you!


Replies (2)

RE: Show issues without child issues - Added by Maxim Krušina over 7 years ago

Hi Peter,

first, I see You are using Redmine 2.6.0, which is quite outdated. In case there are no technical limitations, I strongly recommend using the latest version, which is currently 3.3.1.
Coz I have installed the latest version, I can help you only with actual version.
And yes, the solution is bloody simple: in Issue list view, just add filter "Relations / Subtasks" and set the value to "none".
You can also save the query under some name.

I hope it helped.

Regards
Maxim

RE: Show issues without child issues - Added by Peter Kovac over 7 years ago

Thank you, Maxim. I wasn't aware of this kind of filtering in newer version of Redmine. I'll upgrade.

    (1-2/2)