Example #1
0
 public function update()
 {
     $this['notes'] = 'ActualizaciĆ³n Automatica, desde planilla.';
     $importService = \ImportService::getInstance();
     $api = $importService->getClient()->api(self::API);
     /* @var $api \Redmine\Api\Issue */
     $return = $api->update($this['id'], $this->toArray());
     $this->checkErrors($return, true);
 }
 /**
  * {@hinheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $fileName = $input->getArgument('dataFile');
     $sheet = $input->getOption('sheet') ?: null;
     $record = $input->getOption('record') ?: null;
     $delimiter = $input->getOption('delimiter') ?: null;
     $fileType = $input->getOption('fileType') ?: null;
     if (null === $sheet || null === $record) {
         throw new \Exception('Both, --sheet and --record options must be set.');
     }
     $import = \ImportService::getInstance($fileName, $sheet, $delimiter, $fileType, $record);
     $import->createTickets();
 }
 /**
  * {@hinheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $import = \ImportService::getInstance();
     $progectidentifier = $input->getOption('project') ?: null;
     if (null === $progectidentifier) {
         throw new \Exception('You must use --project="RedmineProectIdentifier"');
     }
     $all = $input->getOption('all') ?: null;
     if (null === $all) {
         $import->deleteLastRunCreatedIssues($progectidentifier);
     } else {
         $import->deleteIssuesInProject($progectidentifier);
     }
 }