needgantt

New in version 0.5.5.

needgantt adds a gantt-chart to your documentation:

.. needgantt:: Bug handling gantt
   :tags: gantt_example
   :milestone_filter: type == 'milestone'

@startuml

' Elements definition 

[Find & Report bug] as [ACT_BUG] lasts 5 days
[Analyse bug] as [ACT_BUG_ANALYSE] lasts 7 days
[Create solution ticket] as [ACT_TICKET] lasts 3 days
[Work on solution ticket] as [ACT_TICKET_WORK] lasts 7 days
[Solution ticket closed] as [MS_TICKET_CLOSED] lasts 0 days
[Add solution to release plan] as [ACT_RELEASE_PLAN] lasts 1 days
[Deploy release] as [ACT_DEPLOY] lasts 2 days
[Test release] as [ACT_TEST] lasts 12 days
[Bug solved] as [MS_BUG_SOLVED] lasts 0 days

' Element links definition 


' Deactivated, as currently supported by plantuml beta only
' Element completion definition 

[Test release] is 80% completed


' Element color definition 

[Find & Report bug] is colored in #FFCC00
[Analyse bug] is colored in #FFCC00
[Create solution ticket] is colored in #FFCC00
[Work on solution ticket] is colored in #FFCC00
[Solution ticket closed] is colored in #FF3333
[Add solution to release plan] is colored in #FFCC00
[Deploy release] is colored in #FFCC00
[Test release] is colored in #FFCC00
[Bug solved] is colored in #FF3333


' Constraints definition 


' Constraints definition 

[ACT_BUG_ANALYSE] starts at [ACT_BUG]'s end
[ACT_TICKET] starts at [ACT_BUG_ANALYSE]'s end
[ACT_TICKET_WORK] starts at [ACT_TICKET]'s end
[MS_TICKET_CLOSED] happens at [ACT_TICKET_WORK]'s end
[ACT_RELEASE_PLAN] starts at [MS_TICKET_CLOSED]'s end
[ACT_DEPLOY] starts at [ACT_RELEASE_PLAN]'s end
[ACT_TEST] starts at [ACT_DEPLOY]'s end
[MS_BUG_SOLVED] happens at [ACT_TEST]'s end

@enduml

Bug handling gantt

Show used needs for above example…

Action: Find & Report bug ACT_BUG ../_images/arrow-right-circle.svg
tags: gantt_example
duration: 5
links incoming: ACT_BUG_ANALYSE
Action: Analyse bug ACT_BUG_ANALYSE ../_images/arrow-right-circle.svg
tags: gantt_example
duration: 7
links outgoing: ACT_BUG
links incoming: ACT_TICKET
Action: Create solution ticket ACT_TICKET ../_images/arrow-right-circle.svg
tags: gantt_example
duration: 3
links outgoing: ACT_BUG_ANALYSE
links incoming: ACT_TICKET_WORK
Action: Work on solution ticket ACT_TICKET_WORK ../_images/arrow-right-circle.svg
tags: gantt_example
duration: 7
links outgoing: ACT_TICKET
links incoming: MS_TICKET_CLOSED
Milestone: Solution ticket closed MS_TICKET_CLOSED ../_images/arrow-right-circle.svg
tags: gantt_example
links outgoing: ACT_TICKET_WORK
links incoming: ACT_RELEASE_PLAN
Action: Add solution to release plan ACT_RELEASE_PLAN ../_images/arrow-right-circle.svg
tags: gantt_example
duration: 1
links outgoing: MS_TICKET_CLOSED
links incoming: ACT_DEPLOY
Action: Deploy release ACT_DEPLOY ../_images/arrow-right-circle.svg
tags: gantt_example
duration: 2
links outgoing: ACT_RELEASE_PLAN
links incoming: ACT_TEST
Action: Test release ACT_TEST ../_images/arrow-right-circle.svg
tags: gantt_example
duration: 12
completion: 80%
links outgoing: ACT_DEPLOY
links incoming: MS_BUG_SOLVED
Milestone: Bug solved MS_BUG_SOLVED ../_images/arrow-right-circle.svg
tags: gantt_example
links outgoing: ACT_TEST

Hint

The Gantt function is quite new in PlantUML and some features are available in the Beta version only. So if you get any syntax errors during the build, please download the latest PlantUML version.

If svg is set as output format for PlantUML, the tasks elements are linked to their related need.

Color is taken from needs_types configuration. This behavior can be deactivated by setting no_color.

needgantt supports the following relationship between tasks and milestones:

The task length is defined by default by the need-option duration. Its value is interpreted in days.

The task completion is defined by default by the need-option completion. Its value is interpreted as percentage and should be between 0 and 100.

Options

Supported options:

milestone_filter

milestone_filter gets executed on each need found by filter or any user related filter option. If it is a match, the gets represented as milestone instead of a task in gantt chart.

milestone_filter must be a valid Filter string.

start_date

Optional start date of the gantt chart. All tasks and milestones dates get calculated based on this base values.

Must be use the format YYYY-MM-DD. Example: 2020-03-25

.. needgantt:: Bug handling gantt
   :tags: gantt_example
   :milestone_filter: type == 'milestone'
   :start_date: 2020-03-25

@startuml
Project starts the 25th of April 2020

' Elements definition 

[Find & Report bug] as [ACT_BUG] lasts 5 days
[Analyse bug] as [ACT_BUG_ANALYSE] lasts 7 days
[Create solution ticket] as [ACT_TICKET] lasts 3 days
[Work on solution ticket] as [ACT_TICKET_WORK] lasts 7 days
[Solution ticket closed] as [MS_TICKET_CLOSED] lasts 0 days
[Add solution to release plan] as [ACT_RELEASE_PLAN] lasts 1 days
[Deploy release] as [ACT_DEPLOY] lasts 2 days
[Test release] as [ACT_TEST] lasts 12 days
[Bug solved] as [MS_BUG_SOLVED] lasts 0 days

' Element links definition 


' Deactivated, as currently supported by plantuml beta only
' Element completion definition 

[Test release] is 80% completed


' Element color definition 

[Find & Report bug] is colored in #FFCC00
[Analyse bug] is colored in #FFCC00
[Create solution ticket] is colored in #FFCC00
[Work on solution ticket] is colored in #FFCC00
[Solution ticket closed] is colored in #FF3333
[Add solution to release plan] is colored in #FFCC00
[Deploy release] is colored in #FFCC00
[Test release] is colored in #FFCC00
[Bug solved] is colored in #FF3333


' Constraints definition 


' Constraints definition 

[ACT_BUG_ANALYSE] starts at [ACT_BUG]'s end
[ACT_TICKET] starts at [ACT_BUG_ANALYSE]'s end
[ACT_TICKET_WORK] starts at [ACT_TICKET]'s end
[MS_TICKET_CLOSED] happens at [ACT_TICKET_WORK]'s end
[ACT_RELEASE_PLAN] starts at [MS_TICKET_CLOSED]'s end
[ACT_DEPLOY] starts at [ACT_RELEASE_PLAN]'s end
[ACT_TEST] starts at [ACT_DEPLOY]'s end
[MS_BUG_SOLVED] happens at [ACT_TEST]'s end

@enduml

Bug handling gantt

timeline

Defines the timeline scale.

Allowed values: daily, weekly, monthly.

Default: daily

Works only, if start_date is set as well.

.. needgantt:: Bug handling gantt
   :tags: gantt_example
   :milestone_filter: type == 'milestone'
   :start_date: 2020-03-25
   :timeline: weekly

@startuml
Project starts the 25th of April 2020

' Elements definition 

[Find & Report bug] as [ACT_BUG] lasts 5 days
[Analyse bug] as [ACT_BUG_ANALYSE] lasts 7 days
[Create solution ticket] as [ACT_TICKET] lasts 3 days
[Work on solution ticket] as [ACT_TICKET_WORK] lasts 7 days
[Solution ticket closed] as [MS_TICKET_CLOSED] lasts 0 days
[Add solution to release plan] as [ACT_RELEASE_PLAN] lasts 1 days
[Deploy release] as [ACT_DEPLOY] lasts 2 days
[Test release] as [ACT_TEST] lasts 12 days
[Bug solved] as [MS_BUG_SOLVED] lasts 0 days

' Element links definition 


' Deactivated, as currently supported by plantuml beta only
' Element completion definition 

[Test release] is 80% completed


' Element color definition 

[Find & Report bug] is colored in #FFCC00
[Analyse bug] is colored in #FFCC00
[Create solution ticket] is colored in #FFCC00
[Work on solution ticket] is colored in #FFCC00
[Solution ticket closed] is colored in #FF3333
[Add solution to release plan] is colored in #FFCC00
[Deploy release] is colored in #FFCC00
[Test release] is colored in #FFCC00
[Bug solved] is colored in #FF3333


' Constraints definition 


' Constraints definition 

[ACT_BUG_ANALYSE] starts at [ACT_BUG]'s end
[ACT_TICKET] starts at [ACT_BUG_ANALYSE]'s end
[ACT_TICKET_WORK] starts at [ACT_TICKET]'s end
[MS_TICKET_CLOSED] happens at [ACT_TICKET_WORK]'s end
[ACT_RELEASE_PLAN] starts at [MS_TICKET_CLOSED]'s end
[ACT_DEPLOY] starts at [ACT_RELEASE_PLAN]'s end
[ACT_TEST] starts at [ACT_DEPLOY]'s end
[MS_BUG_SOLVED] happens at [ACT_TEST]'s end

@enduml

Bug handling gantt

no_color

Tasks and milestone color is taken from need-typ configuration.

If the default PlantUML colors shall be taken, set this flag.

@startuml

' Elements definition 

[Find & Report bug] as [ACT_BUG] lasts 5 days
[Analyse bug] as [ACT_BUG_ANALYSE] lasts 7 days
[Create solution ticket] as [ACT_TICKET] lasts 3 days
[Work on solution ticket] as [ACT_TICKET_WORK] lasts 7 days
[Solution ticket closed] as [MS_TICKET_CLOSED] lasts 0 days
[Add solution to release plan] as [ACT_RELEASE_PLAN] lasts 1 days
[Deploy release] as [ACT_DEPLOY] lasts 2 days
[Test release] as [ACT_TEST] lasts 12 days
[Bug solved] as [MS_BUG_SOLVED] lasts 0 days

' Element links definition 


' Deactivated, as currently supported by plantuml beta only
' Element completion definition 

[Test release] is 80% completed


' Element color definition 

' Color support deactivated via flag
' Constraints definition 


' Constraints definition 

[ACT_BUG_ANALYSE] starts at [ACT_BUG]'s end
[ACT_TICKET] starts at [ACT_BUG_ANALYSE]'s end
[ACT_TICKET_WORK] starts at [ACT_TICKET]'s end
[MS_TICKET_CLOSED] happens at [ACT_TICKET_WORK]'s end
[ACT_RELEASE_PLAN] starts at [MS_TICKET_CLOSED]'s end
[ACT_DEPLOY] starts at [ACT_RELEASE_PLAN]'s end
[ACT_TEST] starts at [ACT_DEPLOY]'s end
[MS_BUG_SOLVED] happens at [ACT_TEST]'s end

@enduml

Bug handling gantt

duration_option

Defines which option to take for a duration value. The value gets interpreted in days, no matter what the name of the option is.

Can be set for the complete documentation by using needs_duration_option in conf.py.

Default: duration

.. needgantt:: Duration example
   :tags: gantt_ex_duration
   :duration_option: hours

@startuml

' Elements definition 

[Create example] as [ACT_CREATE_EX] lasts 12 days
[Read example] as [ACT_READ_EX] lasts 3 days

' Element links definition 


' Deactivated, as currently supported by plantuml beta only
' Element completion definition 



' Element color definition 

[Create example] is colored in #FFCC00
[Read example] is colored in #FFCC00


' Constraints definition 


' Constraints definition 

[ACT_READ_EX] starts at [ACT_CREATE_EX]'s end

@enduml

Duration example

Action: Create example ACT_CREATE_EX ../_images/arrow-right-circle.svg
tags: gantt_ex_duration
hours: 12
links incoming: ACT_READ_EX
Action: Read example ACT_READ_EX ../_images/arrow-right-circle.svg
tags: gantt_ex_duration
hours: 3
duration: 100
links outgoing: ACT_CREATE_EX

duration option gets ignored in the above needgantt.

completion_option

Defines which option to take for a completion value. The value gets interpreted in percentage.

Can be set for the complete documentation by using needs_completion_option in conf.py.

Default: completion

.. needgantt:: Completion example
   :tags: gantt_ex_completion
   :completion_option: amount

@startuml

' Elements definition 

[Create example] as [ACT_CREATE_EX_C] lasts 12 days
[Read example] as [ACT_READ_EX_C] lasts 12 days

' Element links definition 


' Deactivated, as currently supported by plantuml beta only
' Element completion definition 

[Create example] is 90% completed
[Read example] is 40% completed


' Element color definition 

[Create example] is colored in #FFCC00
[Read example] is colored in #FFCC00


' Constraints definition 


' Constraints definition 

[ACT_READ_EX_C] starts at [ACT_CREATE_EX_C]'s end

@enduml

Completion example

Action: Create example ACT_CREATE_EX_C ../_images/arrow-right-circle.svg
tags: gantt_ex_completion
amount: 90%
duration: 12
links incoming: ACT_READ_EX_C
Action: Read example ACT_READ_EX_C ../_images/arrow-right-circle.svg
tags: gantt_ex_completion
amount: 40
duration: 12
links outgoing: ACT_CREATE_EX_C