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

[Instrument] Add support for jsonData instrument in clearInstrument function #7484

Merged
merged 2 commits into from
Jun 16, 2021

Conversation

ridz1208
Copy link
Collaborator

Brief summary of changes

clearInstrument Function gives an error when the instrument has jsonData enabled. this fix adds support for clearInstrument by clear the data from the proper location

PS, make sure to ignore white spaces changes as most changes here are just indentation

Testing instructions (if applicable)

  1. use the API to save an instrument

Link(s) to related issue(s)

@ridz1208 ridz1208 linked an issue Jun 16, 2021 that may be closed by this pull request
@GabrielPelletier
Copy link

Tested this on MCNRR and it all looks good.

$columns = $db->pselect(
"SELECT COLUMN_NAME FROM information_schema.columns
if ($this->jsonData) {
$db->update('flag', ['Data'=>null], ['CommentID' => $this->commentID]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this update be unconditional? The Data column in the flag table exists regardless of whether jsonData is true or not, and the update when saving data in _save isn't conditional.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are correct. Ma bad

@ridz1208 ridz1208 added the Passed manual tests PR has been successfully tested by at least one peer label Jun 16, 2021
@ridz1208
Copy link
Collaborator Author

@driusan changes done

@GabrielPelletier
Copy link

Re-tested after the changes with MCNRR and it works alright.

Copy link
Collaborator

@driusan driusan left a comment

Choose a reason for hiding this comment

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

I can settle for the downgrade from "good" to "alright" if it means it's ready to merge.

@driusan driusan merged commit ead8c10 into aces:23.0-release Jun 16, 2021
@ridz1208
Copy link
Collaborator Author

@driusan I think we should merge before @GabrielPelletier takes it from "alright" to "its not bad"

@GabrielPelletier
Copy link

I like a bit of variation; it makes for richer github Conversations, literature-wise

@ridz1208 ridz1208 added this to the 23.0.4 milestone Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed manual tests PR has been successfully tested by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clear Instrument fails with jsonData=true
3 participants