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?
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.