- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2017 11:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2017 04:48 AM
It already submitted 16 Sep 2014: [SHA-1363] Add a warning in the Rules UI that "On Delete" rules won't run in the background - Alfres...
Hope this issue will be solved sooner!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2017 06:51 AM
I use a "on content deleted or moved" rule, and it's also working on deleting content. version is 5.2 community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2017 06:46 PM
Hmm.... after reading your comments, I created a simple script to write a log file and works (move and deleted).
I will check my script again why it happens.
I also use 5.2 community version.
Thank you.-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2017 07:49 PM
Hi,
After check my script and the rule, I found the problem or might 'bug' finally.
The problem is on "Run in background" option of rule.
When it disabled, the the deleting action will trigger the rule, but when it activated/checked the deleting action will not trigger the rule.
Below is my simple script which will create the log file with time stamp.
Hi Martin Ehe, If you don't mind, I'd like you to test my script.
function main()
{
var currentDate = new Date();
var logFile = userhome.childByNamePath("myCreateLogs.txt");
if (logFile == null) {
logFile = userhome.createFile("myCreateLogs.txt");
}var currentDate = new Date();
logFile.content = "Log File: "+currentDate+"\n";
logFile.content += "Folder Name="+space.properties.name;
}main();
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2017 03:34 AM
Hi Bayu,
You're right. The script is not executed if it's run in the background. It seems that the scripts are not triggered if "onDelete" is called in the background.
I even tried the "error" script mechanism, to see if there's a problem.
Tried your script and the script
logger.system.out("rule called");
and an "error" script of the same complexity
logger.system.out("an error occurred");
When removing the "run in background" option, your script runs fine and creates the log file in my home-dir.
Seems like we have a bug...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2017 04:16 AM
Hi Martin,
Thank you. If it hasn't been submitted to the bug report, I will report it.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2017 04:48 AM
It already submitted 16 Sep 2014: [SHA-1363] Add a warning in the Rules UI that "On Delete" rules won't run in the background - Alfres...
Hope this issue will be solved sooner!
