Operation Details
Description: This method checks for overlapping periods with other records with the same issue name. The current record is excluded from the check.
Sterotype: ns
SQL
SELECT
  COUNT(*)
INTO
  :numberOfRecords 
FROM
  MilestoneConfiguration MC,
  TextTranslation TT

WHERE ((TT.shortText = :name 
  AND TT.localizableTextID= MC.nameTextID
  AND TT.localeCode= :localeCode)
  OR
  name=:name)
  AND recordStatus = :recordStatus 
  AND milestoneConfigurationID <> :milestoneConfigurationID 
  AND 
  (
    
    (
      endDate IS NULL 
      AND 
      (
        :startDate >= startDate 
      ) 
    ) 
    OR 
    (
      :startDate >= startDate 
      AND :startDate <= endDate 
    ) 
    OR 
    (
      :endDate >= startDate 
      AND :endDate <= endDate 
    ) 
    OR 
    (
      :endDate IS NULL 
      AND :startDate <= endDate 
    ) 
    OR 
    (
      :endDate >= startDate 
      AND endDate IS NULL 
    ) 
  )