fogbugz

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package fogbugz (api.go) implements the interface for calling the methods to fetch the data from the fogbugz api and handles the authentication.

Package fogbugz implements the structs and methods used to combine data for reports to output data for an application. this package contains the hour struct for the ClarkKent report

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Root *url.URL // fogbugz api URL
	// contains filtered or unexported fields
}

API encapsultaes token, site url, and site version returned from FogBugz.

func (*API) GetCase

func (api *API) GetCase(casescsv string) map[int]cases.Case

GetCase pulls all the case header information which is seen at the top of fogbugz cases.

func (*API) GetHours

func (api *API) GetHours(startDateLocal string, endDateLocal string, timezone string) []Hour

GetHours in a accountant like format.

func (*API) GetInterval

func (api *API) GetInterval(startDateLocal time.Time, endDateLocal time.Time, timezone string) interval.Intervals

GetInterval pulls time intervals for all people for a date range in UTC so we can roll up the durations and bill our customers.

func (*API) GetMilestone

func (api *API) GetMilestone() map[int]milestone.FixFor

GetMilestone pulls all milestones available.

func (*API) GetPeople

func (api *API) GetPeople() map[int]people.Person

GetPeople returns a map of Persons and is to be used to lookup the Fullname and email address of each person.

func (*API) InvalidateToken

func (api *API) InvalidateToken() error

InvalidateToken Logoff from the FogBugz API and retire the token.

func (*API) Login

func (api *API) Login(email string, password string) error

Login to the FogBugz API and collect the token so we can send commands (cmd).

type Hour

type Hour struct {
	ID            int
	StartDate     time.Time // time period begins in local time
	EndDate       time.Time // time period ends in local time
	Title         string    // BugID & Case Title {17137 : 2016 - PTO - Holiday - Me}
	Duration      float64   // duration of the time in hours
	Expense       string    // leave blank
	Employee      string    // person name
	Project       string    // project name
	MileStone     string    // milestone name -> sFixFor
	Customer      string    // customer name
	CaseNumber    int       // case number or bug number
	BillingPeriod string    // billing period is 1stCheck or 2ndCheck any period after 15th is 2ndCheck
	Area          string    // Area is accounting defined area
	Category      string    // category refers to accounting defined category... i have no clue what they are doing here anymore
	StartNote     string    // startnote was the task order # at one time, but now the project is the task order
	Year          int       // year as integer for pivot tables
	Month         string    // month as integer for pivot tables
	Day           int       // day as integer for pivot tables
	DOW           string    // Day of the week, to help review the hours per day
	Tags          string    // Tags on each case, used by EV and IP
}

Hour holds metadata about the hours for each person. In FogBugz this report is similar to the ClarkKent report with more fields.

type HourByEmployee

type HourByEmployee struct {
	PersonID   int
	Employee   string    // person name
	TotalHours float64   // total time for the duration
	StartDate  time.Time // time period begins in local time
	EndDate    time.Time // time period ends in local time
}

HourByEmployee will hold the total hours for a date range.

Directories

Path Synopsis
Package cases implements the interface to the fogbugz api to pull cases using the search command.
Package cases implements the interface to the fogbugz api to pull cases using the search command.
Package interval implements the fetching of time intervals from the fogbugz api.
Package interval implements the fetching of time intervals from the fogbugz api.
Package milestone implements the transformation of FixFor data into a usable form.
Package milestone implements the transformation of FixFor data into a usable form.
Package people implements some I/O utility functions.
Package people implements some I/O utility functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL