com.atlassian.greenhopper.service.issuelink
Class EpicCustomFieldServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.issuelink.EpicCustomFieldServiceImpl
All Implemented Interfaces:
EpicCustomFieldService

@Service
public class EpicCustomFieldServiceImpl
extends java.lang.Object
implements EpicCustomFieldService

Service for retrieving and creating epic-related custom fields.


Constructor Summary
EpicCustomFieldServiceImpl()
           
 
Method Summary
 void ensureEpicFieldsHaveCorrectContext()
          It is possible that if the Epic issue type is deleted, it will be re-created and existing contexts set up for Epic-specific custom fields will be invalid.
 void ensureEpicLabelFieldCorrectlyConfigured()
          Ensures that the epic label field is correctly configured.
 void ensureEpicStatusFieldHasCorrectOptionsOrder()
          Ensure that the epic status field has the Options in the correct order.
 com.atlassian.jira.issue.fields.CustomField getDefaultEpicColorField()
           
 com.atlassian.jira.issue.fields.CustomField getDefaultEpicLabelField()
           
 com.atlassian.jira.issue.fields.CustomField getDefaultEpicLinkField()
          Get the Epic Link custom field that GreenHopper is aware of.
 com.atlassian.jira.issue.fields.CustomField getDefaultEpicStatusField()
           
 com.atlassian.fugue.Option<com.atlassian.jira.issue.customfields.option.Option> getDoneEpicStatusOption()
           
 void onSpringContextStarted()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EpicCustomFieldServiceImpl

public EpicCustomFieldServiceImpl()
Method Detail

onSpringContextStarted

@PostConstruct
public void onSpringContextStarted()

getDefaultEpicLabelField

public com.atlassian.jira.issue.fields.CustomField getDefaultEpicLabelField()
Specified by:
getDefaultEpicLabelField in interface EpicCustomFieldService

getDefaultEpicLinkField

public com.atlassian.jira.issue.fields.CustomField getDefaultEpicLinkField()
Description copied from interface: EpicCustomFieldService
Get the Epic Link custom field that GreenHopper is aware of.

Specified by:
getDefaultEpicLinkField in interface EpicCustomFieldService
Returns:
the custom field. If the field does not yet exist, it will be created.

getDefaultEpicStatusField

public com.atlassian.jira.issue.fields.CustomField getDefaultEpicStatusField()
Specified by:
getDefaultEpicStatusField in interface EpicCustomFieldService

getDefaultEpicColorField

public com.atlassian.jira.issue.fields.CustomField getDefaultEpicColorField()
Specified by:
getDefaultEpicColorField in interface EpicCustomFieldService

ensureEpicFieldsHaveCorrectContext

public void ensureEpicFieldsHaveCorrectContext()
Description copied from interface: EpicCustomFieldService
It is possible that if the Epic issue type is deleted, it will be re-created and existing contexts set up for Epic-specific custom fields will be invalid. We need to be able to re-instate the correct contexts in this scenario.

Specified by:
ensureEpicFieldsHaveCorrectContext in interface EpicCustomFieldService

ensureEpicLabelFieldCorrectlyConfigured

public void ensureEpicLabelFieldCorrectlyConfigured()
Description copied from interface: EpicCustomFieldService
Ensures that the epic label field is correctly configured.

Specified by:
ensureEpicLabelFieldCorrectlyConfigured in interface EpicCustomFieldService

ensureEpicStatusFieldHasCorrectOptionsOrder

public void ensureEpicStatusFieldHasCorrectOptionsOrder()
Description copied from interface: EpicCustomFieldService
Ensure that the epic status field has the Options in the correct order.

Specified by:
ensureEpicStatusFieldHasCorrectOptionsOrder in interface EpicCustomFieldService

getDoneEpicStatusOption

public com.atlassian.fugue.Option<com.atlassian.jira.issue.customfields.option.Option> getDoneEpicStatusOption()
Specified by:
getDoneEpicStatusOption in interface EpicCustomFieldService
Returns:
the Option which corresponds to the "Done" choice for Epic Status field (which is a Select custom field). But actually, in some cases there may be no Option. So we return an Option of an Option. "Yo dawg..." etc etc. Note: Options can be "disabled" in the Admin UI. But we do not respect this setting. So the Option returned may not be settable via JIRA's Edit Issue, but it will still succeed when we edit the value from our interface.


Copyright © 2007-2014 Atlassian. All Rights Reserved.