Skip to content

Conversation

@juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Oct 12, 2023

Fix incompatible constructor arguments for the activity classes by using the dependency injection container get method to automatically construct it.

Relevant upstream change nextcloud/activity#1309 but the adjustment here makes it less error prone for further changes.

Related WorkPackage:

This PR fixes: https://community.openproject.org/projects/nextcloud-integration/work_packages/50507/activity

@juliusknorr juliusknorr added bug Something isn't working 3. to review labels Oct 12, 2023
@juliusknorr
Copy link
Member Author

Not sure about the CI failures, seem to also be the case on the master branch

@SwikritiT
Copy link
Contributor

SwikritiT commented Oct 12, 2023

Not sure about the CI failures, seem to also be the case on the master branch

yes, that's related to psalm unrelated to this PR changes.

@wielinde
Copy link
Collaborator

@juliushaertl Thank you for the PR. Could you please base the PR against the branch release/2.4? That is the branch for the next patch level release of the plugin.

@juliusknorr juliusknorr force-pushed the bugfix/noid/27.1.2-activity-classes branch from 061ee0b to 6485232 Compare October 12, 2023 10:34
@juliusknorr juliusknorr changed the base branch from master to release/2.4 October 12, 2023 10:34
@juliusknorr juliusknorr force-pushed the bugfix/noid/27.1.2-activity-classes branch from 6485232 to 2417789 Compare October 12, 2023 10:34
@juliusknorr
Copy link
Member Author

@wielinde Done. Now based on release/2.4

@juliusknorr
Copy link
Member Author

I also amended a bit more cleanup of properties that are no longer needed.

@juliusknorr juliusknorr force-pushed the bugfix/noid/27.1.2-activity-classes branch from 2417789 to edfad53 Compare October 12, 2023 10:38
@SwikritiT
Copy link
Contributor

SwikritiT commented Oct 13, 2023

I've pushed a commit to fix the unit tests 6b51527
The CI is green when it is disabled in master https://github.com/nextcloud/integration_openproject/actions/runs/6503810966

@SwikritiT SwikritiT force-pushed the bugfix/noid/27.1.2-activity-classes branch from 6b51527 to 58cb1be Compare October 13, 2023 08:26
@wielinde
Copy link
Collaborator

@SwikritiT did anybody also test this PR on the older, supported Nextcloud versions? If yes, please release it as a patch level release

@SwikritiT
Copy link
Contributor

@SwikritiT did anybody also test this PR on the older, supported Nextcloud versions? If yes, please release it as a patch level release

We run the tests on all the supported versions and the API tests are passing in all of them. But we can do a quick manual test on all the versions as well

juliusknorr and others added 2 commits October 16, 2023 14:14
Signed-off-by: Swikriti Tripathi <[email protected]>
@SwikritiT SwikritiT force-pushed the bugfix/noid/27.1.2-activity-classes branch from 58cb1be to 6588c72 Compare October 16, 2023 08:29
@github-actions
Copy link

JS Code Coverage

Coverage after merging bugfix/noid/27.1.2-activity-classes into release/2.4 will be
87.93%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   adminSettings.js0%0%0%0%1, 1, 10–19, 2, 20–25, 3–9
   bootstrap.js0%0%0%0%1, 1–7
   dashboard.js0%0%0%0%1, 1, 10–19, 2, 20–25, 3–9
   fileActions.js0%0%0%0%1, 1, 10–17, 2–9
   personalSettings.js0%0%0%0%1, 1, 10–19, 2, 20–25, 3–9
   projectTab.js0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50–59, 6, 60–66, 7–9
   reference.js0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50–59, 6, 60, 7–9
   utils.js63.64%33.33%50%66%10–14, 17–26, 6–9
src/components
   AdminSettings.vue99.29%95.60%85.19%99.91%1, 1, 1, 1, 1
   OAuthConnectButton.vue99.17%87.50%100%100%1
   PersonalSettings.vue98.87%93.33%85.71%100%1
src/components/admin
   FieldValue.vue97.12%83.33%100%98.89%1, 23, 23
   FormHeading.vue97.66%75%100%99.36%1, 1, 34, 34
   ProjectFolderError.vue96.83%80%100%98.21%1, 1
   TextInput.vue99.25%95%88.89%100%1
src/components/icons
   ClippyIcon.vue93.18%50%50%97.50%1, 1
   OpenProjectIcon.vue93.75%100%0%96.77%1
src/components/settings
   CheckBox.vue92.45%80%66.67%97.62%1, 1
   SettingsTitle.vue94.74%50%100%97.14%1, 1
src/components/tab
   EmptyContent.vue97.04%78.95%100%99.32%1, 1, 1, 33, 33
   SearchInput.vue99.19%88.89%80%100%1
   WorkPackage.vue98.36%40%100%99.33%1, 1, 1, 43, 43
src/utils
   workpackageHelper.js94.21%88%100%95.65%17–19, 48, 48–50
src/views
   Dashboard.vue98.97%71.43%100%99.65%1, 1, 1
   ProjectsTab.vue99.74%93.75%100%100%23
   WorkPackagePickerElement.vue0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50–59, 6, 60–69, 7, 70–79, 8, 80–89, 9, 90–96
   WorkPackageReferenceWidget.vue0%0%0%0%1, 1, 10, 100–109, 11, 110–119, 12, 120–129, 13, 130–132, 14–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50–59, 6, 60–69, 7, 70–79, 8, 80–89, 9, 90–99

@github-actions
Copy link

PHP Code Coverage

Coverage after merging bugfix/noid/27.1.2-activity-classes into release/2.4 will be
56.91%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
server/apps/integration_openproject/lib
   Capabilities.php0%100%0%0%19, 26–29
server/apps/integration_openproject/lib/AppInfo
   Application.php11.11%100%25%9.38%100, 102–104, 108–111, 113, 117–122, 133, 137, 69–71, 74, 78, 81, 85, 87, 91, 96, 98–99
server/apps/integration_openproject/lib/BackgroundJob
   RemoveExpiredDirectUploadTokens.php0%100%0%0%42, 44–46, 55–56
server/apps/integration_openproject/lib/Controller
   ConfigController.php66.40%100%50%67.36%134, 151–152, 154, 156–158, 160–161, 166–167, 169, 219, 280, 369–370, 373–374, 504–507, 509–510, 513, 521, 532, 546–548, 563–567, 569–570, 572–575, 577–579, 597–602, 604–605, 607–609, 612, 614–617, 619–621, 635, 644–647, 649–652, 662–667
   DirectDownloadController.php0%100%0%0%36–38, 53–55, 57, 60–61
   DirectUploadController.php71.43%100%100%70.43%131–132, 177, 190, 194–197, 199, 209, 216, 232–234, 236–237, 240–242, 248, 250, 255–256, 263–264, 267–268, 271–272, 288–289, 309, 314, 320
   FilesController.php76.77%100%85.71%76.09%209–210, 261, 267, 269–271, 273, 275, 286–288, 291–292, 294–295, 299–302, 305, 311
   OpenProjectAPIController.php82.27%100%73.33%82.93%138, 175, 192–195, 199, 203, 205–210, 212, 221–224, 227, 229, 231–234, 236–237, 242, 254, 263, 281, 290, 555, 557, 95
server/apps/integration_openproject/lib/Dashboard
   OpenProjectWidget.php0%100%0%0%101–102, 104–108, 116, 123–124, 126, 128–129, 131–132, 134, 137–138, 140–141, 143, 69–73, 80, 87, 94
server/apps/integration_openproject/lib/Exception
   OpenprojectErrorException.php100%100%100%100%
   OpenprojectFileNotUploadedException.php100%100%100%100%
   OpenprojectGroupfolderSetupConflictException.php100%100%100%100%
   OpenprojectResponseException.php100%100%100%100%
   OpenprojectUnauthorizedUserException.php0%100%0%0%16
server/apps/integration_openproject/lib/Listener
   BeforeGroupDeletedListener.php0%100%0%0%48, 56–57, 60–63
   BeforeNodeInsideOpenProjectGroupfilderChangedListener.php0%100%0%0%40–42, 46–51, 53–58, 60, 62, 66
   BeforeUserDeletedListener.php0%100%0%0%48, 55–56, 58–61
   LoadSidebarScript.php0%100%0%0%100, 102, 104, 106–108, 110, 112, 114–115, 117–118, 120, 122, 75–81, 83–84, 86–87, 89–90, 96–97, 99
   OpenProjectReferenceListener.php0%100%0%0%53–54, 58–59, 62–63, 65, 67
   UserChangedListener.php0%100%0%0%52, 59–60, 63–68
server/apps/integration_openproject/lib/Migration
   Version2001Date20221213083550.php0%100%0%0%47, 57, 60, 63, 67, 70, 73, 77–79, 81
   Version2310Date20230116153411.php0%100%0%0%46, 49–52, 54–56, 60, 64, 68, 72, 76, 81–82, 84
   Version2400Date20230504144300.php0%100%0%0%47, 57, 60
server/apps/integration_openproject/lib/Reference
   WorkPackageReferenceProvider.php17.02%100%10%18.92%102, 109–112, 115–117, 120, 127–130, 132, 134–136, 138, 140, 142, 146, 155, 163–164, 172, 52, 59, 66, 73–74
server/apps/integration_openproject/lib/Search
   OpenProjectSearchProvider.php0%100%0%0%103–104, 107–114, 116–118, 121–122, 124–125, 129–134, 140–141, 143, 66–69, 76, 83, 91, 93, 96
   OpenProjectSearchResultEntry.php100%100%100%100%
server/apps/integration_openproject/lib/Service
   DatabaseService.php43.90%100%60%41.67%125–128, 131, 80–87, 89–93, 95–97
   DirectDownloadService.php88%100%100%86.96%65–66, 68
   DirectUploadService.php54.55%100%66.67%52.63%112, 118, 79–82, 84, 89, 91
   OauthService.php0%100%0%0%108–115, 45–47, 56–66, 68, 70–72, 75–78, 89, 91–94, 96–97
   OpenProjectAPIService.php70.61%100%70.73%70.60%1000, 1006, 1011, 1015, 1025, 1027, 1030, 1032, 1163–1170, 1172, 1180–1184, 1192–1199, 1216–1223, 1232–1237, 180–184, 255, 364–365, 367, 381–382, 391, 395, 416, 504–505, 512, 515–518, 520, 526, 530–532,

@SwikritiT
Copy link
Contributor

SwikritiT commented Oct 16, 2023

@SwikritiT did anybody also test this PR on the older, supported Nextcloud versions? If yes, please release it as a patch level release

We run the tests on all the supported versions and the API tests are passing in all of them. But we can do a quick manual test on all the versions as well

Did the manual test and everything works on nextcloud side, in all the supported versions. I'll merge this PR and release the patch level

@SwikritiT SwikritiT merged commit 84b1cf7 into release/2.4 Oct 16, 2023
@delete-merged-branch delete-merged-branch bot deleted the bugfix/noid/27.1.2-activity-classes branch October 16, 2023 09:20
@wielinde
Copy link
Collaborator

@SwikritiT did anybody also test this PR on the older, supported Nextcloud versions? If yes, please release it as a patch level release

We run the tests on all the supported versions and the API tests are passing in all of them. But we can do a quick manual test on all the versions as well

Did the manual test and everything works on nextcloud side, in all the supported versions. I'll merge this PR and release the patch level

Cool. Thank you for the QA.

One question out of curiosity: Did our CI fail when Nextcloud released 27.1.2? I mean, did it fail before this PR? I guess that the CI only runs on changes in the app. So if Nextcloud has a new stable release, that makes our CI fail, then we will not notice until our next commit to the app, which might be too late. Maybe we need to pick up on changes on Nextcloud stable branches, too?

@SwikritiT
Copy link
Contributor

SwikritiT commented Oct 16, 2023

@SwikritiT did anybody also test this PR on the older, supported Nextcloud versions? If yes, please release it as a patch level release

We run the tests on all the supported versions and the API tests are passing in all of them. But we can do a quick manual test on all the versions as well

Did the manual test and everything works on nextcloud side, in all the supported versions. I'll merge this PR and release the patch level

Cool. Thank you for the QA.

One question out of curiosity: Did our CI fail when Nextcloud released 27.1.2? I mean, did it fail before this PR? I guess that the CI only runs on changes in the app. So if Nextcloud has a new stable release, that makes our CI fail, then we will not notice until our next commit to the app, which might be too late. Maybe we need to pick up on changes on Nextcloud stable branches, too?

Yes, we do pull the changes from the stable branches to run the CI so I would expect it to contain the changes for the release(I'll double-check to be sure). But like you said currently the build only runs when there are new changes through PR or push. Sometimes the changes in the PR might cause the CI to fail so some failures like this case might not be noticed until too late. Maybe we need to run nightly builds in release and maybe the master branch which will be more reliable in catching these kinds of errors early on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants