Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back Deployed meta-status #4073

Closed
wants to merge 1 commit into from
Closed

Conversation

dmeltzer
Copy link
Contributor

Fixes a regression from 3.6 where we did not check for assignment before showing status.

Done from web interface, can't test currently but probably works.

Fixes a regression from 3.6 where we did not check for assignment before showing status.

Done from web interface, can't test currently but probably works.
@snipe
Copy link
Owner

snipe commented Sep 29, 2017

This isn't a bug, exactly - we were getting a lot of questions/complaints about that meta status. Maybe we should change the label to "deployed" (from the "deployable" label) if it's assigned?

@snipe
Copy link
Owner

snipe commented Sep 29, 2017

I have a counter-proposal.

screen shot 2017-09-29 at 11 02 07 am

screen shot 2017-09-29 at 11 30 46 am

We include the real status label name, and the meta.

I added a new presenter:

/**
     * @return string
     * This handles the status label "meta" status of "deployed" if
     * it's assigned. Should maybe deprecate.
     */
    public function statusMeta()
    {
        if ($this->model->assignedTo) {
            return strtolower(trans('general.deployed'));
        }
        return $this->model->assetstatus->getStatuslabelType();
    }

and then in our transformer:

'status_label' => ($asset->assetstatus) ? [
                'id' => (int) $asset->assetstatus->id,
                'name'=> e($asset->assetstatus->name),
                'status_type' =>  e($asset->present()->statusMeta),
            ] : null,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants