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

Fixes to tag counting logic #8245

Merged
merged 4 commits into from
Aug 4, 2020
Merged

Fixes to tag counting logic #8245

merged 4 commits into from
Aug 4, 2020

Conversation

jywarren
Copy link
Member

@jywarren jywarren commented Aug 4, 2020

Fixes #8244

If this fails properly, we should then add this to line 40 of tag.rb:

    self.count = NodeTag.joins(:node).where(tid: tid).where('node.status = 1').count

@gitpod-io
Copy link

gitpod-io bot commented Aug 4, 2020

@codecov
Copy link

codecov bot commented Aug 4, 2020

Codecov Report

Merging #8245 into main will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8245      +/-   ##
==========================================
+ Coverage   81.70%   81.80%   +0.10%     
==========================================
  Files         100      100              
  Lines        5847     5843       -4     
==========================================
+ Hits         4777     4780       +3     
+ Misses       1070     1063       -7     
Impacted Files Coverage Δ
app/models/node_tag.rb 100.00% <100.00%> (ø)
app/models/tag.rb 97.47% <100.00%> (-0.03%) ⬇️
app/api/srch/search.rb 70.06% <0.00%> (+3.82%) ⬆️
app/services/execute_search.rb 94.44% <0.00%> (+5.55%) ⬆️

@jywarren
Copy link
Member Author

jywarren commented Aug 4, 2020

Great --

 FAIL["test_tag_counting", #<Minitest::Reporters::Suite:0x00000000093e2cc8 @name="TagTest">, 3.483404433000004]
 test_tag_counting#TagTest (3.48s)
        Expected 3 to be nil.
        test/unit/tag_test.rb:30:in `block in <class:TagTest>'

@jywarren
Copy link
Member Author

jywarren commented Aug 4, 2020

OK, good!

 FAIL["test_tag_counting", #<Minitest::Reporters::Suite:0x000000000af08fe8 @name="TagTest">, 13.415067058000005]
 test_tag_counting#TagTest (13.42s)
        Expected: 0
          Actual: 1
        test/unit/tag_test.rb:33:in `block in <class:TagTest>'

Now the fix...

@jywarren jywarren changed the title Update tag_test.rb Fixes to tag counting logic Aug 4, 2020
@jywarren jywarren merged commit b713f0a into main Aug 4, 2020
dms-yondy pushed a commit to dms-yondy/plots2 that referenced this pull request Aug 7, 2020
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
jywarren added a commit that referenced this pull request Aug 12, 2020
* paginate tag page listings (#8243)

* Update _graph.html.erb

* Update show.html.erb

* topic card count fixes for #7965 (#8249)

* fixes for #7965

* count fixes

* Update _topicCard.html.erb

* Delete _related_tags.html.erb (#8247)

* Fixes to tag counting logic (#8245)

* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb

* Spam2: Moderator's Queue  feature (#8196)

* queue feature spam2

* indentation issue

* bulk moderation for comments and tag count in queue

* indentation

* moderator queue

* batch controller

* first-timmer issue

* tag filter

* queue indentation

* all tags filter queue

* Don't let newcomers edit wiki pages (controller-level) (#8250)

* Don't let newcomers edit wiki pages (controller-level)

* Update wiki_controller.rb

* Update wiki_controller_test.rb

* Update wiki_controller_test.rb

* Update wiki_controller_test.rb

* Update wiki_controller_test.rb

* Update wiki_controller.rb

* Update wiki_controller.rb

* Update wiki_controller_test.rb

* Update wiki_controller_test.rb

* Bump rubocop from 0.88.0 to 0.89.0

Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.88.0 to 0.89.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v0.88.0...v0.89.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump codecov from 0.2.3 to 0.2.5

Bumps [codecov](https://github.com/codecov/codecov-ruby) from 0.2.3 to 0.2.5.
- [Release notes](https://github.com/codecov/codecov-ruby/releases)
- [Changelog](https://github.com/codecov/codecov-ruby/blob/master/CHANGELOG.md)
- [Commits](codecov/codecov-ruby@v0.2.3...v0.2.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump rdiscount from 2.2.0.1 to 2.2.0.2

Bumps [rdiscount](https://github.com/davidfstr/rdiscount) from 2.2.0.1 to 2.2.0.2.
- [Release notes](https://github.com/davidfstr/rdiscount/releases)
- [Changelog](https://github.com/davidfstr/rdiscount/blob/master/CHANGELOG.md)
- [Commits](davidfstr/rdiscount@2.2.0.1...2.2.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Adding tags to Modals of Nodes (#8238)

* adding tags in modals of Nodes #8230

* refactored #8230

* fixed tag path in the modal #8230
also fixed extra spacing when no tags on the modal

* update _flags.html.erb (#8237)

Changed "btn btn-xs" to "btn btn-sm"

* adjust opengraph tag

Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
Co-authored-by: Keshav Sethi <36025262+keshavsethi@users.noreply.github.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: renugasaraswathy <renugasaraswathy@gmail.com>
Co-authored-by: siddhama <54734665+siddhama@users.noreply.github.com>
nadimakhtar97 pushed a commit to nadimakhtar97/plots2 that referenced this pull request Sep 21, 2020
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
shubhangikori pushed a commit to shubhangikori/plots2 that referenced this pull request Oct 12, 2020
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
alvesitalo pushed a commit to alvesitalo/plots2 that referenced this pull request Oct 14, 2020
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
piyushswain pushed a commit to piyushswain/plots2 that referenced this pull request Oct 22, 2020
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
ampwang pushed a commit to ampwang/plots2 that referenced this pull request Oct 26, 2021
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* Update tag_test.rb

* Update tag_test.rb

* Update tag_test.rb

* Update tag.rb
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.

Total Tag count on tag stats pages seems incorrect for tag "beach"
1 participant