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

Find calendars related to space

Daniela Scheiwe
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2013

I'm currently building a content aggregator which is basically a template with macros that fetch selected content from previously defined spaces.

I also would like to embed the calendars that are related to the selected spaces and thus want to know if it's possible to get the calendars by space key. I usually use these in my macros but couldn't find a similar documentation for teamcalendars. It would be great if i wouldn't have to write crazy sql marcos for that :)

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
Ryan Goodwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 25, 2013

Hi Superuschi,

AFAIK, Team Calendars are not related to spaces. If there is a calendar that is called in a space, the home page for example, you might be able to reference that macro by getting spacekey/home then the macro for TC on that page. However, TC does not store a calendar via space any longer (and by any longer I mean that pre Confluence 3.5 when the legacy calendar let you instantiate a calendar on a page and it lived there forever). TC stores it's calendars in a centralized location in the database and allows it to be referenced on any page/space for viewing and updating.

That being said, you could just embed the related calendars but I don't know if you'll find a spacekey+calendar relation to go off of (but look for spacekey/home pages calendar macro!). /sadface

Hope that helps!

Daniela Scheiwe
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 25, 2013

Thanks Ryan. I found out that inside the bandana table there's an entry for each calendar with a string like

<string>{"id":"05b50338-9b4f-432a-ad75-f3eaca0ccbd6",
"color":"subcalendar-turquoise",
"description":"",
"name":"test kalender",
"spaceKey":"SPACEKEY",
"creator":"user.name",
"timeZoneId":"Europe/Berlin"}</string>

The ID is stored in a separate field, so I will use an sql query and get the ID by searching for "spaceKey":"SPACEKEY". With the IDs I can embed the calendars using

<ac:macro ac:name="calendar"><ac:parameter ac:name="id">ab4acba0-a222-4b82-a39d-af79b1a88881,7dbda511-84ca-4868-99db-3aac5e758f6f,bdaee45b-5cab-4483-916b-373f405451ad</ac:parameter><ac:parameter ac:name="width">600</ac:parameter><ac:parameter ac:name="hideWeekends">true</ac:parameter></ac:macro>

Maybe this is hopeful for others. I can post the complete macro code once I'm done.

1 vote
Sherif Mansour
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 27, 2013

So Ryan is somewhat correct in that Calednars live outside spaces. However, when you create a calendar form the editor, or from the main "My Calendars" view, you have the opportunity to link it to a space. To be honest, we haven't yet done anything with this feature and need to improve work on it.


Can I ask why you are trying to find related calendars in space? What will you do with that information? Just trying to see if there is something we can do better here...

Daniela Scheiwe
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 28, 2013

OFC :)

Our non-technical staff has problems with keeping up-to-date in confluence, we're using it for project documentation (and jira for task management), and they're not as creative with macros (which basically provide everything they need, but well....) as our technical staff is.

We have one big project with 40 sub-projects coming up and were thinking about an easy and convenient way to monitor them, so I am building a page template which allows a user to select 1 to n projects and the macros they want to use (blogs, recently updated, attachments, calendars) with checkboxes. The project selection list is filter-able with jquery, as we already have quite a lot. The result is an indiviual page that shows the selected information for the selected projects. so basically it pre-fills the macro parameters.

TAGS
AUG Leaders

Atlassian Community Events