Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 317682
Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java (-6 / +24 lines)
Lines 584-601 Link Here
584
		// and additional elements that may not appear in the incoming xml
584
		// and additional elements that may not appear in the incoming xml
585
		// stream but need to be present for bug submission / not always dirty
585
		// stream but need to be present for bug submission / not always dirty
586
		// state handling
586
		// state handling
587
		BugzillaAttribute[] reportElements = { BugzillaAttribute.SHORT_DESC, BugzillaAttribute.BUG_STATUS,
587
		BugzillaAttribute[] reportElements1 = { BugzillaAttribute.SHORT_DESC, BugzillaAttribute.BUG_STATUS,
588
				BugzillaAttribute.RESOLUTION, BugzillaAttribute.BUG_ID, BugzillaAttribute.REP_PLATFORM,
588
				BugzillaAttribute.RESOLUTION, BugzillaAttribute.BUG_ID, BugzillaAttribute.REP_PLATFORM,
589
				BugzillaAttribute.PRODUCT, BugzillaAttribute.OP_SYS, BugzillaAttribute.COMPONENT,
589
				BugzillaAttribute.PRODUCT, BugzillaAttribute.OP_SYS, BugzillaAttribute.COMPONENT,
590
				BugzillaAttribute.VERSION, BugzillaAttribute.PRIORITY, BugzillaAttribute.BUG_SEVERITY,
590
				BugzillaAttribute.VERSION, BugzillaAttribute.PRIORITY, BugzillaAttribute.BUG_SEVERITY,
591
				BugzillaAttribute.ASSIGNED_TO, BugzillaAttribute.TARGET_MILESTONE, BugzillaAttribute.REPORTER,
591
				BugzillaAttribute.ASSIGNED_TO };
592
				BugzillaAttribute.DEPENDSON, BugzillaAttribute.BLOCKED, BugzillaAttribute.BUG_FILE_LOC,
592
		BugzillaAttribute[] reportElements2 = { BugzillaAttribute.REPORTER, BugzillaAttribute.DEPENDSON,
593
				BugzillaAttribute.NEWCC, BugzillaAttribute.KEYWORDS, BugzillaAttribute.CC,
593
				BugzillaAttribute.BLOCKED, BugzillaAttribute.BUG_FILE_LOC, BugzillaAttribute.NEWCC,
594
				BugzillaAttribute.NEW_COMMENT, BugzillaAttribute.QA_CONTACT, BugzillaAttribute.STATUS_WHITEBOARD };
594
				BugzillaAttribute.KEYWORDS, BugzillaAttribute.CC, BugzillaAttribute.NEW_COMMENT };
595
595
596
		for (BugzillaAttribute element : reportElements) {
596
		TaskRepository taskRepository = existingReport.getAttributeMapper().getTaskRepository();
597
598
		for (BugzillaAttribute element : reportElements1) {
599
			BugzillaTaskDataHandler.createAttribute(existingReport, element);
600
		}
601
		String useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE);
602
		if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
603
			BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.TARGET_MILESTONE);
604
		}
605
		for (BugzillaAttribute element : reportElements2) {
597
			BugzillaTaskDataHandler.createAttribute(existingReport, element);
606
			BugzillaTaskDataHandler.createAttribute(existingReport, element);
598
		}
607
		}
608
		useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT);
609
		if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
610
			BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.QA_CONTACT);
611
		}
612
		useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD);
613
		if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
614
			BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.STATUS_WHITEBOARD);
615
		}
616
599
	}
617
	}
600
618
601
	public static String getBugUrlWithoutLogin(String repositoryUrl, String id) {
619
	public static String getBugUrlWithoutLogin(String repositoryUrl, String id) {
(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java (-10 / +15 lines)
Lines 498-512 Link Here
498
			attributeComponent.setValue(component);
498
			attributeComponent.setValue(component);
499
		}
499
		}
500
500
501
		optionValues = repositoryConfiguration.getTargetMilestones(productAttribute.getValue());
501
		TaskRepository taskRepository = taskData.getAttributeMapper().getTaskRepository();
502
		if (optionValues.size() > 0) {
502
		String useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE);
503
			TaskAttribute attributeTargetMilestone = createAttribute(taskData, BugzillaAttribute.TARGET_MILESTONE);
503
		if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
504
			for (String option : optionValues) {
504
			optionValues = repositoryConfiguration.getTargetMilestones(productAttribute.getValue());
505
				attributeTargetMilestone.putOption(option, option);
505
			if (optionValues.size() > 0) {
506
				TaskAttribute attributeTargetMilestone = createAttribute(taskData, BugzillaAttribute.TARGET_MILESTONE);
507
				for (String option : optionValues) {
508
					attributeTargetMilestone.putOption(option, option);
509
				}
510
				attributeTargetMilestone.setValue(optionValues.get(0));
506
			}
511
			}
507
			attributeTargetMilestone.setValue(optionValues.get(0));
508
		}
512
		}
509
510
		TaskAttribute attributePlatform = createAttribute(taskData, BugzillaAttribute.REP_PLATFORM);
513
		TaskAttribute attributePlatform = createAttribute(taskData, BugzillaAttribute.REP_PLATFORM);
511
		optionValues = repositoryConfiguration.getPlatforms();
514
		optionValues = repositoryConfiguration.getPlatforms();
512
		for (String option : optionValues) {
515
		for (String option : optionValues) {
Lines 550-558 Link Here
550
		TaskAttribute attributeAssignedTo = createAttribute(taskData, BugzillaAttribute.ASSIGNED_TO);
553
		TaskAttribute attributeAssignedTo = createAttribute(taskData, BugzillaAttribute.ASSIGNED_TO);
551
		attributeAssignedTo.setValue(""); //$NON-NLS-1$
554
		attributeAssignedTo.setValue(""); //$NON-NLS-1$
552
555
553
		TaskAttribute attributeQAContact = createAttribute(taskData, BugzillaAttribute.QA_CONTACT);
556
		useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT);
554
		attributeQAContact.setValue(""); //$NON-NLS-1$
557
		if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
555
558
			TaskAttribute attributeQAContact = createAttribute(taskData, BugzillaAttribute.QA_CONTACT);
559
			attributeQAContact.setValue(""); //$NON-NLS-1$
560
		}
556
		TaskAttribute attributeBugFileLoc = createAttribute(taskData, BugzillaAttribute.BUG_FILE_LOC);
561
		TaskAttribute attributeBugFileLoc = createAttribute(taskData, BugzillaAttribute.BUG_FILE_LOC);
557
		attributeBugFileLoc.setValue("http://"); //$NON-NLS-1$
562
		attributeBugFileLoc.setValue("http://"); //$NON-NLS-1$
558
563

Return to bug 317682