Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend ticket lock with original create date #6685

Open
dalemonk opened this issue Apr 18, 2024 · 3 comments
Open

Extend ticket lock with original create date #6685

dalemonk opened this issue Apr 18, 2024 · 3 comments

Comments

@dalemonk
Copy link

Description

I'm integrating our time tracking system with our osTicket instance. I've modified /include/staff/ticket-view.inc.php to pick up the lock time on a ticket as the start time and the current time as the end time... however, when the lock is renewed for a ticket, it doesn't renew (as in extending the lock by the Collision Avoidance Duration), rather it creates a new lock with the current time.

Expected behaviour:

  1. View ticket (user)
  2. Create a lock (system) e.g. create time "2024-04-19 10:41:00", expire time "2024-04-19 10:44:00"
  3. Working on the problem (user)
    ....
  4. UI prompts the user to renew the lock and user clicks "Renew" at "2024-04-19 10:43:50"
  5. Lock gets renewed e.g. create time "2024-04-19 10:41:00" (same as original), expire time "2024-04-19 10:46:50"

Expected behaviour:

  1. View ticket (user)
  2. Create a lock (system) e.g. create time "2024-04-19 10:41:00", expire time "2024-04-19 10:44:00"
  3. Working on the problem (user)
    ....
  4. UI prompts the user to renew the lock and user clicks "Renew" at "2024-04-19 10:43:50"
  5. Lock gets renewed e.g. create time "2024-04-19 10:43:50" (essentially a new lock), expire time "2024-04-19 10:46:50"

Versions

Admin panel -> Dashboard -> Information osTicket (v1.15.4)

Server OS:
Linux 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64 GNU/Linux
MariaDB 10.1.48-MariaDB-0+deb9u2 Debian 9.13

Client OS:
macOS Sonoma 14.2.1 (23C71)
Chrome 123.0.6312.124 (Official Build) (arm64)

@JediKev
Copy link
Contributor

JediKev commented Apr 18, 2024

@dalemonk

That’s how the code is setup. See below:

You can see that we acquire a new lock if the current lock doesn’t have a Staff ID or if it is expired. If not, (look below those lines) we call $lock->renew() which renews the existing lock.

Cheers.

@JediKev
Copy link
Contributor

JediKev commented Apr 18, 2024

@dalemonk

Also, you are running an old, unsupported version of osTicket. We currently support v1.17.5 and v1.18.1. I would highly suggest upgrading to one of the latest versions and retest. Make sure you check the new version's requirements as you will need to upgrade PHP and potentially MySQL.

Cheers.

@dalemonk
Copy link
Author

Thanks @JediKev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants