← Back to team overview

dhis2-devs team mailing list archive

Re: OpenFuturePeriods issue with DHIS 2 v 2.21 Upgrade

 

Thanks for the explanation Lars, that makes sense.

Cheers,

Lorill

On Tue, Oct 27, 2015 at 9:14 PM, Lars Helge Øverland <larshelge@xxxxxxxxx>
wrote:

> Hi Lorill,
>
> this is admittedly a bit confusing but expected behavior per now.
>
> In 2.21 we have made the rules for data import a bit stricter and made it
> consistent with the rules for direct data entry. The rule is that by
> default you cannot enter data for a period for which the end date is in the
> future (i.e period is not over). This is done to prevent people from
> entering data before the period is over, and makes sense e.g. for service
> delivery data (you cannot enter number of people treated for X before the
> period is over). For some types of data, e.g. population data, this is not
> ideal, as you want to enter population for future periods. To handle that
> you can set the "open future periods" to a value higher than 0.
>
> So you are correct in that this behavior has changed in 2.21, and that is
> seems a bit strange. That said, given the logic explained above it gives
> you better control of what data is imported. E.g. when you allow regular
> users to import data you want to impose stricter control over the data that
> can be imported. So we plan to keep this constraint in place for now - you
> can just adjust the "allow future periods" value to work around it.
>
> regards,
>
> Lars
>
>
>
>
>
>
> On Tue, Oct 27, 2015 at 6:52 PM, Lorill Crees <lcrees@xxxxxxxxxx> wrote:
>
>> Hi,
>>
>> We're in the process of testing out an upgrade to v 2.21 and are
>> encountering a new issue with the upload of data values via the API in
>> regards to the openFuturePeriods field.
>>
>> The dataset we're uploading data to is set to yearly data, and the data
>> we are uploading has a period of "2015". The openFuturePeriods field is set
>> to "0". When uploading we get the error:
>> "Data element does not allow for future periods through data sets:
>> y8oCRZx5gMs"
>>
>> Testing setting the openFuturePeriods to "1" gets rid of the error.
>>
>> However, in v 2.20 we could upload data for 2015 (current year) with no
>> problem when the openFuturePeriods was set to "0".
>>
>> Has something changed in the logic for how dates are calculated for
>> openFuturePeriods? We wouldn't consider the current year to be a future
>> year.
>>
>> Please help!
>>
>> Thanks,
>>
>> Lorill
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Lars Helge Øverland
> Lead developer, DHIS 2
> University of Oslo
> Skype: larshelgeoverland
> http://www.dhis2.org <https://www.dhis2.org>
>
>

References