Skip to main content
15-Moonstone
February 23, 2018
Solved

No Event trigger for Remove lock (break lock notification

  • February 23, 2018
  • 1 reply
  • 7377 views

Hi,

we have set up a script that is triggered by the Member.unlockRevision.post event.

It should send a mail if a user's lock is broken by admin.

This works for "downgrade lock" from the sandbox and member history view, but not for the "Member/Locks/Find all locks for a certain user" view - the script is simply not triggered (we have no log output).

 

So this is only triggered when downgrading an exclusive lock - all other actions have to be done via "Member/Locks/Find all locks for a certain user" view.

 

We are on Integrity 10.5.

 

Is this known, corrected in a later version and is there a workaround?

Best answer by awalsh

Posted SPR 7315020 

I've attached the article to your support case. 

 

1 reply

5-Regular Member
February 23, 2018

The default breakLockNotification.js script does not write anything to the server.log file.

I've tested with 10.5 and a modified script to write to the log. My script ran on the Member.unlockRevision.post event for both Downgrade Lock and Remove Lock. 

 

Can you double check your global.events file and try adding a couple lines in the breakLockNotification.js file to output to the server.log.  E.g. :

environmentBean.setMessageCategory("GENERAL");
environmentBean.print(environmentBean.getEventName(), 0 );
environmentBean.print("Lock by user " + lockOwner + " is " + actionString + " by user " + userBean.getUsername(), 0); 

If it's still not working, I suggest opening a ticket with support.

ssaul15-MoonstoneAuthor
15-Moonstone
February 26, 2018

We are using a modified breakLockNotification.js script, too. It writes to a separate logfile.

During downgrade, we get a log output.

During "Remove My lock" for our own user, we get a log output.

Direct "Remove lock" is not possible (MKS124814: Cannot show view information: MKS125606: "Remove Lock" command can only be called from the "Find Locks" view. Use "Downgrade lock" or "Remove My Lock" instead.).

We first have to search locks for the user and then "remove lock" in the result window.

When doing "remove lock" or "downgrade lock" or "Remove my lock" from the result window, we get no log output -> trigger does not seem to be called.

The global event correctly contains

Member.unlockRevision.post=breakLockNotification_adapted.js

 

So it seems that the problem is with the "Find locks" result window which does not trigger the "Member.unlockRevision.post" event.

5-Regular Member
February 26, 2018

That's odd. I'm doing the same thing you are (testing with 10.5 and removing or downgrading the lock from the Find Locks window) and the event is definitely being triggered in my test environment.

 

Can you attach your javascript for me to test with?  Do you have any hotfixes installed?