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

V18.0.1 : Cannot add time spent #25793

Closed
ludovicandrieux opened this issue Sep 5, 2023 · 2 comments · Fixed by #26405
Closed

V18.0.1 : Cannot add time spent #25793

ludovicandrieux opened this issue Sep 5, 2023 · 2 comments · Fixed by #26405
Labels
Bug This is a bug (something does not work as expected)

Comments

@ludovicandrieux
Copy link

Bug

Cannot add time spent

Environment Version

18.0.1

Environment OS

Debian 10.10

Environment Web server

nginx 1.23.1

Environment PHP

7.3.31

Environment Database

PostgreSQL 13.12

Environment URL(s)

/projet/tasks/time.php?action=createtime

Expected and actual behavior

Expected : When user add time spent, everything is OK
Actual : When user add time spent, there is a crash and error message :
ERREUR: 42P01: la relation « llx_element_time_rowid_seq » n'existe pas LINE 1: SELECT currval('llx_element_time_rowid_seq') ^ LOCATION: RangeVarGetRelidExtended, namespace.c:435

Steps to reproduce the behavior

Go to a project
Choose time spent
Click on add time
Choose values and submit

Attached files

Before add time spent
2023-09-05_093419

After submit
2023-09-05_093813

@ludovicandrieux ludovicandrieux added the Bug This is a bug (something does not work as expected) label Sep 5, 2023
@ludovicandrieux ludovicandrieux changed the title V18.x : Cannot add time spent V18.0.1 : Cannot add time spent Sep 11, 2023
@ludovicandrieux
Copy link
Author

To resolve this issue, you can apply SQL commands directly in PostgreSQL:

CREATE SEQUENCE public.llx_element_time_rowid_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;

ALTER TABLE public.llx_element_time_rowid_seq OWNER TO <your_username_of_owner>;

ALTER SEQUENCE public.llx_element_time_rowid_seq OWNED BY public.llx_element_time.rowid;

ALTER TABLE ONLY public.llx_element_time ALTER COLUMN rowid SET DEFAULT nextval('public.llx_element_time_rowid_seq'::regclass);

SELECT nextval('llx_element_time_rowid_seq');

SELECT pg_catalog.setval('public.llx_element_time_rowid_seq', (SELECT max(rowid)+1 FROM llx_element_time), true);

SELECT currval('llx_element_time_rowid_seq');

You have to change this part : <your_username_of_owner>

@symacx
Copy link

symacx commented Oct 2, 2023

Hello Ludovic,

Indeed, it fixes the issue.
Thank you !
Olivier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants