Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
R
redmine_v2
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 4
    • Merge Requests 4
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • VeNtura
  • redmine_v2
  • Merge Requests
  • !10

Open
Opened Nov 14, 2023 by Tấn Trần Thanh@tantt 
  • Report abuse
Report abuse

Daily Report plugin

Screenshot_from_2023-11-14_13-12-32

Edited Nov 14, 2023 by Tấn Trần Thanh
×

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b feature/daily-report origin/feature/daily-report

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git checkout feature/search-for-date-and-team-in-plugin-workflow-report
git merge --no-ff feature/daily-report

Step 4. Push the result of the merge to GitLab

git push origin feature/search-for-date-and-team-in-plugin-workflow-report

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 5
  • Commits 6
  • Pipelines 7
  • Changes 10
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Tấn Trần Thanh @tantt

    added 1 commit

    • b571dfef - fix magic number

    Compare with previous version

    Nov 14, 2023

    added 1 commit

    • b571dfef - fix magic number

    Compare with previous version

    added 1 commit * b571dfef - fix magic number [Compare with previous version](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5576&start_sha=1cbaf3c87831931b689334e485c087bd6bb49689)
    Toggle commit list
  • Nguyen Van Duyet
    @duyetnv started a discussion on an old version of the diff Nov 14, 2023
    Resolved by Tấn Trần Thanh Nov 14, 2023
    plugins/workflow_report/app/controllers/workflow_report_controller.rb
    5 5 before_action :require_xhr_request, only: :export
    6 LEADER_IDS = [172, 229, 271, 142, 6]
    6 7
    7 8 def index
    8 9 @team_options = $workflow_report_config['teams'].map { |team| team.keys() }
    9 10 end
    10 11
    12 def index_daily_report
    13 @team_options = Project.visible.sorted.active
    14 end
    15
    16 def show_daily_report
    17 project_id = Project.find_by(name: params[:team]).id
    18 users_by_role = Project.find(project_id).users_by_role
    19 result = []
    20 users_by_role.each { |key, _value| users_by_role.delete(key) if key.is_a?(Role) && (key.name == 'Manager' || key.name == 'JP' || key.name == 'TeamLead') }
    • Nguyen Van Duyet @duyetnv commented Nov 14, 2023
      users_by_role.each { |key, _value| users_by_role.delete(key) if key.is_a?(Role) && key.name.in?(%w[Manager JP TeamLead]) }

      Nếu rails hiện tại không support in? thì chuyển về include? cho gọn

      Edited Nov 14, 2023
      ```ruby users_by_role.each { |key, _value| users_by_role.delete(key) if key.is_a?(Role) && key.name.in?(%w[Manager JP TeamLead]) } ``` Nếu rails hiện tại không support `in?` thì chuyển về `include?` cho gọn
    • Tấn Trần Thanh @tantt

      changed this line in version 3 of the diff

      Nov 14, 2023

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5577&start_sha=b571dfef84cdfb583d57b27258af439be0eb8b0c#df43b4da575656405b65d37dd6d947c32c2fa424_20_22)
      Toggle commit list
    Please register or sign in to reply
  • Nguyen Van Duyet
    @duyetnv started a discussion on an old version of the diff Nov 14, 2023
    Resolved by Tấn Trần Thanh Nov 14, 2023
    plugins/workflow_report/app/controllers/workflow_report_controller.rb
    6 LEADER_IDS = [172, 229, 271, 142, 6]
    6 7
    7 8 def index
    8 9 @team_options = $workflow_report_config['teams'].map { |team| team.keys() }
    9 10 end
    10 11
    12 def index_daily_report
    13 @team_options = Project.visible.sorted.active
    14 end
    15
    16 def show_daily_report
    17 project_id = Project.find_by(name: params[:team]).id
    18 users_by_role = Project.find(project_id).users_by_role
    19 result = []
    20 users_by_role.each { |key, _value| users_by_role.delete(key) if key.is_a?(Role) && (key.name == 'Manager' || key.name == 'JP' || key.name == 'TeamLead') }
    21 users_by_role.keys.each do |role|
    • Nguyen Van Duyet @duyetnv commented Nov 14, 2023

      k rõ rails, ruby cũ thì có dùng đc không, thử này đc k @tantt

      users_by_role.each do |role, users|
        users.each do |user|
          result << { id: user.id, fullname: "#{user.firstname} #{user.lastname}" } unless LEADER_IDS.include?(user.id)
        end
      end
      Edited Nov 14, 2023
      k rõ rails, ruby cũ thì có dùng đc không, thử này đc k @tantt ```ruby users_by_role.each do |role, users| users.each do |user| result << { id: user.id, fullname: "#{user.firstname} #{user.lastname}" } unless LEADER_IDS.include?(user.id) end end ```
    • Tấn Trần Thanh @tantt commented Nov 14, 2023
      Developer

      dạ được

      Edited Nov 14, 2023
      dạ được
    • Tấn Trần Thanh @tantt

      changed this line in version 5 of the diff

      Nov 14, 2023

      changed this line in version 5 of the diff

      changed this line in [version 5 of the diff](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5580&start_sha=45a5d5c6841ae25b9a1b3fb8fd4eaf4885c49892#df43b4da575656405b65d37dd6d947c32c2fa424_22_22)
      Toggle commit list
    Please register or sign in to reply
  • Nguyen Van Duyet
    @duyetnv started a discussion on an old version of the diff Nov 14, 2023
    Resolved by Tấn Trần Thanh Nov 14, 2023
    plugins/workflow_report/app/controllers/workflow_report_controller.rb
    3 3 class WorkflowReportController < ApplicationController
    4 4 before_action :authorize_global
    5 5 before_action :require_xhr_request, only: :export
    6 LEADER_IDS = [172, 229, 271, 142, 6]
    • Nguyen Van Duyet @duyetnv commented Nov 14, 2023

      Này mình lấy từ db ra theo role được không? Sau có thêm, xóa leader đỡ phải update lại plugin.

      Edited Nov 14, 2023
      Này mình lấy từ db ra theo role được không? Sau có thêm, xóa leader đỡ phải update lại plugin.
    • Tấn Trần Thanh @tantt

      changed this line in version 3 of the diff

      Nov 14, 2023

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5577&start_sha=b571dfef84cdfb583d57b27258af439be0eb8b0c#df43b4da575656405b65d37dd6d947c32c2fa424_6_5)
      Toggle commit list
    Please register or sign in to reply
  • Nguyen Van Duyet
    @duyetnv started a discussion on an old version of the diff Nov 14, 2023
    Resolved by Tấn Trần Thanh Nov 14, 2023
    plugins/workflow_report/app/views/workflow_report/_daily_report.html.slim 0 → 100644
    1 - display_hour = display_hour.to_boolean if display_hour.is_a?(String)
    • Nguyen Van Duyet @duyetnv commented Nov 14, 2023

      convert to boolean nó có cái này, tham khảo thử:

      ActiveModel::Type::Boolean.new.cast 1
      => true

      Nhưng a k biết nó support từ rails mấy :D

      Edited Nov 14, 2023
      convert to boolean nó có cái này, tham khảo thử: ```ruby ActiveModel::Type::Boolean.new.cast 1 => true ``` Nhưng a k biết nó support từ rails mấy :D
    • Tấn Trần Thanh @tantt

      changed this line in version 3 of the diff

      Nov 14, 2023

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5577&start_sha=b571dfef84cdfb583d57b27258af439be0eb8b0c#6d6bf3c873b69c25b18783b573212de59ddef053_1_1)
      Toggle commit list
    Please register or sign in to reply
  • Tấn Trần Thanh @tantt

    added 1 commit

    • b041836a - fix comment and add input select date

    Compare with previous version

    Nov 14, 2023

    added 1 commit

    • b041836a - fix comment and add input select date

    Compare with previous version

    added 1 commit * b041836a - fix comment and add input select date [Compare with previous version](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5577&start_sha=b571dfef84cdfb583d57b27258af439be0eb8b0c)
    Toggle commit list
  • Tấn Trần Thanh @tantt

    added 7 commits

    • b041836a...aa117c95 - 6 commits from branch feature/search-for-date-and-team-in-plugin-workflow-report
    • 45a5d5c6 - merge plugin workflow report

    Compare with previous version

    Nov 14, 2023

    added 7 commits

    • b041836a...aa117c95 - 6 commits from branch feature/search-for-date-and-team-in-plugin-workflow-report
    • 45a5d5c6 - merge plugin workflow report

    Compare with previous version

    added 7 commits * b041836a...aa117c95 - 6 commits from branch `feature/search-for-date-and-team-in-plugin-workflow-report` * 45a5d5c6 - merge plugin workflow report [Compare with previous version](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5579&start_sha=b041836a7eb6abf96da5d760c4c852cf1c3755b1)
    Toggle commit list
  • Tấn Trần Thanh @tantt

    changed the description

    Nov 14, 2023

    changed the description

    changed the description
    Toggle commit list
  • Tấn Trần Thanh @tantt

    added 1 commit

    • 01ef1b86 - fix comment

    Compare with previous version

    Nov 14, 2023

    added 1 commit

    • 01ef1b86 - fix comment

    Compare with previous version

    added 1 commit * 01ef1b86 - fix comment [Compare with previous version](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5580&start_sha=45a5d5c6841ae25b9a1b3fb8fd4eaf4885c49892)
    Toggle commit list
  • Tấn Trần Thanh @tantt

    added 1 commit

    • 9cf01390 - fix comment

    Compare with previous version

    Nov 14, 2023

    added 1 commit

    • 9cf01390 - fix comment

    Compare with previous version

    added 1 commit * 9cf01390 - fix comment [Compare with previous version](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5581&start_sha=01ef1b86b09fa94330977abd83e3fb7574eae6b8)
    Toggle commit list
  • Tấn Trần Thanh @tantt

    added 1 commit

    • 94fcc54e - fix comment

    Compare with previous version

    Nov 14, 2023

    added 1 commit

    • 94fcc54e - fix comment

    Compare with previous version

    added 1 commit * 94fcc54e - fix comment [Compare with previous version](https://gitlab.zigexn.vn/ventura/redmine_v2/merge_requests/10/diffs?diff_id=5582&start_sha=9cf013906c72b6e3cbf3d91c03f039c3d55d7171)
    Toggle commit list
  • Tấn Trần Thanh @tantt

    resolved all discussions

    Nov 14, 2023

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: ventura/redmine_v2!10