Can a superuser (ALL authorities) edit an expired event?

In 2.38.2.1 we are facing this issue:

There is an event already created in the system (eventDate 2023-01-25).

The event program (without registration) is configured to “Expiry period Type”=Monthly and “Expiry days”=3.

Today, 2023-03-13, a superuser (Authorities=ALL) tries to edit the event. But when the superuser its the save button in the Capture app, the API returns the error E1047 “Event: {0}, date belongs to an expired period. It is not possible to create such event.”.

Is that the behaviour expected, or a superuser could edit the event, even after the expired period ?

Thanks @ctejo!

I expected that the Superuser will be able to edit the event.

Did you try to use the Tracker Capture app as well?

As far as it is an event program (program without registration), I think that Tracker Capture (TC) can’ be used.

1 Like

Yes, you are right, sorry!! :slight_smile:

Please check if you can reproduce this on play. I think superuser should be able to make the changes so maybe the issue is for a different reason. For example, did you clear cache when switching between users?

Thanks!

I was able to reproduce it in play 2.39.1, user “admin” (superuser role)

I added a new event with event date 2022-01-01 for the event program “Antenatal care visit”

After save, I have edit it without problem.

After, I changed the configuration of the program (“Expiry period type” from “None” to “Monthly”, and “Expiry days” from 0 to 3).

Then, if I try to edit an event, when I click on save, the response is again “Error editing the event, the changes made were not saved”.

Hey @ctejo , just chipping it here :slight_smile: Are you sure your admin has the ALL authority? admin by default doesn’t have it in the play servers, so just wondering.

You are completly right. In play, the admin user has not ALL authority (but it has the authority F_EDIT_EXPIRED).

Sorry, but I cant’ test it further, because the user admin can’t create an user with the System administrator (ALL) userRole, and I don’t know the credentials for any of the users that has the System administrator (ALL) userRole.

I have given full access (ALL) to admin on DHIS 2 Demo - Sierra Leone . You can probably do some tests until tonight when it gets reset. :slight_smile:

Tested just 5 minutes ago :slight_smile:

Same message (the value looks changed in the UI, but if you refresh the page, you can see that the value haven’t changed).

1 Like