From 9f9038e6865570ae45a90238e8e465884a83f22e Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 18 Sep 2023 21:22:16 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E3=82=A2=E3=83=B3=E3=82=B1=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=AE=E7=A2=BA=E8=AA=8D=E7=94=BB=E9=9D=A2=E3=82=92?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E5=BE=8C=E3=81=AB=E5=9B=9E=E7=AD=94=E3=82=92?= =?UTF-8?q?=E7=B5=82=E4=BA=86=E3=81=9B=E3=81=9A=E3=81=AB=E3=83=96=E3=83=A9?= =?UTF-8?q?=E3=82=A6=E3=82=B6=E3=82=92=E9=96=89=E3=81=98=E3=80=81=E3=81=9D?= =?UTF-8?q?=E3=81=AE=E5=BE=8C=E3=81=82=E3=82=89=E3=81=9F=E3=82=81=E3=81=A6?= =?UTF-8?q?=E5=9B=9E=E7=AD=94=E3=81=97=E3=81=9F=E9=9A=9B=E3=81=AB=E3=83=96?= =?UTF-8?q?=E3=83=A9=E3=82=A6=E3=82=B6=E3=82=92=E9=96=89=E3=81=98=E3=82=8B?= =?UTF-8?q?=E5=89=8D=E3=81=AE=E5=9B=9E=E7=AD=94=E6=97=A5=E6=99=82=E3=81=8C?= =?UTF-8?q?CSV=E3=81=AB=E5=87=BA=E5=8A=9B=E3=81=95=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=97=E3=81=BE=E3=81=86=E3=83=90=E3=82=B0=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/QuestionnaireAnswerSummary.php | 6 ++++-- Model/QuestionnaireAnswerSummaryCsv.php | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Model/QuestionnaireAnswerSummary.php b/Model/QuestionnaireAnswerSummary.php index 2441f21..f6cd2ea 100644 --- a/Model/QuestionnaireAnswerSummary.php +++ b/Model/QuestionnaireAnswerSummary.php @@ -113,11 +113,13 @@ class QuestionnaireAnswerSummary extends QuestionnairesAppModel { */ public function saveAnswerStatus($questionnaire, $summary, $status) { $summary['QuestionnaireAnswerSummary']['answer_status'] = $status; + if ($status == QuestionnairesComponent::ACTION_ACT) { + // サマリの状態を完了にして確定する + $summary['QuestionnaireAnswerSummary']['answer_time'] = (new NetCommonsTime())->getNowDatetime(); + } if ($status == QuestionnairesComponent::ACTION_ACT && $questionnaire['Questionnaire']['is_answer_mail_send']) { - // サマリの状態を完了にして確定する - $summary['QuestionnaireAnswerSummary']['answer_time'] = (new NetCommonsTime())->getNowDatetime(); // メールのembed のURL設定を行っておく $url = NetCommonsUrl::actionUrl(array( 'controller' => 'questionnaire_blocks', diff --git a/Model/QuestionnaireAnswerSummaryCsv.php b/Model/QuestionnaireAnswerSummaryCsv.php index 781fc2c..578f5b8 100644 --- a/Model/QuestionnaireAnswerSummaryCsv.php +++ b/Model/QuestionnaireAnswerSummaryCsv.php @@ -257,7 +257,12 @@ protected function _getRows($questionnaire, $summary, $answers) { $cols = array(); $cols[] = $this->_getUserName($questionnaire, $summary); - $cols[] = $summary['QuestionnaireAnswerSummaryCsv']['modified']; + if (isset($summary['QuestionnaireAnswerSummaryCsv']['answer_time'])) { + $anserTime = $summary['QuestionnaireAnswerSummaryCsv']['answer_time']; + } else { + $anserTime = $summary['QuestionnaireAnswerSummaryCsv']['modified']; + } + $cols[] = $anserTime; $cols[] = $summary['QuestionnaireAnswerSummaryCsv']['answer_number']; foreach ($questionnaire['QuestionnairePage'] as $page) { From bf62bf50f600d895213527d898ead01fb663f777 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 18 Sep 2023 21:30:00 +0900 Subject: [PATCH 2/4] =?UTF-8?q?test:=20github=20action=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3195c64..3142402 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ name: tests jobs: setup: name: setup - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Slack Notification on Start uses: rtCamp/action-slack-notify@v2.2.0 @@ -28,7 +28,7 @@ jobs: tests: name: tests needs: setup - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: matrix: php: [ '7.2', '7.3', '7.4' ] @@ -92,46 +92,53 @@ jobs: docker-compose exec -T nc3app bash /opt/scripts/app-build.sh - name: phpcs (PHP CodeSniffer) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpcs.sh - name: phpmd (PHP Mess Detector) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpmd.sh - name: phpcpd (PHP Copy/Paste Detector) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpcpd.sh - name: gjslint (JavaScript Style Check) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/gjslint.sh - name: phpdoc (PHP Documentor) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpdoc.sh - name: phpunit (PHP UnitTest) + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose exec -T nc3app bash /opt/scripts/phpunit.sh sudo -s chmod a+w -R ${NC3_BUILD_DIR}/build - - name: push coveralls - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_FLAG_NAME: ${{ matrix.php }} - run: | - cd ${NC3_BUILD_DIR} - ls -la ${NC3_BUILD_DIR} - vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v +# - name: push coveralls +# env: +# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# COVERALLS_FLAG_NAME: ${{ matrix.php }} +# run: | +# cd ${NC3_BUILD_DIR} +# ls -la ${NC3_BUILD_DIR} +# vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v - name: docker-compose remove + if: always() run: | cd ${NC3_DOCKER_DIR} docker-compose rm -f @@ -148,7 +155,7 @@ jobs: teardown: name: teardown - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest needs: tests steps: # テスト成功時はこちらのステップが実行される From 9baea8425b61f5c9de85c96dbc6bf1da52e8971a Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Thu, 5 Oct 2023 21:46:55 +0900 Subject: [PATCH 3/4] =?UTF-8?q?test:=20github=20action=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3142402..36cd2b9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,12 +3,10 @@ on: branches: - main - master - - availability pull_request: branches: - main - master - - availability name: tests @@ -19,6 +17,7 @@ jobs: steps: - name: Slack Notification on Start uses: rtCamp/action-slack-notify@v2.2.0 + if: env.SLACK_WEBHOOK != '' env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} SLACK_CHANNEL: notify-nc3-tests @@ -146,7 +145,7 @@ jobs: # テスト失敗時はこちらのステップが実行される - name: Slack Notification on Failure uses: rtCamp/action-slack-notify@v2.2.0 - if: failure() + if: env.SLACK_WEBHOOK != '' && failure() env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} SLACK_CHANNEL: notify-nc3-tests @@ -160,8 +159,8 @@ jobs: steps: # テスト成功時はこちらのステップが実行される - name: Slack Notification on Success - if: success() uses: rtCamp/action-slack-notify@v2.2.0 + if: env.SLACK_WEBHOOK != '' && success() env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }} SLACK_CHANNEL: notify-nc3-tests From e59721340eb07bca9f16aea70b766a39ab933fe8 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Mon, 9 Oct 2023 21:33:17 +0900 Subject: [PATCH 4/4] change: Version number to 3.3.7 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 9c25013..86fb650 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -3.3.6 +3.3.7