|
9 | 9 | #clearcache: set it to "true" to force the removal of the (48h) cached groups, components and reviewers data. |
10 | 10 | #quiet: with any value different from "false", don't perform any action in the Tracker. |
11 | 11 | #restrictedto: if set, restrict any comment to that role in the project. Blank means visible to everybody. |
| 12 | +#releasedate: Release date, used to calculate the freeze period. Improvements and new features will not be moved to CLR during freeze. YYYY-MM-DD. |
12 | 13 |
|
13 | 14 | # Let's go strict (exit on error) |
14 | 15 | set -e |
@@ -92,10 +93,26 @@ echo "Using cached (until ${validuntil}) CLR metadata information." |
92 | 93 |
|
93 | 94 | source ${mydir}/lib.sh # Add all the functions. |
94 | 95 |
|
| 96 | +# Code freeze date calculated 6 weeks before the release date. |
| 97 | +freezedate=$(date -d "${releasedate} -6week" +%Y%m%d) |
| 98 | + |
| 99 | +# On-sync end date calculated 2 weeks after the release date. |
| 100 | +onsyncenddate=$(date -d "${releasedate} +2week" +%Y%m%d) |
| 101 | + |
| 102 | +# Today's date. |
| 103 | +nowdate=$(date +%Y%m%d) |
| 104 | + |
| 105 | +# We'll exclude New Features and Improvements from the CLR process during the freeze period. |
| 106 | +excludequery="" |
| 107 | +if [ "${nowdate}" -ge "${freezedate}" ] && [ "${nowdate}" -lt "${onsyncenddate}" ]; then |
| 108 | + excludequery="AND issuetype NOT IN ('New Feature', Improvement)" |
| 109 | + echo "Today (${nowdate}) is within the freeze period (${freezedate} - ${onsyncenddate}). Improvements and new features will not be moved to the CLR queue." |
| 110 | +fi |
| 111 | + |
95 | 112 | # Search for all the issues awaiting for integration and not being decided between CLR/IR. |
96 | 113 | # Note: customfield_10118 is the peer reviewer custom field. |
97 | 114 | ${basereq} --action getIssueList \ |
98 | | - --jql "filter = 23535" \ |
| 115 | + --jql "filter = 23535 ${excludequery}" \ |
99 | 116 | --columns="Key,Assignee,Peer reviewer,Components,Security Level,Summary" \ |
100 | 117 | --outputFormat=4 \ |
101 | 118 | --outputType=json \ |
|
0 commit comments