Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

Create roadmap from existing sprint plan in XLS Edited

I want to load our 9 months sprint plan into a roadmap view. Adding bars manually, placing them in correct sprint and resizing them is too tedious task.

 

On load, the interface calls https://constructsecure.atlassian.net/wiki/rest/tinymce/1/macro/definition API which returns the data as URL encoded JSON string. Is there any way to convert my xls to a JSON, import it and create the roadmap with it?

title, startDate, description, duration provided in JSON format.

1 comment

I came up with a hack solution (see if it helps).

Open Confluence in Google Chrome

Open developer tools in popup out mode

Edit the page with roadmap (or insert a new roadmap)

Open the edit mode of the roadmap

In developer console, in sources tab, right click on 'top' and select 'Search in all files'

Enter search string 'click #toolbar-button-add-bar'

Click on the search result to open the file in sources tab. (Click on {} to beautify the source)

Locate the 'onAddBarClick' function

Add a breakpoint inside the function

In the roadmap edit screen, click on '+ Add bar'. This should hit the breakpoint.

In developer console, go to console tab and enter

var myThis = this;

Switch back to source tab and click the run button

Switch back to console

Enter the following functions

var myAddBar = function (laneIdx, title, startDate, duration) {
var d = myThis.model.get("lanes").at(laneIdx);
var c = d.get("bars");
var g = myThis.model.get("timeline");
var f = new Date(startDate);
//var h = g.get("displayOption") === Roadmap.TIMELINE_DISPLAY_OPTION.MONTH ? moment(f).startOf("month") : moment(f).startOf("isoWeek");
var h = moment(f);
c.add(new Roadmap.Bar({
title: title,
duration: duration,
rowIndex: d.getNumberOfRows(),
startDate: h.toDate()
}))
}


var myAddMarker = function (title, startDate) {
var g = myThis.model.get("markers");
var d = myThis.model.get("timeline");
var h = moment(new Date(startDate));
//var c = d.get("displayOption") === Roadmap.TIMELINE_DISPLAY_OPTION.MONTH ? h.date(15) : h.isoWeekday(4);
var c = h;
g.add(new Roadmap.Marker({
title: title,
markerDate: c.toDate()
}))
}

Now you can add a bar programatically with 

myAddBar(1, 'task 1', '2018-09-13 00:00:00', 1)

The laneIdx is the index of the lane starting with 0

The duration is dependent on what ever you have chosen in 'View by' view. 1 for 1 month or 1 week.

You could create you plan in a JSON or simple array format, paste it console, write your own function which loops on the array and calls the corresponding functions.

var m = [
[
"Sprint 1", "2018-08-27 00:00:00"],
["Sprint 2", "2018-09-10 00:00:00"],
["Sprint 3", "2018-09-24 00:00:00"],
["Sprint 4", "2018-10-08 00:00:00"],
["Sprint 5", "2018-10-22 00:00:00"]
]
m.forEach(function(mr) {myAddMarker(mr[0], mr[1])})

 

Comment

Log in or Sign up to comment
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

463 views 24 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you