@@ -31,6 +31,7 @@ protected function configure(): void
3131 ->setDescription ('List run templates ' )
3232 ->addOption ('format ' , 'f ' , InputOption::VALUE_OPTIONAL , 'Output format: text or json ' , 'text ' )
3333 ->addOption ('company ' , null , InputOption::VALUE_REQUIRED , 'Filter by company slug or ID ' )
34+ ->addOption ('company_id ' , null , InputOption::VALUE_REQUIRED , 'Filter by company ID (numeric) ' )
3435 ->addOption ('app_uuid ' , null , InputOption::VALUE_REQUIRED , 'Filter by application UUID ' )
3536 ->addOption ('limit ' , null , InputOption::VALUE_REQUIRED , 'Limit number of results ' )
3637 ->addOption ('offset ' , null , InputOption::VALUE_REQUIRED , 'Offset for results ' )
@@ -45,8 +46,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4546 $ query = $ rt ->listingQuery ();
4647
4748 $ companyOption = $ input ->getOption ('company ' );
49+ $ companyIdOption = $ input ->getOption ('company_id ' );
4850
49- if ($ companyOption ) {
51+ if ($ companyIdOption !== null ) {
52+ $ query ->where ('runtemplate.company_id ' , (int ) $ companyIdOption );
53+ } elseif ($ companyOption ) {
5054 $ query ->join ('company ON company.id = runtemplate.company_id ' );
5155
5256 if (is_numeric ($ companyOption )) {
0 commit comments