Commit 058ca93e authored by Project Open's avatar Project Open

Fixed Haigh issue with non-'sequence' ticket_nr method

parent 6313a6c0
......@@ -402,11 +402,11 @@ namespace eval im_ticket {
select max(project_nr::integer)
from im_projects
where project_type_id = [im_project_type_ticket]
and project_nr ~ '^\[0-9\]+$'
and project_nr ~ '^\[0-9\]+\$'
" -default 0]
# Make sure the counter is not behind the current value
while {[db_string lv "select im_ticket_seq.last_value"] < $last_ticket_nr} {
while {[db_string lv "select last_value from im_ticket_seq"] < $last_ticket_nr} {
set ttt [db_string update "select nextval('im_ticket_seq')"]
}
return [expr {$last_ticket_nr + 1}]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment