How to write a JQL to get projectname based on project id no?

Patrik Hoglund
Contributor
February 23, 2024

Hi,

Im a bit stuck, I have project id's but wonder how to write a JQL query to get the corresponding project name or project key?

Cheers Patrik

 

 

1 answer

0 votes
Kalyan Sattaluri
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.
February 23, 2024

Hello @Patrik Hoglund 

JQL is used to only return issues.  Can you tell what are you trying to do?

Patrik Hoglund
Contributor
February 23, 2024

Okej long story short. Im trying to identify all projects that we have in our instance that doesnt contain resolution code in workflows.
Got some help from a consult and through his scripts using REST API, see  example result:

"projectIds": [
"10163"
],
"workflowScheme": {
"id": 10243,
"name": "Change Mgmt Workflow Scheme_MEV 2.0",
"defaultWorkflow": "Change Mgmt Workflow 2.0",
"issueTypeMappings": {
"10000": "EPIC Workflow 2.0",
"10001": "Change Mgmt Workflow 2.0",
"10002": "Task Workflow 2.0",
"10003": "Test Request Workflow 2.0",
"10004": "Change Mgmt Workflow 2.0",
"10022": "Task Workflow 2.0",
"10023": "Change Mgmt Workflow 2.0",
"10064": "Task Workflow 2.0",
"10083": "EPIC Workflow 2.0",
"10088": "Change Mgmt Workflow 2.0",
"10123": "Change Mgmt Workflow 2.0",
"10206": "Change Mgmt Workflow 2.0",
"10207": "Change Mgmt Workflow 2.0",
"10208": "Change Mgmt Workflow 2.0",
"10211": "Change Mgmt Workflow 2.0",
"10214": "EPIC Workflow 2.0",
"10216": "Task Workflow 2.0",
"10218": "Task Workflow 2.0",
"10219": "Test Request Workflow 2.0"


My idea is to use project id and from there get down to workflows that needs to be adjusted.

Kalyan Sattaluri
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.
February 23, 2024

@Patrik Hoglund  The same consultant should also have given you this info. One way I can think is to use the below or similar API to get you the details but again seems like you need to work with your contact so you can get your work done.

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

Patrik Hoglund
Contributor
February 23, 2024

@Kalyan Sattaluri thanks anyways for trying help, very much appreciated.

Like Kalyan Sattaluri likes this

Suggest an answer

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

Atlassian Community Events