Forums

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

Why are my project key and id always empty

Peter 't Hart
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2021

Hi,

I am new to the Jira apps, so I thought I give it a go..

But I encounter a problem and I don't understand why.

I have this json uploaded:

"modules": {
"jiraProjectPages": [
{
"url": "/Jira/view.aspx?projectId=${project.id}&projectKey={project.key}",
"weight": 100,
"key": "project-2-iteration",
"name": {
"value": "Link project to Iteration"
}
}
]
}

 

but projectId and projectKey are always empty.

When I inspect the iframe url in the browser I can see that hey are empty..

 

What am I doing wrong?

1 answer

0 votes
Nic Brough -Adaptavist-
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 1, 2021

Where in your script are you setting the variables for project id and project key?

Peter 't Hart
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2021

I did exactly as this page suggested to me:
https://developer.atlassian.com/cloud/jira/software/modules/project-page/

Is it perhaps some kind of rights an user needs before the information is send to the iframe?

Nic Brough -Adaptavist-
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 2, 2021

Ah, it's part of an app, not a script, sorry, I did not grasp that from the question.

I have not yet coded for Cloud Jira, so I don't know the answer to this one.  It feels like the variables should be fed to your code by the framework it's running in, but I don't know where to look next for them.  Sorry.

Suggest an answer

Log in or Sign up to answer