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,463,739
Community Members
 
Community Events
176
Community Groups

Target Start and Target End Date Table name

I can see the Target Start and Target End Date in customfield table but those values are not storing into customfieldvalue or customfieldoption

Any one knows where Target Start and End values are storing ??? i need the table name where Target Start and Target End Date values storing


select * from [dbo].[customfield] where id in (10302,10303)  -- >Target End/ Start Key but not values not in below table, but i can see the value on UI


select * From [dbo].[customfieldvalue] where CustomField in (10302,10303)
select * from [dbo].[customfieldoption] where CustomField in (10302,10303)

3 answers

1 vote
Thomas Atlassian Team Sep 08, 2019

Hi @Rakesh Patil

I'd suggest having a look at the Jira `entity_property` table, you will find baseline_start and baseline_end data stored in the json value column.

I'd mention that changing those values "manually" would require re-indexing your instance - so not recommended.

Cheers,

Thomas

Hey Thomas, 

thanks for reply,  when i am checking the `entity_property table , i see values are stored into Json format, do you know know how convert these values into Date format ? User wanted output in date format.  

Check the attachment image. 

Here is sql:

SELECT ji.id AS "issue id",ji.summary,

ji.duedate, ep.json_value AS "portfolio target start_end"

FROM jiraissue ji

LEFT JOIN project p ON ji.project = p.id

LEFT JOIN entity_property ep ON ep.entity_id = ji.id

where ji.id in (47523,47524)JIRA.JPG

Like Margaret_McCaughern likes this
Thomas Atlassian Team Sep 12, 2019

@Rakesh Patil The dates you are seeing are in the Unix Time format, see https://en.wikipedia.org/wiki/Unix_time

 

Cheers,

Thomas

As a follow up, I've used that information to extract the dates and convert them from JSON to actual dates, here is SQL (I'm using custom views on issue / project but you should get the info pretty easily)

select
 vie.project_key,
 vie.project_name,
 p.project_category_name,
 vie.issue_type_name,
 vie.issue_id,
 vie.priority_name,
 vie.status_name,
 vie.resolution_name,
 vie.created,
 vie.updated,
 vie.resolutiondate,
 vie.labels,
 vie.components_names,
 vie.parent_epic_issue_name,
 cfvStoryPointEstimate.numbervalue::int as Story_Points,
 to_timestamp((ep.json_value::json->'baseline_start' #>> '{}')::bigint / 1000) at time zone 'UTC' as Target_Start,
 to_timestamp((ep.json_value::json->'baseline_end' #>> '{}')::bigint / 1000) at time zone 'UTC' as Target_End
from vissueexpanded vie
join vproject p on vie.project_key = p.project_key
left join entity_property ep ON ep.entity_id = vie.issue_internal_id and ep.entity_name = 'IssueProperty' and ep.property_key = 'jpo-issue-properties'
left join customfieldvalue cfvStoryPointEstimate
 on vie.issue_internal_id = cfvStoryPointEstimate.issue
 and cfvStoryPointEstimate.customfield = (select id from customfield where cfname = 'Story Points')
1 vote

You can go to "System" -> "Plugin data storage" and try looking for Portfolio's active object tables, maybe some of names will hint to sort of info that is stored into them.

Thanks let me check

hi Does anyone know how to convert the Baseline_start and end in SQL?

{"parent_id":"140696","baseline_start":"1656892800000","baseline_end":"1657411200000"}

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events