Report Table that links Epics/Features to Projects

mcallistermf
Tera Contributor

What data table would I use to query Epics\Features for a certain Project? On the attached example I want to see only the Epics (EPIC0010023 and EPIC0010024) for PRJ0012299.

SPM Project Feature Screen Shot 01082023.png

1 REPLY 1

Mark Manders
Mega Patron

If this is the OOB Epic relationship that you just renamed, that relationship is scripted and shows all epics related to stories of which the parent is the project. 

 

This is the script used OOB for the relatioin:

 

(function refineQuery(current, parent) {

    if (parent.instanceOf('pm_project')) {
        var sysIds = '';
        var story = new GlideAggregate('rm_story');
        story.addQuery('project', parent.sys_id);
        story.addNotNullQuery('epic');
        story.groupBy('epic');
        story.query();
        while (story.next()) {
            sysIds += ', ' + story.getValue('epic');
        }
        current.addQuery('sys_id', 'IN', sysIds);
    }

})(current, parent);

Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark