Forums

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

Need help with fetching info from projects

Aisha M
Contributor
January 10, 2022

I have a list of close to 200 empty projects (no issues inside). I need to retrieve information of all the project owners & users in each of these individual project.

What would be the best possible way get all these information.

 

Thank you 

2 answers

1 accepted

0 votes
Answer accepted
Pramodh M
Community Champion
January 10, 2022

Hi @Aisha M 

Welcome back to Jira!!

You can get the list of Project lead from API by providing the Project

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-search-get

For getting the list of users who have access to the project, here's a post in Community that I have posted!!

https://community.atlassian.com/t5/Jira-questions/Is-it-possible-to-get-the-list-of-users-having-access-to-a/qaq-p/1593786

Thanks,
Pramodh

Aisha M
Contributor
January 23, 2022

@Pramodh M  Thank you ! Will look into it :)

Like Pramodh M likes this
Pramodh M
Community Champion
February 21, 2022

Hi @Aisha M 

Was your query resolved?

Aisha M
Contributor
February 21, 2022

To be honest, I had to manually look at the data :) But, will accept yer answer for anyone it might help ! :)

Like Pramodh M likes this
0 votes
Aisha M
Contributor
January 10, 2022

@Antoine Berry Hiii ! Hope you are well :):) Guess what, I'm back to jira . .  lol 

Antoine Berry
Community Champion
January 21, 2022

Hello @Aisha M I am perfectly fine, I hope you are too. Welcome back, I see you are using cloud this time. :)

Like Aisha M likes this
Aisha M
Contributor
January 23, 2022

@Antoine Berry  No , I had selected the cloud coz that was the only option available .  :):) 

Aisha M
Contributor
January 24, 2022
Antoine Berry
Community Champion
January 26, 2022

Hello @Aisha M , looks like the topic is being handled already. :)

Aisha M
Contributor
January 26, 2022

@Antoine Berry I understand there is a page about it, but its just too much overwhelming information for someone trying to configure this for the first time . . . I have been searching for some real time videos of someone configuring it but couldn't find any . . ;(  

Have so many questions like,  my users are using outlook . . what info must be provided for setting up the incoming mail & mail handler . .  Should we have a dedicated mail server for the incoming mail server for IMAP or POPS . .  so confused :D 

Antoine Berry
Community Champion
January 31, 2022

Hi @Aisha M ,

Looks like you got the answers you needed on the topic ! :)

Aisha M
Contributor
January 31, 2022

@Antoine Berry  I thought  so too . .  But that was on my personal setup . .  Dunno what's gonna happen while setting up in my org :D

Aisha M
Contributor
February 15, 2022

Hi @Antoine Berry , Can you pleaseee help me with the below question . . 

So, I have a listener. And there are a huge bunch of projects that the listener works on . . .  How to do I ensure the listener picks up the list of projects from a DB instead of manually adding the projects everytime ?

What additional script should I add to the existing listener to make sure it picks the projects from the DB table ?

Any idea ? :(:(

Incase yer interested - https://community.atlassian.com/t5/Jira-questions/Need-help-with-Script-listener/qaq-p/1947386

Antoine Berry
Community Champion
February 21, 2022

Hello @Aisha M ,

Just saw your message, it looks you got the help you needed already ! :)

Aisha M
Contributor
February 21, 2022

@Antoine Berry  I'm yet to try the code, waiting on my access to the db . .  Praying to the JIRA Gods it work ;( Really really really hope it works

Like Antoine Berry likes this
Antoine Berry
Community Champion
February 21, 2022

It will surely work. And if it does not, there is a way to fix it. :)

Like Aisha M likes this
Aisha M
Contributor
February 28, 2022

Hi @Antoine Berry Can I ask you a script related question ? :)

Like Antoine Berry likes this
Aisha M
Contributor
February 28, 2022

@Antoine Berry  Okay, so I have the below script in my service desk to capture the project to db.

So, instead of the custom field "Work" if I need to capture the Board ID (along with the project key). . Can I used a simple text field to do so ? 

import com.onresolve.scriptrunner.db.DatabaseUtil
import com.atlassian.jira.component.ComponentAccessor
import imagineersCF.getDropDownValue


def cfm = ComponentAccessor.customFieldManager
def AtlValCF = cfm.getCustomFieldObjectsByName("Atl Project Picker Key")[0]
def strTeamOperation = getDropDownValue.getDD(issue,"Team Operation")
def strWork = getDropDownValue.getDD(issue,"Work")

def AtlVal = issue.getCustomFieldValue(AtlValCF)?.toString().toUpperCase()
def projectKey = issue.getProjectObject().key.toUpperCase()
def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser.name.toUpperCase()

if(strTeamOperation == "Add"){

def query = """ EXECUTE [dbo].[sp_Update_Default_Value_No_Output_MYD] 'Work','${AtlVal}',null, '${loggedInUser}','${strWork}',1 """
DatabaseUtil.withSql('my_database') { sql ->
sql.execute(query.toString())
log.error(query.toString())
}
}
}

Like Antoine Berry likes this
Antoine Berry
Community Champion
March 4, 2022

Hi @Aisha M ,

I am not too familiar with SQL queries in groovy. I would need to look further in details.
I guess you got this script from your other post ? So it should be trustworthy.

What is the issue with it ? Also do you have a getDropDownValue function in your script ?

Like Aisha M likes this
Aisha M
Contributor
March 16, 2022

@Antoine Berry That is alright :):) I was able to fix it . .  But thank you for willing to help . .  :):)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events