Small update to LighthousePro

Just a quick note to say I released a minor update to Lighthouse Pro. This last update has a few changes, but the main one is that if you are editing an issue and let your session timeout, after you login your changes are preserved. So if you had entered some lengthy notes, timed out, hit Save, when you login, you changes to the issue are preserved and stored.

There are a few ways you can do this, but here is how I did it. Also note I was only only concerned about people timing out in an issue edit. First off, in login.cfm, I look for a form post from the issue editor:

<cfif structKeyExists(form, "issuetypeidfk")> <cfset session.issueform = duplicate(form)> </cfif>

Then back in view.cfm, the file that handles editing issues, I simply added:

<cfif structKeyExists(session, "issueform")> <cfset structAppend(form, session.issueform)> <cfset structDelete(session, "issueform")> </cfif>

Note that I clear out the session data. This is important so as to not keep restoring the edits for future editing.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments