I have a page that I have built that allows me to change the status of an asset by clicking a colored box (coorisponding to the assets status color) changing live to under construction, and under construction to live. Here are the settings that are conflicting:
Under Construction Trigger:
Event:
Asset Accessed
Condition:
Access Permission: write
Tree Location: id#8844
Asset Status: Live
URL Matches: status
Action:
Set Status:Under Construction
Live Trigger:
Event:
Asset Accessed
Condition:
Access Permission: write
Tree Location: id#8844
Asset Status: Under Construction
URL Matches: status
Action:
Set Status:Live
Now, I know they are conflicting as the change from live to under construction works, but the under construction to live does not. But when I disable that trigger, changing from under construction to live now works.
Is there something I have done wrong here that is making them conflict?
You didn't mention any error message, so they may be being run in order. So when you go from UC to Live, the next trigger fires and goes from Live to UC.
Check the logs screen of the asset and look at the asset.status entries. See if you are getting two entries.
[quote]You didn't mention any error message, so they may be being run in order. So when you go from UC to Live, the next trigger fires and goes from Live to UC.
Check the logs screen of the asset and look at the asset.status entries. See if you are getting two entries.[/quote]
No, I am not getting any errors, which is strange. Are you saying that it could be going into a loop, because it keeps going from UC to Live, then Live to UC?
I checked the log, and it does not show two entries.
Is this logical how I have set these triggers up? I thought it was a good way to do it, but it might be flawed.
Would changing the order of the conditions matter?
The order of conditions doesn't matter because they all must be matched.
When you say the log does not show two entries (UC -> LIVE, LIVE -> UC) do you see any entries for the assets that these triggers are firing on? I just want to make sure your log entries are being recorded before we can use them as a guide.
[quote]The order of conditions doesn't matter because they all must be matched.
When you say the log does not show two entries (UC -> LIVE, LIVE -> UC) do you see any entries for the assets that these triggers are firing on? I just want to make sure your log entries are being recorded before we can use them as a guide.[/quote]
Ok Greg, I tested it again, then checked the logs and I was wrong. It is showing that the asset has two entries:
2007-11-15 13:55:08 Nicholas Hubbard Asset Status Changed
The status of "Nic's Test" was successfully changed from "Live" to "Under Construction"
2007-11-15 13:55:08 Nicholas Hubbard Asset Status Changed
The status of "Nic's Test" was successfully changed from "Under Construction" to "Live"
So, I guess you were right, and I might have to find a different solution to this.
I think you need this feature request:
http://bugs.matrix.squiz.net/view_bug.php?bug_id=2358
You basically want to stop all other triggers once your first trigger has run.
[quote]I think you need this feature request:
http://bugs.matrix.squiz.net/view_bug.php?bug_id=2358
You basically want to stop all other triggers once your first trigger has run.[/quote]
I see, that is probably it. I will have to find a workaround for this.