Ajcody-Calendar-Issues

Calendar Issues

   KB 3821        Last updated on 2016-06-20  




0.00
(0 votes)
24px ‎  - This is Zeta Alliance Certified Documentation. The content has been tested by the Community.


Calendar Issues Homepage

Please see Ajcody-Calendar-Issues

Specific Client Application Issues

Please see this page instead, this page will try to deal with server internals or "calendar" issues as within the ics itself.

Can't See User's Freebusy

A user can turn off on a per calendar basis the feature of broadcasting their F/B status of that calendar. In ZWC, right click on folder and look at the properties. To change/view this from the commandline:

To see what folders a user has:

zmmailbox -z -m user@domain.com gaf

Calendar ones will be appo under the View column.

The below will let you see if the calendar is doing F/B or not :

zmmailbox -z -m user@domain.com gf /Calendar

  Help: getFolder(gf)                [opts] {folder-path}
        -v/--verbose                 verbose output

It'll give a bunch of data, including:

    "isExcludedFromFreeBusy": false,

To turn it off [0] or on [1],

zmmailbox -z -m user@domain.com mfefb /Calendar 0

  Help: modifyFolderExcludeFreeBusy(mfefb) {folder-path} [0|1*]

 Ref: http://wiki.zimbra.com/wiki/Zmmailbox

Free Busy F/B Lookup Via URL Strings

The url sting to see another persons free/busy if they have it open for permission [in the users preferences] is:

http[s]://SERVER/zimbra/home/USER?fmt=freebusy

Some other methods or options are. To download the ics file:

http[s]://SERVER/zimbra/home/USER@DOMAIN/.ics or http[s]://SERVER/zimbra/home/USER/.ics

To show a weeks worth of F/B data:

http[s]://SERVER/zimbra/home/USER?view=week&fmt=freebusy

To get iCalendar format of the calendar, replace the fmt=freebusy with ifb

http[s]://SERVER/zimbra/home/USER?fmt=ifb

With ZCS8, we also have these options now - VEVENT [fbfmt=event]

http[s]://SERVER/zimbra/home/USER?fmt=ifb?fbfmt=event

or VFREEBUSY [fbfmt=freebusy] format

http://server/home/userfb/?fmt=ifb?fbfmt=freebusy

Some Helpful Scripts To Run Against ICS File

parseics.pl

Will determine if an event has attendees but is missing an organizer. Normally, customers will delete the event and just recreate it with the information that is present from the output.

usage : ./parseics.pl filename.ics

#!/usr/bin/perl

$file = $ARGV[0];

