Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Do Customfields share IDs with other properties?

Sadaf Chowdhury August 9, 2018

Given how the only way to check when a custom field was created is in the audit log, I tried to get that date from the JiraDB but unfortunately the dates did not line up properly. I was wondering if Customfields could possibly share IDs with Issues or Projects. 

2 answers

1 accepted

1 vote
Answer accepted
Hernan Montes
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.
August 9, 2018

Hello Sadaf,

I'm not sure how you're querying for that information in the database, from testing I have done I can get the exact dates from the database that is shown in the audit log, please try the following queries for the results:

SELECT * FROM audit_log WHERE summary = 'Custom field created' and author_key = '<username>' ; 

This will give you all custom fields created by the user

SELECT * FROM audit_log WHERE summary = 'Custom field created' and CAST(created AS DATE) = '2018-07-19';

This will give you all custom fields created on the specified date

Please follow the existing columns of the table to get the information you need.

Hope this helps!

Sadaf Chowdhury August 13, 2018

Thank you! Is there a way I can get when a Custom field was last updated in the audit log? 

Hernan Montes
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.
August 13, 2018

After custom field has been created and it is added to a screen, the only history activity you will be able to search for is per issue not per custom field, there's a couple of tables involved on history and changes that are connected through issue number and project key, the only way to get the info you need is to create a listener or a custom field script that could log every time the custom field is being used or updated, and since this would able a customization you are able to add any values that you need like user, timestamp, etc.

So short answer is no, but you can still create a customization that can get what you need.

0 votes
Nic Brough -Adaptavist-
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.
August 9, 2018

You ask

> "Do Customfields share IDs with other properties?"

The answer is no, the IDs are not shared.  But almost every type of item in Jira has its own sequence, so they certainly overlap - 10500 as a random number could easily be a project, field, scheme, issue, etc.

I don't understand "unfortunately the dates did not line up properly".  If you're reading the audit log (which is, of course, a table, as Hernan points out), they you'll find it's got the date/time stamp of when the audit line was captured.

Suggest an answer

Log in or Sign up to answer