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

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

Worklog - Time Tracking Integration Edited

Hi, I am working with Jira Server and the database is setup in Postgresql. I am interested in syncing time logging information with another system and am trying to figure out how the worklog table works. 

From what I see so far, I can make edits to the time tracking columns in jiraissue table and there is no issues in doing so (the summary figures).

In table worklog, I can edit values but if I try to make a new entry I'm stuck in trying to figure out how it increments the counter for the primary key id field. I looked in the postgres sequences and it cannot be found there. If I find the next id that it should be and insert a new record using that, it causes problems as if a user in jira inserts a new record you get a conflicted duplicate key error.

 

I suppose I could insert records with an id that is offsetting the current id by a very high amount.. but is there a way to just increment the counter value which jira refers to somewhere?

1 answer

1 accepted

You are playing a wrong game.

Jira uses Hibernate ORM and Code First Approach, meaning that all DB tables are predefined and created only at runtime. It does not use any Stored Procedures/DB objects like sequences. SQL Queries will be dynamically generated by ORM and ORM internally manages all DB operations.

Never try to change Table design or Insert Rows in the database directly.
If you try to change, your Jira might be screwed up or your Jira upgrades will go for a toss. (All that you can change in DB is only column data.) Any change to DB should ideally come from only JIRA front end by user operations.

For your requirement, create a new DB user with READ permissions and insert data into other system, modify the data as needed.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center Apps Program coming soon

G’day Bamboo customers, As we approach GA for Bamboo Data Center , we would like to inform you that the Data Center Apps Program for Bamboo starts this quarter. How long does it take? We are g...

69 views 0 6
Read article

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