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

Feature/allow inclusive enddates #872

Merged
merged 19 commits into from
Jul 12, 2019
Merged

Conversation

ThePenguin1140
Copy link

@ThePenguin1140 ThePenguin1140 commented Jul 7, 2019

This PR introduces the addition of a inclusiveEndDates arguments for Gantt chart definitions.
Adding this argument will add 1 day to all the end dates, effectively treating them to be inclusive.

Relevant Issues:

Tasks:

  • write specs for inclusive end dates
  • add inclusive end date functionality to ganttDb.js
  • write specs for gantt.jison parser improvements
  • add definitions to the gantt.jison parser for inclusive end dates

Example Usage:

gantt
      title Inclusive end dates (Manual date should end on 4th)
      dateFormat YYYY-MM-DD
      axisFormat %d
      inclusiveEndDates
      section Section1
         2 Days: 1, 2019-01-01,2d
         Manual Date: 2, 2019-01-01,2019-01-03
Loading

Jason Würtz added 15 commits July 6, 2019 11:29
This will essentially keep all old behavior the same while still allowing users to specify if they want inclusive end dates
now it just checks if a valid end time was provided and instead of the comparison that went on before.
This needed to be done in order to support manual end dates with inclusive set to true since they don't match anymore as the 'manually' supplied end date is increased by one
if a line contains inclusiveEndDates then it will toggle the chart to use inclusive end dates
@coveralls
Copy link

coveralls commented Jul 7, 2019

Pull Request Test Coverage Report for Build 804

  • 50 of 70 (71.43%) changed or added relevant lines in 2 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.3%) to 53.156%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/diagrams/gantt/ganttDb.js 33 35 94.29%
src/diagrams/gantt/parser/gantt.js 17 35 48.57%
Files with Coverage Reduction New Missed Lines %
src/diagrams/gantt/ganttDb.js 1 70.46%
src/diagrams/gantt/parser/gantt.js 3 45.07%
Totals Coverage Status
Change from base Build 795: 0.3%
Covered Lines: 2365
Relevant Lines: 4410

💛 - Coveralls

@knsv knsv merged commit 3b41ba9 into master Jul 12, 2019
Copy link
Collaborator

@knsv knsv left a comment

Choose a reason for hiding this comment

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

It would be good if the diagrams you added to index.html also are added as e2e tests under e2e. This will make sure this functionality is not broken at a later date.

@knsv knsv deleted the feature/allow-inclusive-enddates branch September 25, 2019 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph: Gantt Status: Approved Is ready to be worked on Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants