URGENT - An error occurs while saving an event

Hey Everyone/@Gassim

Is anyone else having trouble saving an event (without registration program)? V-2.36.6

When we try to save an event, we get the error ‘No programme instance found for event’.

The bug has been reported on JIRA(#12817) and can be reproduced on several versions. This is a VERY CRUCIAL bug for us, as we mostly use event programmes (without registration), and as a result of this error, we had to stop data entry into the system.

Please let me know if anyone has found a solution to this problem or when it will be resolved.

many thanks!

1 Like

Facing the same issue, any updates on this?

1 Like

Hi
Thank you for reporting this issue. This is not a bug in the software since creating the event program with same configuration and assigning the same data elements doesn’t reproduce the same issue. See video below:

This issue probably needs debugging the database tables related to the program with the issue. I will triage this to the developer team. Thank you for your patience!

We created the programinstance for these programmes in the database and it started working.
Thank you for all your support.

1 Like

Hi, we are facing the exact same issue. Can you elaborate more - how exactly you created records in programinstance table?
I see the Jira tickets and see that these are solved! Not sure how we consider this as solved - when the solution is hacking inside database tables. We are working on a Government DHIS2 - and they would never let us go inside the database directly.

More help or insight would be really appreciated.

1 Like

So it happened to me too.

The problem, we cleared all program data (tracker and simple event)
The bad news is that some programinstance record needs to remain (apparently dhis2 can’t create them if he doesn’t find them)

This is the insert statement I used to solve my import issue.

 INSERT INTO programinstance(programinstanceid, uid, created, lastupdated, createdatclient, lastupdatedatclient, incidentdate, enrollmentdate, enddate, followup, completedby, deleted, storedby, status, trackedentityinstanceid, programid, organisationunit
 id, geometry, createdbyuserinfo, lastupdatedbyuserinfo) VALUES(2, 'D4BbUq4y1Os', '2023-03-27 15:16:18.593', '2023-03-27 15:16:18.593', '2023-03-27 15:16:18.593', '2023-03-27 15:16:18.593', '2023-03-27 15:16:18.591', '2023-03-27 15:16:18.591', null, fals
 e, null, false, 'system-process', 'ACTIVE', null, 208, null, null, null, null);

the only “important” infos are probably the programid, uid, programinstanceid
and the “default values”)

hope it might help someone in 8 months.

@Gassim is there a way to do that programmaticaly (with db access) ?

ex through the administration app or maintenance app ?