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,559,889
Community Members
 
Community Events
185
Community Groups

Date time information saved in Jira Database for transitions

Edited

Hi All,

I have created an issue in Jira.Based on the date and time the Created Field is updated.This field takes system date and time.

Now I am updating the issue from one status to another and in the transitions I can see both Date and time are displayed.

I am trying to search for this issue in my Jira Database JiraIssue table and changegroup table, when I see the created column the data has only date information.It does not contains time information.

Could you please help me if this information is saved somewhere in database or direct to correct database tables or a way to retrieve this date and time information from database.

 

2 answers

I know it's late, as the posting is from 2019, but I can provide an answer (I experienced the same issue).

Just run this command before running the SELECT query and you will see date and time information for [Created] field:

alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS';

Regards,

M. R.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 22, 2019

Created date and time is stored in the jiraissue table, and all changes to an issue are logged in changegroup.  Both fields used for storing when the action was taken are date/time fields and capture both date and time.

What tool are you using to read the database?  It sounds like the tool is set to ignore time stamps in date columns!

I am using Jira version 7.9 in production and 7.11 in test environment and using SQL database to retrieve the data .

Query used to fetch data is below:select row_number() over (PARTITION BY JI.ID order by CG.CREATED asc) row#,JI.ISSUENUM as ID,
CI.OLDSTRING as FromStatus, CI.NEWSTRING as ToStatus,
JI.CREATED as CREATED,CG.CREATED as EXECUTED
from jiraissue JI
join changegroup CG on CG.issueid = JI.ID
join changeitem CI on CI.groupid=CG.id and field = 'status'
LEFT JOIN nodeassociation X ON X.SOURCE_NODE_ID = ji.ID and X.ASSOCIATION_TYPE = 'IssueFixVersion'
LEFT JOIN projectversion Y ON Y.ID = X.SINK_NODE_ID
JOIN project ON project.ID = ji.PROJECT AND project.id =
JOIN issuestatus s ON ji.issuestatus = s.ID
where JI.CREATED>'01-JAN-18' and JI.ISSUETYPE=

Attached is the screenshot from history tab that shows the data and time format for each transition change.

Also attached is the JIRAISSUE Database structure that shows that 'CREATED','UPDATED' column has data type as DATE.

Was this changed in the recent releases?

Is there some other table which I could join to my query to retrieve details related to date and time both?Jiraissue_Databasetable.pngTransition Date and time.png

Is there some update on the issue?

Thanks,

Mehak

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 28, 2019 • edited

>Was this changed in the recent releases?

No, it has not changed since Jira 1

>Is there some other table which I could join to my query to retrieve details related to date and time both?

No, because, as I said before, the data is stored in the tables you are reading, and there is no reason to duplicate it elsewhere.  The date and time you are pointing to in the change history in your screenshot is the date/time stored in the changegroup date/time field.

I do not know why your database tool is suppressing the time display.  Mine does not.  A changegroup in my Jira (was 7.6, now 8.0) looks like this:

Screenshot 2019-03-28 at 10.39.52.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events