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

Add phases support for Element, fix FamilyInstance phases bug #238

Merged
merged 4 commits into from
May 16, 2024

Conversation

SergeyNefyodov
Copy link
Contributor

@SergeyNefyodov SergeyNefyodov commented May 15, 2024

Summary of the Pull Request

What is this about:

There was a bug: we didn't see ToRoom(Phase), when there was at least one Phase with status Future. But to understand this reason, I needed to add support to Element methods about Phases

Quality Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

github-actions bot commented May 15, 2024

Qodana for .NET

2 new problems were found

Inspection name Severity Problems
Empty statement is redundant 🔶 Warning 1
Invert 'if' statement to reduce nesting ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Comment on lines 67 to 68
if (_familyInstance.GetPhaseStatus(phase.Id) != ElementOnPhaseStatus.Future)
variants.Add(_familyInstance.get_FromRoom(phase), phase.Name);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invert IF to reduse nesting and better readability. Include lines below

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ElementOnPhaseStatus.Future gets an exception, right ?

…s-support

# Conflicts:
#	source/RevitLookup/Core/ComponentModel/Descriptors/FamilyInstanceDescriptor.cs
@Nice3point Nice3point merged commit b82ebef into jeremytammik:dev May 16, 2024
1 of 3 checks passed
@SergeyNefyodov SergeyNefyodov deleted the dev-phases-support branch May 18, 2024 07:55
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.

2 participants