> On Jul 11, 2020, at 6:58 AM, sebb <seb...@gmail.com> wrote:
> 
> On Sat, 11 Jul 2020 at 14:38, Craig Russell <apache....@gmail.com> wrote:
>> 
>> I believe this change is confusing.
>> 
>> There is no way to reach the "else" clause if there is already a request.
> 
> Huh?
> The else clause is reached if the committer status is not Active.

As I wrote the code, the else belongs to the  
if committer.forms['emeritus_request']

not to the 
if committer.member.status.include? 'Active'

So if there is an outstanding emeritus request, the member can rescind it. If 
no outstanding emeritus request, the member can request it.

Craig
> 
>> Please explain or revert.
> 
> If there is already an emeritus request outstanding, the change
> prevents the request button from being shown.
> 
> The else clause does nothing in this case
> 
> 
>> Thanks,
>> Craig
>> 
>>> On Jul 11, 2020, at 5:36 AM, s...@apache.org wrote:
>>> 
>>> +              emeritus_file_url = nil # for return by hidden form item
>>>              # These actions are only for the person's own use
>>>              if owner
>>>                if committer.member.status.include? 'Active'
>>>                  if committer.forms['emeritus_request']
>>>                    emeritus_file_url = committer.forms['emeritus_request']
>>>                    _button.btn.btn_primary 'rescind emeritus request',
>>> -                      data_emeritus_file_url:emeritus_file_url,
>>>                      name: 'action', value: 'rescind_emeritus'
>>>                  else
>>> -                    _button.btn.btn_primary 'request emeritus status',
>>> -                      data_emeritus_person_name:@@person.public_name,
>>> -                      name: 'action', value: 'request_emeritus'
>>> +                    unless committer.forms['emeritus_request'] # already 
>>> requested
>>> +                      _button.btn.btn_primary 'request emeritus status',
>>> +                        name: 'action', value: 'request_emeritus'
>>> +                    end
>>>                  end
>> 
>> Craig L Russell
>> c...@apache.org
>> 

Craig L Russell
c...@apache.org

Reply via email to