Forums

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

In which database table can I find the Current Project Id ?

support for vo August 28, 2018

I want to do a SQL request to retrieve the CurrentProjectId.

2 answers

2 votes
Alexey Matveev
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.
August 28, 2018

Hello,

What do you mean CurrentProjectId? Id is always the same for the whole life of a project. Do you want to get the CurrentProjectKey?

Anyway all this info is in the project table.

Grigory Salnikov
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.
August 28, 2018

I can confirm it. It's the first column:

project.jpg

Alexey Matveev
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.
August 28, 2018

What do you mean by Id? And how do you want to use it?

0 votes
support for vo August 28, 2018

Hi,

Thanks for your reply. But what I need is the Id of the Current Project which is this one :

ScreenCurrentProject.png

Grigory Salnikov
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.
August 28, 2018

It's the same here. You just need to look for the project "Sentinel" in the "project" table and find its id. As @Alexey Matveev has already said, there's no such thing as "CurrentProjectId", but you can always find the ID of the current project.

support for vo August 28, 2018

Sorry, but it doesn't answer my problem. I know what you explain.

But I want to make a generic request for the Current Project. I don't know which is the Current Project. In my example it is "Sentinel", but if the user select another Project, the "Current Project" will change.

It is the same problem as when you use the function "project = currentProject() " in any filter (after installing the plugin). With this function you can make generic filter to use in an unique Board for example.

Grigory Salnikov
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.
August 28, 2018

Ok, I see. 

You have a limited number of projects, right? You can create all the pairs "Project - ID" and take the matching value without any SQL queries. 

Where do you plan to use this value, anyway?

support for vo August 28, 2018

It is to use for example in the SQL field of a "List" type field of the PROFIELD plugin, which is connected to an external Source (as another JIRA database). But anyway, to display the CURRENT PROJECT or the RECENT PROJECTS lists ... the project(s) ID must be stored somewhere in the JIRA database isn't it ?

Grigory Salnikov
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.
August 28, 2018

Not necessarily. 

I tend to think that such information may as well be stored in users' cookies. 

support for vo August 28, 2018

AH OK ! In this case there is no solution for me with SQL .. I will have to do differently. Thanks a lot for all your answers.

Grigory Salnikov
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.
August 28, 2018

You're welcome. Sorry you haven't found the answer.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events