Opened 3 days ago

Last modified 3 days ago

#450 new defect

edit_proj leaves a stale days_to_cutoff after changing a project's cutoff date ("less than -1353 days until its termination date")

Reported by: Eric Swenson Owned by: Eric Swenson
Priority: minor Milestone: MR12.10
Component: Administration Version: MR12.5
Keywords: Cc:

Description

A project was past its cutoff date, so logins were refused:

l ejs PDO
Password:
This is your 2nd interactive login instance.
Your project's account is past its termination date.

After edit_proj changed the project's cutoff date to 12/31/2026 and the SAT was installed, the login succeeded but printed:

Your project's account has less than -1353 days until its termination date.

The login warning (act_ctl_'s cutoff_warning) prints project.days_to_cutoff from the SAT when it is less than the warning threshold (10 days by default). Only daily_summary, part of the accounting run, sets that field: 1 + (cutoff - today) in days, along with the cutoff code (T once the date has passed).

When edit_proj_ (bound_admin_rtnes_) changes the cutoff date, it sets the requisition file's date and clears the SAT's cutoff code (Nsate.cutoff = " "), which allows logins again. It leaves days_to_cutoff at the value daily_summary computed from the old date. So every login prints a warning with that stale, negative count until daily_summary next runs.

The fix is to update edit_proj_ to that when the cutoff date is changed, it also sets days_to_cutoff for the new date as daily_summary does. Nonbill projects are skipped; daily_summary gives them 131071, which never warns.

Workaround: run daily_summary (the accounting run), or wait for the next one.

Change History (1)

Note: See TracTickets for help on using tickets.