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

[stable10] Backport of Fix systemtatgs get,create and update API #34610

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

sharidas
Copy link
Contributor

Fix systemtags get, create and update API.
Due to recent changes made to add static tags,
the API changes are not compatible with the
older version. Hence to make them work as
before, minor changes are made.

Signed-off-by: Sujith H [email protected]

Description

Because of recent changes made to add static tags, there were changes made to getTag, createTag and updateTag. As a result they were not compatible with the older versions of oC. For example: when any of these methods were called by the user without last argument userEditable, the results were not as expected. The user gets result which were incorrect. Hence this change would help to rectify this problem. The API's should not break.

Related Issue

Motivation and Context

Fix the API breakage that happened in the systemtags for getTag, createTag and updateTag methods.

How Has This Been Tested?

  • Tested with unit test.
  • Tested by adding small snippet code to create tag, get tag and update it and verify. Sample code :
\OC::$server->getSystemTagManager()->createTag('invisibleTag', false, false);
$tag = \OC::$server->getSystemTagManager()->getTag('invisibleTag', false, false);
\OC::$server->getSystemTagManager()->updateTag($tag->getId(), 'visibleTag', true, true);

And the output captured for the values in $tag:

name = invisibleTag
UserVisible = 0
UserAssignable = 0
UserEditable 0

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

Fix systemtags get, create and update API.
Due to recent changes made to add static tags,
the API changes are not compatible with the
older version. Hence to make them work as
before, minor changes are made.

Signed-off-by: Sujith H <[email protected]>
@sharidas sharidas self-assigned this Feb 25, 2019
@sharidas sharidas added this to the development milestone Feb 25, 2019
@sharidas
Copy link
Contributor Author

Original PR: #34604

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@codecov-io
Copy link

Codecov Report

Merging #34610 into stable10 will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #34610      +/-   ##
==============================================
+ Coverage       63.99%   63.99%   +<.01%     
- Complexity      19223    19229       +6     
==============================================
  Files            1272     1272              
  Lines           75703    75712       +9     
  Branches         1291     1291              
==============================================
+ Hits            48446    48455       +9     
  Misses          26878    26878              
  Partials          379      379
Flag Coverage Δ Complexity Δ
#javascript 53.23% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.14% <100%> (ø) 19229 <15> (+6) ⬆️
Impacted Files Coverage Δ Complexity Δ
lib/private/SystemTag/SystemTagManager.php 96.25% <100%> (+0.14%) 55 <15> (+6) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6054d4b...763c783. Read the comment docs.

1 similar comment
@codecov-io
Copy link

codecov-io commented Feb 25, 2019

Codecov Report

Merging #34610 into stable10 will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #34610      +/-   ##
==============================================
+ Coverage       63.99%   63.99%   +<.01%     
- Complexity      19223    19229       +6     
==============================================
  Files            1272     1272              
  Lines           75703    75712       +9     
  Branches         1291     1291              
==============================================
+ Hits            48446    48455       +9     
  Misses          26878    26878              
  Partials          379      379
Flag Coverage Δ Complexity Δ
#javascript 53.23% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.14% <100%> (ø) 19229 <15> (+6) ⬆️
Impacted Files Coverage Δ Complexity Δ
lib/private/SystemTag/SystemTagManager.php 96.25% <100%> (+0.14%) 55 <15> (+6) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6054d4b...763c783. Read the comment docs.

@PVince81 PVince81 merged commit e0ce02e into stable10 Feb 25, 2019
@delete-merged-branch delete-merged-branch bot deleted the systemtag-api-fix-stable10 branch February 25, 2019 15:46
@PVince81 PVince81 modified the milestones: development, QA Apr 12, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants