← Back to team overview

dhis2-devs team mailing list archive

Missing two event statuses

 

Hi devs,

I am currently developing an application on top of DHIS2 and we need to
maintain three statuses for each event. However I have noticed that
AbstractEventService considers only ACTIVE, COMPLETED, SKIPPED, SCHEDULE
statuses and disregard OVERDUE and VISITED.  In our case it makes more
sense if we can use the three statuses ACTIVE, COMPLETED and VISITED. Any
way we are currently using SCHEDULE status to represent VISITED. Are they
intentionally neglected?


​If else block in AbstractEventService:updateEvent() ends as follows,

else if ( event.getStatus() == EventStatus.SKIPPED ) {
programStageInstance.setStatus( EventStatus.SKIPPED );
} else if ( event.getStatus() == EventStatus.SCHEDULE ) {
programStageInstance.setStatus( EventStatus.SCHEDULE );
}

Why it is not just,

else{
programStageInstance.setStatus(event.getStatus() );
}​

after properly handling ACTIVE and COMPLETED statuses in upper if/else
blocks? Are these two statuses reserved for a special purpose?

Thanks & Regards,

Chathura Widanage,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka