Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Search all Issue in project with Groovy REST in cloud

Eduard Diez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2018

Morning;

I need need to extract the issue type, and the issue status, and when I put this script, the logger.info nothing extract.

Captura.PNG

 

 

But when I put this other:

Captura2.PNG

The result is :Captura3.PNG

So I don't know why in the first code doesn't work :

if (tipo == 'Historia'){
    logger.info('tipo-->'+tipo)
}

 

 Captura.PNG 

1 answer

1 accepted

1 vote
Answer accepted
Elifcan Cakmak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2018

Hello,

issue type probably returns an "IssueType" instead of string. You can check the type with getClass(). It should work if you convert it to string: tipo.toString().

Regards,

Elifcan

Eduard Diez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2018

Sorry... 

I put the getClass() like this:

if (tipo.toString() == 'Historia'){
      logger.info('tipo-->'+tipo)
}

And the the problem continues...

Thank's

Elifcan Cakmak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2018

Hi,

So what does it do when you put it like this, what is the behavior? It returns nothing or returns an error? I can't think of any reason why it shouldn't work like this. Maybe try it with equals like:

 tipo.toString().equals('Historia')

Sorry, I couldn't be more help.

Regards,

Elifcan

Eduard Diez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2018

When I put the code retuns this:

Captura3.PNG

 

thank you very much for the help, but I don't know what the problem is,nor with the code that you have put me back to work. 

Don't worry, in the end I will find the way to see all the Story of a project with SubTask in a specific state. This is my aim.

 

Thank's

Eduard Diez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2018

Whit tipo.toString().equals('Historia'):

the same. Really yo don't worry I Thank you for all.Captura4.PNG

Elifcan Cakmak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2018

I hope that you can get it to work. I will try to replicate it when I have some free time. 

Best,

Elifcan

Suggest an answer

Log in or Sign up to answer