Skip to content

Conversation

@marcelofabri
Copy link
Collaborator

By calling setObject before shouldEnableForRole, we allow methods like shouldAppearInListView in a PhabricatorCustomField subclass to access getObject() -- and more importantly, getObject()->getRepository().

This will allow a custom field to use information about the current repository to decide whether it should be shown or hidden.

If the field is indeed disabled, the unset later should clear up everything from $field, including its $object reference.

@yi-lu yi-lu merged commit 4368724 into master Mar 5, 2024
@yi-lu yi-lu deleted the marcelo/custom-field-set-object branch March 8, 2024 17:42
yi-lu added a commit that referenced this pull request Mar 8, 2024
…eld-set-object"

This reverts commit 4368724, reversing
changes made to 9ab3223.
yi-lu added a commit that referenced this pull request Mar 8, 2024
…eld-set-object"

This reverts commit 4368724, reversing
changes made to 9ab3223.
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.

3 participants