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!

2 Likes

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.

2 Likes

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.

2 Likes

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 ?

2 Likes

Same question here as @Stephan_Mestach ; we wiped all of our data in a dev server so that we could move with more agility to complete analytics tables iteratively, and now we can’t enter in any data to any pre-existing program. I have tried to re-import programs and other silly things, but no success.

1 Like

if you find the programid uid and programinstanceif you can probably
create the insert needed to fix it

1 Like

I think it would be through the API if not db-access but it’s not possible to use any of the apps that are currently available.