Advertisement
Guest User

Untitled

a guest
May 16th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.01 KB | None | 0 0
  1. import java.time.LocalDate
  2. import java.sql.Timestamp
  3. import com.atlassian.jira.component.ComponentAccessor;
  4.  
  5. if(issue.getIssueType().getId() == '11624'){ //HD SAR: 10.1.1 Выпуск отчётов по запросам
  6.     def customFieldManager = ComponentAccessor.getCustomFieldManager();
  7.     def field = issue.getCustomFieldValue(customFieldManager.getCustomFieldObject(11855L as Long)) as Timestamp//Дата начала периода
  8.     def fieldEnd = issue.getCustomFieldValue(customFieldManager.getCustomFieldObject(11856L as Long)) as Timestamp//Дата окончания периода
  9.        
  10.     def fieldValue = field.getYear() as Integer // Возращаем год из поля "Дата начала периода"
  11.     def fieldEndValue = fieldEnd.getYear() as Integer // Возращаем год из поля "Дата начала периода"
  12.  
  13.     if(fieldValue > 2017 && fieldEndValue > 2017){//Установлен ли год не меньше 2018
  14.         return true;
  15.     }  
  16. }
  17. return false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement