You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by Craig Russell <ap...@gmail.com> on 2020/07/11 13:37:59 UTC
Re: [whimsy] branch master updated: ensure file url is actually
passed back
I believe this change is confusing.
There is no way to reach the "else" clause if there is already a request.
Please explain or revert.
Thanks,
Craig
> On Jul 11, 2020, at 5:36 AM, sebb@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
clr@apache.org
Re: [whimsy] branch master updated: ensure file url is actually
passed back
Posted by sebb <se...@gmail.com>.
On Sat, 11 Jul 2020 at 16:18, Craig Russell <ap...@gmail.com> wrote:
>
>
>
> > On Jul 11, 2020, at 6:58 AM, sebb <se...@gmail.com> wrote:
> >
> > On Sat, 11 Jul 2020 at 14:38, Craig Russell <ap...@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.
Sorry, my bad.
I see now.
Reverted
> 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, sebb@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
> >> clr@apache.org
> >>
>
> Craig L Russell
> clr@apache.org
>
Re: [whimsy] branch master updated: ensure file url is actually
passed back
Posted by Craig Russell <ap...@gmail.com>.
> On Jul 11, 2020, at 6:58 AM, sebb <se...@gmail.com> wrote:
>
> On Sat, 11 Jul 2020 at 14:38, Craig Russell <ap...@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, sebb@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
>> clr@apache.org
>>
Craig L Russell
clr@apache.org
Re: [whimsy] branch master updated: ensure file url is actually
passed back
Posted by sebb <se...@gmail.com>.
On Sat, 11 Jul 2020 at 14:38, Craig Russell <ap...@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.
> 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, sebb@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
> clr@apache.org
>