Skip to content

Fix #4205 - WorkspaceObject::setString allows setting invalid names for ModelObjects#4206

Closed
jmarrec wants to merge 4 commits intodevelopfrom
4205_SetString_WorkspaceObject
Closed

Fix #4205 - WorkspaceObject::setString allows setting invalid names for ModelObjects#4206
jmarrec wants to merge 4 commits intodevelopfrom
4205_SetString_WorkspaceObject

Conversation

@jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Feb 15, 2021

Pull request overview

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Checked behavior in OpenStudioApplication, adjusted policies as needed (src/openstudio_lib/library/OpenStudioPolicy.xml)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

@jmarrec jmarrec added component - Utilities Other Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels Feb 15, 2021
@jmarrec jmarrec self-assigned this Feb 15, 2021
@macumber
Copy link
Contributor

This and #4211 are trying to do the same thing, we should consolidate them

std::string value = encodeString(_value);

if (m_iddObject.hasNameField() && (index == m_iddObject.nameFieldIndex())) {
if (m_iddObject.hasNameField() && (index == m_iddObject.nameFieldIndex().get())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I missed this in my PR, I will update mine too

macumber added a commit to openstudiocoalition/OpenStudio that referenced this pull request Feb 20, 2021
@jmarrec
Copy link
Collaborator Author

jmarrec commented Feb 22, 2021

This and #4211 are trying to do the same thing, we should consolidate them

If you have pulled everything from this PR, then I can close this one

@jmarrec jmarrec closed this Feb 22, 2021
@jmarrec jmarrec deleted the 4205_SetString_WorkspaceObject branch February 22, 2021 18:06
jmarrec pushed a commit to openstudiocoalition/OpenStudio that referenced this pull request Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component - Utilities Other Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WorkspaceObject::setString allows setting invalid names for ModelObjects

3 participants

Comments