Lines Matching refs:bug
194 bug := new(Bug)
197 if err := datastore.Get(c, bugKey, bug); err != nil {
202 bug, _, err = findBugByReportingID(c, extID)
210 if err := checkAccessLevel(c, r, bug.sanitizeAccess(accessLevel)); err != nil {
217 managers, err := managerList(c, bug.Namespace)
222 if bug.DupOf != "" {
224 if err := datastore.Get(c, datastore.NewKey(c, "Bug", bug.DupOf, 0, nil), dup); err != nil {
235 uiBug := createUIBug(c, bug, state, managers)
236 crashes, sampleReport, err := loadCrashesForBug(c, bug)
240 dups, err := loadDupsForBug(c, r, bug, state, managers)
244 similar, err := loadSimilarBugs(c, r, bug, state)
379 for _, bug := range bugs {
380 if bug.Status == BugStatusFixed {
383 if bug.Status == BugStatusInvalid || bug.Status == BugStatusFixed != onlyFixed {
386 if accessLevel < bug.sanitizeAccess(accessLevel) {
389 if bug.Status == BugStatusDup {
390 dups = append(dups, bug)
393 uiBug := createUIBug(c, bug, state, managers)
394 bugMap[bugKeyHash(bug.Namespace, bug.Title, bug.Seq)] = uiBug
396 if bug.Status == BugStatusFixed {
404 bug := bugMap[dup.DupOf]
405 if bug == nil {
408 mergeUIBug(c, bug, dup)
456 func loadDupsForBug(c context.Context, r *http.Request, bug *Bug, state *ReportingState, managers […
458 bugHash := bugKeyHash(bug.Namespace, bug.Title, bug.Seq)
485 func loadSimilarBugs(c context.Context, r *http.Request, bug *Bug, state *ReportingState) (*uiBugGr…
488 Filter("Title=", bug.Title).
500 if similar.Namespace == bug.Namespace && similar.Seq == bug.Seq {
523 func createUIBug(c context.Context, bug *Bug, state *ReportingState, managers []string) *uiBug {
527 if bug.Status == BugStatusOpen {
528 _, _, _, _, reportingIdx, status, link, err = needReport(c, "", state, bug)
529 reported = bug.Reporting[reportingIdx].Reported
537 for i := range bug.Reporting {
538 bugReporting := &bug.Reporting[i]
539 if i == len(bug.Reporting)-1 ||
540 bug.Status == BugStatusInvalid && !bugReporting.Closed.IsZero() &&
541 bug.Reporting[i+1].Closed.IsZero() ||
542 (bug.Status == BugStatusFixed || bug.Status == BugStatusDup) &&
547 switch bug.Status {
555 status = fmt.Sprintf("unknown (%v)", bug.Status)
557 status = fmt.Sprintf("%v on %v", status, formatTime(bug.Closed))
562 creditEmail, err := email.AddAddrContext(ownEmail(c), bug.Reporting[reportingIdx].ID)
566 id := bugKeyHash(bug.Namespace, bug.Title, bug.Seq)
568 Namespace: bug.Namespace,
569 Title: bug.displayTitle(),
570 NumCrashes: bug.NumCrashes,
571 FirstTime: bug.FirstTime,
572 LastTime: bug.LastTime,
574 ClosedTime: bug.Closed,
575 ReproLevel: bug.ReproLevel,
584 if len(bug.Commits) != 0 {
585 uiBug.Commits = bug.Commits[0]
586 if len(bug.Commits) > 1 {
587 uiBug.Commits = fmt.Sprintf("%q", bug.Commits)
591 for _, mgr1 := range bug.PatchedOn {
609 func mergeUIBug(c context.Context, bug *uiBug, dup *Bug) {
610 bug.NumCrashes += dup.NumCrashes
611 if bug.LastTime.Before(dup.LastTime) {
612 bug.LastTime = dup.LastTime
614 if bug.ReproLevel < dup.ReproLevel {
615 bug.ReproLevel = dup.ReproLevel
617 updateBugBadness(c, bug)
620 func updateBugBadness(c context.Context, bug *uiBug) {
621 bug.NumCrashesBad = bug.NumCrashes >= 10000 && timeNow(c).Sub(bug.LastTime) < 24*time.Hour
624 func loadCrashesForBug(c context.Context, bug *Bug) ([]*uiCrash, []byte, error) {
625 bugHash := bugKeyHash(bug.Namespace, bug.Title, bug.Seq)
637 build, err = loadBuild(c, bug.Namespace, crash.BuildID)