[RESOLVED] Is it possible to use a project key instead of its name?

Hello,

Is it possible to use a project key instead of its name?

  requirements: {
   targetProject: {
     type: entities.Project,
     key: 'CS'
   }
 }

The above code causes an error:

The targetProject project wasn't found.

But this one is not:

  requirements: {
   targetProject: {
     type: entities.Project,
     name: 'Client Service'
   }
 }

Thank you.

0
4 comments

Hi!

You can use this code instead:

let project = entities.Project.findByName('Client Service');

In this case, it's not necessary to specify the project in the requirements.

0

Hi,

Thanks, but I want to use the project ID and not the name

0

Please excuse me, use the entities.Project.findByKey('CS') instead.

0

Please sign in to leave a comment.