if (!$file)
{
	print "Must specify filename.\n";
	exit;
}
elsif (!-e $file)
{
	print "File does not exist!\n";
	exit;
}
else
{
	#print "File exists. Continuing...\n";
	open(ICS, "<$file");
	@ics = <ICS>;
	$errors=0;
	$events=0;
	for ($i=0;$i<=$#ics;$i++)
	{
		if ($ics[$i] =~ "BEGIN:VEVENT")
		{
			$organizer=0;
			$attendee=0;
			$event="";
			#print "vevent start\n";
			while ($ics[$i+1] !~ "END:VEVENT")
			{
				$event .= $ics[$i];
				if ($ics[$i] =~ "ORGANIZER")
				{
					$organizer=1;
				}
				if ($ics[$i] =~ "ATTENDEE")
				{
					$attendee=1;
				}
				$i++;
			}
			#print "vevent end\n";
			if ($attendee && !$organizer)
			{
				$event .= $ics[$i];
				$event .= $ics[$i+1];
				print "Invalid event.  Attendee but no organizer present!\n";
				print $event;
				$errors++;
			}
			$events++;
		}
	}
	print "$errors error(s) out of a total of $events events present.\n";
}

ical-split.pl

Will break up an ics dump into one file per vevent.

#!/usr/bin/perl
# ical-parse.pl
# b 2008 03 12
#insist on an input file
if ( scalar(@ARGV) < 1 ) { print "Please specify a filename.\n" and usage() and exit; }
my $infile = shift @ARGV;
$numevents = qx/grep BEGIN:VEVENT $infile | wc -l/;
chomp $numevents;
$numevents =~ s/[^0-9]//g;

$TRUE=1;$FALSE=0;
$eventcount=0;
$summary='';
$inVEVENT = $FALSE; # track whether we are in the middle of a vevent
@currentVEVENT=(''); # hold the lines of the current vevent in this array (this will hog memory :()

open( INFILE, $infile ) or die "Could not open $infile for read: $!";
while ($line = <INFILE> ) {
	chomp $line;
	if ( $line =~ m/^BEGIN:VEVENT$/ ) { # case I.
		($inVEVENT) and die "Error: found new BEGIN:VEVENT without END:VEVENT\n";
		$inVEVENT = $TRUE;
		$eventcount++;
		@currentVEVENT=($line);
	}
	elsif ( $line =~ m/^END:VEVENT$/ ) { # case II.
		(!$inVEVENT) and die "Error: found END:VEVENT without BEGIN:VEVENT\n";
		push(@currentVEVENT, $line);
		$size = $#currentVEVENT;
		$zeros = zeropad($eventcount, $numevents); #eh ever heard of sprintf
		$outfile = "${zeros}${eventcount}-${summary}-${size}.ics";
		open( OUTFILE, ">>", $outfile ) or die "Could not open $outfile for write: $!";
		foreach $l (@currentVEVENT) {
			print OUTFILE "$l\n";
		}
		close OUTFILE;
		$inVEVENT=$FALSE; $summary=''; $size=0; @currentVEVENT=('');
	}
	elsif ( ($temp) = ( $line =~ m/^SUMMARY:(.*)$/ ) ) { # case III.A.
		$summary = $temp; #forget why temp
		$summary =~ s/[^-a-zA-Z0-9.]/_/g;
		push(@currentVEVENT, $line);
	}
	elsif ($inVEVENT) { # case III.
		push(@currentVEVENT, $line);
	}

}

$cases='
I. BEGIN:VEVENT
 A. (inVEVENT) and error: previous event not closed
 B. (else) set inVEVENT, start array, push line
II. END:VEVENT
 A. (inVEVENT) push line, write array, unset inVEVENT, unset summary, empty array
 B. (else) error: no event started
III. <event line>
 A (matches ^SUMMARY:) and set summary, push line
IV. <non event line>


';

exit;
sub usage {
    print "Usage: $0 <ical file>\nWrites a new file for each VEVENT\n";
}
sub zeropad() { #num-to-pad, total-with-max-digits, return 0...
	$num=shift;
	$total=shift;
	$curr=length($num);
	$max=length($total);
	$pad='';
	for ($x=0; $x < ($max-$curr); $x++) {
		$pad .= '0';
	}
	return "$pad";
}

ZCS CLI Utilities

zmcalchk

This command checks the consistency of appointments on the Zimbra calendar and sends an email notification regarding inconsistencies. For example, it checks if all attendees and organizers of an event on the calendar agree on start/stop times and occurrences of a meeting.

Help output from ZCS 5.0.23

$zmcalchk 
Usage: zmcalchk [-d] [-n <type>] <user> <start-time-spec> <end-time-spec>

   See the output of 'zmmailbox help appointment' for details on time-specs.

   -d        DEBUG: extremely verbose details
   -m        Max attendees to check, (default 50)
   -n        <none|user|organizer|attendee|all> whom to notify (default none)

zmfixtz

Other wiki reference: Time_Zone_Changes_for_2007_and_ZCS

Help output from ZCS 5.0.23

$ zmfixtz -h
usage: zmfixtz -a <account(s)> [options]
 -a,--account <arg>         account email addresses seperated by white
                            space or "all" for all accounts
    --after <arg>           fixup calendar items after this time; defaults
                            to beginning of 2007
    --country <arg>         two-letter country code if running
                            country-specific fixup
 -h,--help                  Displays this help message.
 -s,--server <arg>          Mail server hostname. Default is localhost.
    --sync                  run synchronously; default is asynchronous
 -Y,--authtokenfile <arg>   use auth token string(has to be in JSON
                            format) from command line
 -y,--authtoken <arg>       use auth token string(has to be in JSON
                            format) from command line

zmtzupdate

This command is used to update time zone changes in existing appointments for specific users or all users. A .ics rule file should first be created to run with this command. A rule file lists a series of rules to match a time zone and the replacement time zone definitions. More information about this command can be found at Changing_ZCS_Time_Zones .

Syntax :

zmtzupdate --rulefile <rule file> -a <“all” or list of specific email addresses> [--sync] [--after <date/time stamp>]

Help output from ZCS 5.0.23

usage: zmtzupdate --rulefile <rule file> -a <account(s)> [options]
 -a,--account <arg>         account email addresses seperated by white
                            space or "all" for all accounts
    --after <arg>           fixup calendar items after this time; defaults
                            to beginning of 2007
 -h,--help                  Displays this help message.
    --rulefile <arg>        xml file containing fixup rules
 -s,--server <arg>          Mail server hostname. Default is localhost.
    --sync                  run synchronously; default is asynchronous
 -Y,--authtokenfile <arg>   use auth token string(has to be in JSON
                            format) from command line
 -y,--authtoken <arg>       use auth token string(has to be in JSON
                            format) from command line

ZCS CLI zmprov - appointment related

zmprov calendar help description

Help output from ZCS 5.0.23

$ zmprov help calendar

  createCalendarResource(ccr) {name@domain} {password} [attr1 value1 [attr2 value2...]]

  deleteCalendarResource(dcr) {name@domain|id}

  getAllCalendarResources(gacr) [-v] [-e] [-s server] [{domain}]

  getCalendarResource(gcr) {name@domain|id} [attr1 [attr2...]]

  modifyCalendarResource(mcr) {name@domain|id} [attr1 value1 [attr2 value2...]]

  purgeAccountCalendarCache(pacc) {name@domain|id} [...]

  renameCalendarResource(rcr) {name@domain|id} {newName@domain}

    op = eq, has, startswith, endswith, ge, le, gt, lt

zmprov freebusy help description

Help output from ZCS 5.0.23

$ zmprov help freebusy

  getAllFbp(gafbp) [-v]

  getFreebusyQueueInfo(gfbqi) [{provider-name}]

  pushFreebusy(pfb) {domain|account-id} [account-id ...]

ZCS CLI zmmailbox - appointment related

zmmailbox appointment help description

Help output from ZCS 5.0.23

$ zmmailbox help appointment

  getAppointmentSummaries(gaps) [opts] {start-date-spec} {end-date-spec} {folder-path}
    -v/--verbose                 verbose output

 absolute date-specs:

  mm/dd/yyyy (i.e., 12/25/1998)
  yyyy/dd/mm (i.e., 1989/12/25)
  \d+       (num milliseconds, i.e., 1132276598000)

  relative date-specs:

  [mp+-]?([0-9]+)([mhdwy][a-z]*)?g
 
   +/{not-specified}   current time plus an offset
   -                   current time minus an offset
  
   (0-9)+    value

   ([mhdwy][a-z]*)  units, everything after the first character is ignored (except for "mi" case):
   m(onths)
   mi(nutes)
   d(ays)
   w(eeks)
   h(ours)
   y(ears)
   
  examples:
     1day     1 day from now
    +1day     1 day from now 
    p1day     1 day from now
    +60mi     60 minutes from now
    +1week    1 week from now
    +6mon     6 months from now 
    1year     1 year from now


zmmailbox search help description

You can use this to search appointments with :

-t appointment

Help output from ZCS 5.0.23

$ zmmailbox help search

  search(s)                    [opts] {query}
    -c/--current                 current page of search results
    -t/--types <arg>             list of types to search for (message,conversation,contact,appointment,document,task,wiki)
    -p/--previous                previous page of search results
    -n/--next                    next page of search results
    -l/--limit <arg>             max number of results to return
    -s/--sort <arg>              sort order TODO
    -v/--verbose                 verbose output

  searchConv(sc)               [opts] {conv-id} {query}
    -c/--current                 current page of search results
    -t/--types <arg>             list of types to search for (message,conversation,contact,appointment,document,task,wiki)
    -p/--previous                previous page of search results
    -n/--next                    next page of search results
    -l/--limit <arg>             max number of results to return
    -s/--sort <arg>              sort order TODO
    -v/--verbose                 verbose output

Appointment Items Within Mysql

DESCRIBE mboxgroup[#].appointment Database Table

See :

The Query For ALL Appointments For A Particular User

See :



Jump to: navigation, search