Advertisement
Guest User

Untitled

a guest
May 16th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 1.05 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.     long timestamp = field.getTime();
  11.     Calendar cal = Calendar.getInstance();
  12.     cal.setTimeInMillis(timestamp);
  13.     def duedateYear = cal.get(Calendar.YEAR);
  14.  
  15.     long timestampEnd = fieldEnd.getTime();
  16.     Calendar calEnd = Calendar.getInstance();
  17.     calEnd.setTimeInMillis(timestampEnd);
  18.     def duedateYearEnd = calEnd.get(Calendar.YEAR);
  19.  
  20.     if(duedateYear > 2017 && duedateYearEnd > 2017){
  21.         return true
  22.     }
  23. }
  24. return false*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement