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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,039
Community Members
 
Community Events
176
Community Groups

request on oracle to find out unused projects

Going from this link 

I needed to update the script so that it display project name and project id but i was not successful up to now

Can you please provide some help?Please emergency

1 answer

I found my solution and it works like a charm on Jira DC 8.20 Oracle db

select
ss.*
,case when ss. "Last Update" < CURRENT_DATE - 180
then 'NO'
else 'YES'
end as "Updated in the last 6 months?"
from (
select distinct
p.id,
p.pname as "Project Name",
p.pkey as "Project Key"
,case when p.pkey = p.originalkey
then NULL
else p.originalkey
end as "Project Archived?"
,cu.lower_uset_name as "Project Lead"
,cu.lower_email_address as "Lead Email"
,case when cu.active = 1
then 'YES'
else 'NO'
end as "Lead Active?"
,MAX(ji.updated) as "Last Update"
,count(distinct ji.id) as "Issue Count"
from jiraissue ji
right join project p
on p.id = ji.project
join app_user au
on p.lead = au.user_key
join cwd_user cu
on au.lower_user_name = cu.lower_user_name
left join propertyentry pe
on p.id = pe.entity_id
and pe.property_key = 'jira.archiving.projects'
GROUP BY p.id,p.pname,p.pkey,
CASE WHEN p.pkey = p.originalkey THEN NULL ELSE p.originalkey END,
CASE WHEN p.id = pe.entity_id THEN 'YES' ELSE 'NO' END,
cu.lower_user_name,
cu.lower_email_address,
CASE WHEN cu.active = 1 THEN 'YES' ELSE 'NO' END
)ss

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events