Hi there,
I am using 'Automation for Jira' to create some rules. In one of those rules I will have to run a ScriptRunner script as an action. My question now is if there is any possibility to make use of a logging functionality.
I know that Automation for Jira allows to use smart values in combination with the mustache framework to write something into the Audit Log.
But I am doing some calculations inside the script and need to know if everything is going fine. I even tried to use 'log.debug(...)' but it didn't appear in the Audit Logs of this rule.
Are there any solutions to this problem?
Best regards,
Basit
Hey Basit,
John from Automation for Jira here. I think this would be a question for the Adaptavist support team.
As you mentioned, you can debug smart values (and anything else) with Automation for Jira: https://docs.automationforjira.com/getting-started/debug-a-rule.html#_2-debugging-smart-values
From this post, it seems like it is possible to debug scripts with Scriptrunner: https://www.adaptavist.com/doco/display/SFJ/Set+logging+to+help+debug+your+scripts
Lastly, thanks for answering the initial question @Jack. Just to clarify - there is an integration with Scriptrunner and Automation for Jira - but only for Server right now. (Just noticed Thanos also pointed this out above!)
https://scriptrunner.adaptavist.com/latest/jira/plugins/automation-for-jira.html
Hope that helps,
John
Hi John,
thanks for your answer. Debugging scripts with ScriptRunner already works for us. The thing is I would like to have these debug messages to be visible in the "Audit Log" that is provided with Automation for Jira.
But I think you are right and this is a question for the Adaptavist team.:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you're looking for the "addMessage("my message")" and "addError("error message text here")" features: https://scriptrunner.adaptavist.com/latest/jira/plugins/automation-for-jira.html#_binding_variables
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Basit,
I suppose you use something like the example in the documentation - https://scriptrunner.adaptavist.com/latest/jira/plugins/automation-for-jira.html
So if you use - in the script runner script -
log.debug "This is a debug message"
Then you should be able to find this message in your application logs. But in order to be able to see debug messages you should first have to set the log level to debug for the ScriptRunner plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thanos,
thanks for your reply. Actually this setting is already in place for our Jira and I am able to see the logs in the application log file. However, it is better for our case that these logs should also appear in the "Audit Log" that is provided within the Automation for Jira add-on. Otherwise everyone who will create or modify some rules will need access to our server with the Jira installation even though the web frontend could be enough... Hope you understand this dilemma :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Basit
Ok I see what you mean
Otherwise everyone who will create or modify some rules will need access to our server with the Jira installation even though the web frontend could be enough
Actually this was out thought and motivation behind View Server Log Files
If Automation tho has a kind of public API that allows you to write to Automation's Audit Log then you could use this as well.
PS. Even tho I believe debug messages belong to application logs and not Audit logs.
Regards, Thanos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thanos,
Actually this was out thought and motivation behind View Server Log Files
This is a good idea. I also thought of this workaround. But it would make me really happy for the future if it was possible to filter certain keywords in the log. Some kind of a 'grep' functionality you know?:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There isn’t any integration between A4J and SR. I wish their was. You might contact Codebarrel and inquire.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jack,
well you can use ScriptRunner as an action but unfortunately it is not possible to use its full potential.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same problem here. Product is very unstable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which product is unstable? If you are seeing an issue you should file a support request. I use A4J in cloud and while there are certainly some areas for improvement I have not found it to be unstable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.