I need to insert in those tables to retrieve the changes.
I dont wanna make a new field.
Also is it safe? or itll break something
Standard advice:
For your case, you absolutely should not be amending the issue history. Your changes are not even about the issues, so it would be nonsense to amend the history anyway.
You should be capturing your change logs, probably in dedicated fields, on the issues. Using the UI or the REST API to push data into them.
Hi @Nic Brough -Adaptavist- thanks.
I found a solution, i used issueUpdater instead and added changeItemBean
IssueUpdater issueUpdater = ComponentAccessor.getComponentOfType(IssueUpdater.class);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why would you want to directly insert changelogs?
I would advice strongly against it - the db structure is not always entirely clear nor clearly linked in the database schema, you would want to do your research with sql logging to find which tables it actually modifies to see what you need to cover.
In any case you are always risking breaking something and Atlassian - as any sane company mind you - is not directly supporting SQL changes.
You can generate changeitems on an issue through public Java API if you have a plugin that can run groovy codes (GroovyRunner, ScriptRunner to name 2 I know).
In any case changelog should correlate to what changes were done on an issue, so the use case to generate records arbitrarily sounds strange - what information are you trying to capture in it?
Additionally, if your issue changelog is large (say, hundreds or thousands of records), it will affect performance of the issue too - any change or transition you do on that issue will take minutes because it will be trying to generate a new change history, and that will start to take a lot of time. We had some automation that generated thousands of change items and the issue was barely usable (transition took over a minute) and the History tab would take 5 minutes to load.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Radek Dostál,
Because when a certain operation is done we wanted to add to change log that this particular issue was modified with this operation. Because we need it for processing.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.