Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to Link JiraIssue to Portfolio Team field in SQL

Trying to find a way to back-end update some data to support changes needed for Portfolio.  I need to find a way to get a list of issues, via SQL, that have the Team field equal to a specific value.  I can't seem to figure it out and the customFieldValue doesn't seem to be linking it as expected.  Have this so far:

SELECT * FROM jiraissue i
join customfieldvalue cfv on cfv.ISSUE = i.ID
and cfv.CUSTOMFIELD = 11900 --custom field for Team

2 answers

Hey Dan,

 

Team is a locked field and you cannot query it via SQL. Values for Portfolio will reside under Active Objects Tables

 

AO_D9132D_ *******

 

I could get these

 

SELECT ID from AO_D9132D_PLAN WHERE TITLE LIKE '%test Port%'

SELECT  TEAM_ID FROM AO_D9132D_PLANTEAM WHERE PLAN_ID = 29

SELECT * FROM jiraissue WHERE ID in (SELECT ISSUE FROM AO_D9132D_ASSIGNMENT_EXT ext WHERE ext.[PLAN]=29 AND ext.TEAM =96 )

I am also trying to obtain a list of Jira issues with Team Accounts/Products, but I get no results. There are 978 issues with this field. 

SELECT ji.pkey,
ji.issuenum,
ji.PROJECT,
ji.issuetype,
ji.SUMMARY,
ji.DESCRIPTION,
ji.PRIORITY,
ji.CREATED,
ji.UPDATED
FROM dbo.jiraissue ji
join AO_D9132D_ASSIGNMENT_EXT assg on ji.ID = assg.ID
WHERE assg.TEAM = 'Accounts/Products'

Any suggestions? 

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

4,013 views 11 5
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you