changing time tracking via database

Rahul Aich [Nagra]
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.
June 12, 2013

Hi Guys

Is it possible to divide by three the total estimates and total time logged for all issues on jira through the database.

Reason is i am going to amend the time tracking config from 1day=24 config to 1day=8hours. Moment i flip this config all times logged will get multiplied by three.

Rahul

3 answers

1 accepted

1 vote
Answer accepted
Henning Tietgens
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.
June 13, 2013

Ah, yes, that's correct. 5d = 5*24h = 15*8h... my fault. :-)

The timetracking is saved within the worklog table. But there are also timetracking entries on the jiraissue and maybe at other locations? I'm not sure if it's ok to divide this values by 3 to get it working. Maybe you should test this first on a testystem :-) You have to shutdown JIRA, make the changes, start JIRA, full reindex.

But, I think a much better way is to use the Java API to make the changes. You can use the Script Runner plugin and a script to modify all worklogs.

0 votes
Henning Tietgens
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.
June 13, 2013

Are you sure that this is happening? JIRA saves timetrackings in seconds, not in days. Did you test changing the confing or is it a guess that this is happening while changing the config?

Henning

Rahul Aich [Nagra]
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.
June 13, 2013

Hi Tietgens

Yes, I am sure. I tested it with various combinations and it replicated everytime.

An estimate of 5day turned into 15days after the flip; the same with time logged, a total time logged of 3 days turned to 9 days after the flip.

Also I am on 4.1 jira. if that explains.

Rahul

0 votes
Rahul Aich [Nagra]
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.
June 12, 2013

any ideas guys?

Rahul

Suggest an answer

Log in or Sign up to answer