Video Screencast Help

Edit Incident Form Over-writing Each Other

Created: 19 Mar 2014 • Updated: 25 Mar 2014 | 7 comments
Lark's picture
This issue has been solved. See solution.

If two users were to use the Edit Incident form (a process type action for incident management) at the same time it seems that the second person to click the Save Incident button over-writes any changes the first made.

I know I could build some improved checking into that workflow using last modified but is there an easier way?

ServiceDesk 7.5 SP1

Operating Systems:

Comments 7 CommentsJump to latest comment's picture

Instead of improved checking, I'd be inclined to set a lock on the incident when the edit form is opened. Once it's saved, unlock it. You'd obviously also need a simple check to see if it's locked when attempting to edit.

If a post solves your issue, please mark it as a solution. It makes these forums better for everyone.

TGiles's picture

Workflow has a lease functionality that is suppose to lock an incident from being edited by additional users once a users starts to work on the incident. The lease time is configured in the master settings. As long as this is properly set you shouldn't have issues with multiple users editing the same project.

Lark's picture

Thanks for the replies.

I tested this before posting on a SD install that was pretty much "out of box" default and the Edit Incident form was definitely allowing edits and over-writing as described.

"Edit Incident" is a Process type Action.  I can see the Workflow Settings > Task Lease Time (in min) setting in the master portal settings but could it be that this doesn't affect process type actions?'s picture

That was my thought as well, but I didn't have a chance to look at the workflow to verify it. If it doesn't though, you could change the workflow to add in a lease like I suggested above.

If a post solves your issue, please mark it as a solution. It makes these forums better for everyone.

Lark's picture

Do you have any examples of adding in a lease?  I'm compfortable with adding a "Leased" property to an extended data set and using that but I'm wondering if you have a better way?'s picture

I don't have a "better" way. I'd be inclined to add the property to your data set. The other option I can think of would be to find an open task on the IM, set a lease on the task (using the existing component for that) and break the lease when you are done (again, existing component). You'd need to check all open tasks on the IM before you leased it to make sure it wasn't already leased, though, so I'm guessing it'd be kinda slow compared to using an existing data set.

If a post solves your issue, please mark it as a solution. It makes these forums better for everyone.

Lark's picture

Thanks - I really appreciate your input.

I'm pretty tempted by using the data set but I'm also aware I'd need to back it up with a means of removing that lease for situations where it gets set and somehow a user manages to break out of the pta form without un-setting it.  Yet another workflow!

I'll look at the existing task lease option too though.