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 322867 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java (-3 / +3 lines)
Lines 611-628 Link Here
611
			BugzillaTaskDataHandler.createAttribute(existingReport, element);
611
			BugzillaTaskDataHandler.createAttribute(existingReport, element);
612
		}
612
		}
613
		String useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE);
613
		String useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE);
614
		if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
614
		if (useParam == null || (useParam != null && useParam.equals("true"))) { //$NON-NLS-1$
615
			BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.TARGET_MILESTONE);
615
			BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.TARGET_MILESTONE);
616
		}
616
		}
617
		for (BugzillaAttribute element : reportElements2) {
617
		for (BugzillaAttribute element : reportElements2) {
618
			BugzillaTaskDataHandler.createAttribute(existingReport, element);
618
			BugzillaTaskDataHandler.createAttribute(existingReport, element);
619
		}
619
		}
620
		useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT);
620
		useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT);
621
		if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
621
		if (useParam == null || (useParam != null && useParam.equals("true"))) { //$NON-NLS-1$
622
			BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.QA_CONTACT);
622
			BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.QA_CONTACT);
623
		}
623
		}
624
		useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD);
624
		useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD);
625
		if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
625
		if (useParam == null || (useParam != null && useParam.equals("true"))) { //$NON-NLS-1$
626
			BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.STATUS_WHITEBOARD);
626
			BugzillaTaskDataHandler.createAttribute(existingReport, BugzillaAttribute.STATUS_WHITEBOARD);
627
		}
627
		}
628
		useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES);
628
		useParam = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES);
(-)src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java (-16 / +30 lines)
Lines 487-512 Link Here
487
				attachment.setAuthor(author);
487
				attachment.setAuthor(author);
488
			}
488
			}
489
			break;
489
			break;
490
		case CLASSIFICATION:
491
		case TARGET_MILESTONE:
490
		case TARGET_MILESTONE:
492
		case QA_CONTACT:
491
		case QA_CONTACT:
493
		case STATUS_WHITEBOARD:
492
		case STATUS_WHITEBOARD:
494
		case ALIAS:
493
			TaskAttribute suppressAttribute0 = createAttrribute(parsedText, tag);
495
		case SEE_ALSO:
494
			String propertyName0 = null;
496
			TaskAttribute suppressAttribute = createAttrribute(parsedText, tag);
497
			String propertyName = null;
498
			switch (tag) {
495
			switch (tag) {
499
			case CLASSIFICATION:
500
				propertyName = IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION;
501
				break;
502
			case TARGET_MILESTONE:
496
			case TARGET_MILESTONE:
503
				propertyName = IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE;
497
				propertyName0 = IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE;
504
				break;
498
				break;
505
			case QA_CONTACT:
499
			case QA_CONTACT:
506
				propertyName = IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT;
500
				propertyName0 = IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT;
507
				break;
501
				break;
508
			case STATUS_WHITEBOARD:
502
			case STATUS_WHITEBOARD:
509
				propertyName = IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD;
503
				propertyName0 = IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD;
504
				break;
505
			default:
506
				propertyName0 = null;
507
				break;
508
			}
509
			String useParam0 = repositoryTaskData.getAttributeMapper().getTaskRepository().getProperty(propertyName0);
510
			if (useParam0 == null || (useParam0 != null && useParam0.equals("true"))) { //$NON-NLS-1$
511
				suppressAttribute0.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
512
			} else {
513
				suppressAttribute0.getMetaData().setKind(null);
514
			}
515
			break;
516
		case CLASSIFICATION:
517
		case ALIAS:
518
		case SEE_ALSO:
519
			TaskAttribute suppressAttribute1 = createAttrribute(parsedText, tag);
520
			String propertyName = null;
521
			switch (tag) {
522
			case CLASSIFICATION:
523
				propertyName = IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION;
510
				break;
524
				break;
511
			case ALIAS:
525
			case ALIAS:
512
				propertyName = IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES;
526
				propertyName = IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES;
Lines 518-531 Link Here
518
				propertyName = null;
532
				propertyName = null;
519
				break;
533
				break;
520
			}
534
			}
521
			String useParam = repositoryTaskData.getAttributeMapper().getTaskRepository().getProperty(propertyName);
535
			String useParam1 = repositoryTaskData.getAttributeMapper().getTaskRepository().getProperty(propertyName);
522
			if (useParam != null && useParam.equals("true")) { //$NON-NLS-1$
536
			if (useParam1 != null && useParam1.equals("true")) { //$NON-NLS-1$
523
				suppressAttribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
537
				suppressAttribute1.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
524
				if (BugzillaAttribute.CLASSIFICATION.equals(tag)) {
538
				if (BugzillaAttribute.CLASSIFICATION.equals(tag)) {
525
					suppressAttribute.getMetaData().setReadOnly(true);
539
					suppressAttribute1.getMetaData().setReadOnly(true);
526
				}
540
				}
527
			} else {
541
			} else {
528
				suppressAttribute.getMetaData().setKind(null);
542
				suppressAttribute1.getMetaData().setKind(null);
529
			}
543
			}
530
			break;
544
			break;
531
		default:
545
		default:
(-)src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java (-6 / +44 lines)
Lines 381-400 Link Here
381
				useXMLRPCstatusTransitions.setSelection(value);
381
				useXMLRPCstatusTransitions.setSelection(value);
382
			} else {
382
			} else {
383
				// we use the repository values
383
				// we use the repository values
384
				boolean value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION));
384
				boolean value;
385
				String valueString = repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION);
386
				if (valueString == null) {
387
					value = false;
388
				} else {
389
					value = Boolean.parseBoolean(valueString);
390
				}
385
				useclassification.setSelection(!value);
391
				useclassification.setSelection(!value);
386
				value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE));
392
				valueString = repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE);
393
				if (valueString == null) {
394
					value = true;
395
				} else {
396
					value = Boolean.parseBoolean(valueString);
397
				}
387
				usetargetmilestone.setSelection(!value);
398
				usetargetmilestone.setSelection(!value);
388
				value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT));
399
				valueString = repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT);
400
				if (valueString == null) {
401
					value = true;
402
				} else {
403
					value = Boolean.parseBoolean(valueString);
404
				}
389
				useqacontact.setSelection(!value);
405
				useqacontact.setSelection(!value);
390
				value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD));
406
				valueString = repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD);
407
				if (valueString == null) {
408
					value = true;
409
				} else {
410
					value = Boolean.parseBoolean(valueString);
411
				}
391
				usestatuswhiteboard.setSelection(!value);
412
				usestatuswhiteboard.setSelection(!value);
392
				value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES));
413
				valueString = repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES);
414
				if (valueString == null) {
415
					value = false;
416
				} else {
417
					value = Boolean.parseBoolean(valueString);
418
				}
393
				usebugaliases.setSelection(!value);
419
				usebugaliases.setSelection(!value);
394
				value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO));
420
				valueString = repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO);
421
				if (valueString == null) {
422
					value = false;
423
				} else {
424
					value = Boolean.parseBoolean(valueString);
425
				}
395
				use_see_also.setSelection(!value);
426
				use_see_also.setSelection(!value);
396
427
397
				value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_USE_XMLRPC));
428
				value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_USE_XMLRPC));
429
				valueString = repository.getProperty(IBugzillaConstants.BUGZILLA_USE_XMLRPC);
430
				if (valueString == null) {
431
					value = false;
432
				} else {
433
					value = Boolean.parseBoolean(valueString);
434
				}
435
398
				useXMLRPCstatusTransitions.setSelection(value);
436
				useXMLRPCstatusTransitions.setSelection(value);
399
			}
437
			}
400
		}
438
		}

Return to bug 322867