Forums

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

Get accountID using Scriptrunner Jira Cloud

Oleksandr Melnyk
April 10, 2023

Hi,

I am trying to get accountID using email.

When I use a simple REST API call with API tester - it's working fine.

But when I use scriptrunner - something goes wrong. Please help, I am new in groovy and sometimes it's hard to understand. Here is my code:

def userEmail = "oleksandr.melnyk@example.com"

def response = get('/rest/api/3/user/search?query=' + userEmail)
.header('Content-Type', 'application/json')
.asObject(Map)

logger.info('Id=' + response.body.accountId)

return response


 

 

3 answers

2 votes
Yogesh Mude
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 Champions.
May 30, 2018

Hi @Riedl-Taras

If you want ot have one workflow for multiple projects then follow the below steps.

1. Create the workflow.

2. Create workflow scheme.

3. Add the workflow to Workflow scheme.

4. Associate the workflow scheme to all the projects that you want to use the same workflow.

1 vote
Deleted user
May 30, 2018

Hi @Riedl-Taras,

It is possible to have one workflow for multiple projects.

You can have multiple projects share their configurations for issue types, workflows, screens, fields, etc. 

If you want all projects use the same workflow, create a workflow scheme and link the required workflow/s to the scheme. All you need to do then is swap your projects' current workflow scheme with the one you have just created. 

Read the in-depth documentation on project configuration as this will help you understand the potential configurations of a JIRA project.

Hope this helps

0 votes
Riedl-Taras
May 30, 2018

Thanks for the replies!

Suggest an answer

Log in or Sign up to answer