Issue 18262

Support modification of "membership start"

18262
Reporter: cgendreau
Type: Bug
Summary: Support modification of "membership start"
Priority: Unassessed
Resolution: Done
Status: Done
Created: 2016-02-25 12:27:36.715
Updated: 2017-02-07 14:03:20.529
Resolved: 2017-02-07 14:02:52.657
        
Description: Currently membershipStart can no be changed in the UI.

The main reason is that we stored this field in text format that is not really optimal to work with (e.g. February 2001) and it makes the field value error prone. We decided to not allow edits on this field until we change the format.

The 2 options are:
 - Store a date at the first date on the month
 - Store an ISO partial date (e.g. 2001-02) as char(7) with regex


]]>
    


Author: cgendreau
Created: 2016-07-26 14:41:05.525
Updated: 2016-07-26 14:41:05.525
        
From this [commit|https://github.com/gbif/directory/commit/c95255c01283ca84535a39cb0b3c33743cbd9e51], membershipStart must be an ISO partial date in the form of YYYY-MM.

A database migration is required to change all the current values.
    


Author: cgendreau
Created: 2016-07-26 15:56:58.555
Updated: 2016-07-26 15:56:58.555
        
[migration script|https://github.com/gbif/directory/commit/57bcf510e8d8d32d270eb1eb4876a96e8d091cf9] is now ready.
[~hoefft] you can now allow user to enter the membership start date as YYYY-MM, the server API will validate it.

    


Author: cgendreau
Created: 2016-08-11 10:48:15.872
Updated: 2016-08-11 10:49:14.218
        
[~bko@gbif.org], this change will probably affect pages like http://www.gbif.org/participation/participant-list since the Directory API will return a different response for /participant.

{code}
membershipStart: "February 2016"
{code}
will become
{code}
membershipStart: "2016-02"
{code}
    


Author: bko@gbif.org
Created: 2016-08-16 13:46:59.212
Updated: 2016-08-16 13:46:59.212
        
PHP strtotime() seems parsing the new string pretty well:
http://php.net/manual/en/function.strtotime.php

Relevant pages checked.
    


Author: cgendreau
Comment: Moved to https://github.com/gbif/directory/issues/6
Created: 2017-02-07 14:03:20.529
Updated: 2017-02-07 14:03:20.529