Forums

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

Script Editor log entries are duplicated

Michael Okhotin September 1, 2025

Hi everyone, I found out that logs in Script Editor have duplicated records. 
So logs look like that for every record:

2025-09-01 16:16:39,012 WARN [Project.ScriptName]: record name
2025-09-01 16:16:39,012 WARN [Project.ScriptName]: record name

The same problem occurs for every script located in Script Editor. 
On the other hand if I run script via Script Console, I don't have this issue. 

Is there any way to fix it? Unfortunately I could not find the solution on my own. 

1 answer

0 votes
Stefan Salzl
Community Champion
September 1, 2025

Hi @Michael Okhotin 

assuming you are using Scriptrunner Plugin it would be helpful to have some more details about it in order to find the real problem/solution:

  • where is the related script used in? (listener, workflow, behaviour,....)
  • does the script-line occurs in the same log?
  • could you please send screenshots of the log and/or the usage/use case of usage of the script?
  • could it be that the script is used in more than one places and/or is activated several times within same trigger but different "conditions"?

Thanks in advance.

Best
Stefan

Michael Okhotin September 1, 2025

Hi @Stefan Salzl 
I found this issue at postfunctions and jobs. And it is definitely reproduced for several scripts, so there's no dependency between scripts and so on.
How does it look for job log: 

Screenshot 2025-09-01 192616.png

Recently Jira restart occurred but I doubt that it could be a reason for the issue. 
Please let me know if any additional info is required. 

Stefan Salzl
Community Champion
September 1, 2025

Could you please describe the use case where your script is used and show more relateable details of logs and also the description what it is doing.

I have a similar behaviour in my environment and figured out why:

eg. I had a post-function (that writes a log) but also updates the issue with some "scripted fields". These scripted fields also have some log-actions and on update they all occured within the log of the activation (post-function).

Therefore my questions and requests of detailed information.

Best
Stefan

Stefan Salzl
Community Champion
September 1, 2025
Michael Okhotin September 2, 2025

Hi @Stefan Salzl 
So I found this issue at two different post-function script written by me, both are located between "Add a comment to an issue if one is entered during a transition" and "Update change history for an issue and store the issue in the database" options, Also same bug was found at one of Jobs. 
I dont have any scripted fields, First postfunction updates Assets field value and second one assigns an issue to specific user if some conditions passed.
So it is reproduced for quite different cases. 

To be honest I don't know how logs could be helpful in this case, nothing changed, any log is recorded twice, please take a look at one more example
2025-09-02 10:03:41,564 WARN [Project.DataToSet]: It's a wrong group, stop
2025-09-02 10:03:41,564 WARN [Project.DataToSet]: It's a wrong group, stop

And yes, I use custom logger and it worked perfectly couple if weeks ago

log = Logger.getLogger("Project.DataToSet")
log.setLevel(Level.WARN)

But recently something went wrong.

Thanks for the latest link, I added 
log.setAdditivity(false) next to log.setLevel(Level.WARN) and it fixed an issue for one specific script, but now I think and something should be fixed in system settings because in my opinion it's strange to add this string to evert script located in script editor.

Regards, 
Stefan Salzl
Community Champion
September 2, 2025

Hi @Michael Okhotin 

Do you have sysadmin permission to the server?

It´s not only to set on the script level. If I got the documentation right it´s about when the system is configured to write scriptrunner actions/logs in a separate file (not the common atlassian.log)

https://docs.adaptavist.com/sr4js/8.8.1/best-practices/logging/advanced-logging#step-1-create-your-own-appender

 

The things described in the documentation needs to be configured on the server. 

The logger is configured in your log4j.properties file. This file can be found by default at WEB-INF/classes path within your JIRA_HOME directory

 

Best
Stefan

Michael Okhotin September 3, 2025

Hi @Stefan Salzl 
I guess this link will be helpful for me, but I am not sure when approximately file can be edited because I have to approve Jira restart in advance so currently I even don't know when I can try it. 

So I will definitely reply you but I don't know when exactly :) 

Regards, 

Like Stefan Salzl likes this
Stefan Salzl
Community Champion
September 3, 2025

@Michael Okhotin 

awesome. At least it seems we got a step forward.

Looking forward to your reply.

Best
Stefan

Suggest an answer

Log in or Sign up to answer