Gantt aliases work differently from other diagrams (it is not possible to give the same "label" to a task)

+8 votes
asked Oct 2, 2020 in Bug by Serge Wenger Work (15,620 points)

Hello PlanUML,

Tests done with version 1.2020.18

Gantt aliases work differently from other diagrams (it is not possible to give the same "label" to a task):

@startgantt
Project starts 2020-11-08
[Task 7 days] as [T7] starts at 2020-11-09
[T7] ends at 2020-11-15
[Task 7 days] as [T7bis] starts at 2020-11-09
[T7bis] ends at 2020-11-15
@endgantt

In Component for example, it is possible to have 2 with the same label:

@startuml
[First component] as Comp1
[Another component] as Comp2
[Another component] as Comp3
Comp1 -> Comp2
@enduml

[See on PlantUML Server]

Thanks for your support  

commented Feb 11, 2021 by The-Lu (65,440 points)

Hello S. and PlantUML team,

Here are some another minimal examples:

@startgantt
[SameTaskName] as [T1] lasts 7 days and is colored in pink
[SameTaskName] as [T2] lasts 7 days and is colored in pink
[T1] -> [T2]
@endgantt

And the last one who disappointed us:

@startgantt
[SameTaskName] as [T1] lasts 7 days and is colored in pink
[SameTaskName] as [T2] lasts 3 days and is colored in orange
[T1] -> [T2]
@endgantt

Intermixture: Very hard to detect when you have a large project with stages that have the same name ('test', 'delivery', 'end', ...)

Thanks for your support,
Regards,
Th.

commented Nov 9, 2021 by Capitán Primate (140 points)
Hello.

Any news regarding this issue? It would be very useful to be able to have the same name for different tasks and make each of them unique using the ID or alias.

Currently, we need to make each task name unnecessarily long, by adding spaces or other kind of marks, and it becomes really hard to manage for very large projects. Think about having [Development], [Development ], [Development  ], [Development    ], and so on.

Thanks in advance.
commented Jan 28, 2022 by Serge Wenger Work (15,620 points)

Dear PlantUML Team,

This is a blocking point for me. Did you think something can be done?

Thanks for your support,
Regards

SW

commented Feb 16, 2022 by Capitán Primate (140 points)
Hello, PlantUML team.

Would it be possible to use the ID/alias as default unique identifier and only use the task name if no ID/alias has been declared?

Thank you for your support.
commented Mar 1 by Fuhrmanator (1,700 points)
I'm also getting stuck with this one... I was trying to map out the courses I taught over the years (course has same name, taught many times). I will try the "spaces" hack.

1 Answer

+5 votes
answered Oct 14, 2021 by anonymous
Would it be possible for PlantUML to use the alias as a unique ID, and only use the task name as unique ID if there is no alias?
commented Nov 22, 2021 by emalware (280 points)

I have the same issue in gantt, lets say you have 

Project

  1. task 1
    1. demo
  2. task 2
    1. demo

demo subtask /milestone should be show for both, but it is not working, just like this there are several examples where same label is needed 

commented Mar 14, 2022 by fghj
Hi everyone,

I suggest a workaround as follows:

1) Define a macro like:     !define N(x,n) x<size:0>n</size>

2) Use for tasks:  N(SAMENAME, INDEX); examples:

N(SAMENAME, 1)

N(SAMENAME, 2)

In the picture only SAMENAME will be shown
commented May 6, 2022 by emalware (280 points)

tried this workaround and is working, it will be nice if they check at the taskid instead of the name

commented Dec 1, 2022 by yle (100 points)

This work around does not work for me.

@startgantt

!define N(x,n) x<size:0>n</size>

N(SAMENAME, 1) starts 2020/10/19
N(SAMENAME, 1)
N(SAMENAME, 2)
@endgantt
commented Dec 1, 2022 by The-Lu (65,440 points)

Hello Y., and all,

Here is a (the) worked workaround:

@startgantt

!procedure N(x,n)
[x<size:0>n</size>]
!endprocedure

project starts  2020/10/15
N(SAMENAME, 1) starts 2020/10/19
N(SAMENAME, 2) starts 2020/10/22
N(SAMENAME, 3) starts 2020/10/29
@endgantt


 

Enjoy,
Regards.

...