Dear hive-mind, can you kindly help me on this issue?
Target situation:
- If someone has moved a ticket into refined, an automatic comment should notify this person (context).
- The comment should list N relevant fields that were not specified (left empty) (focus of this question).
- Only a single comment should state what is missing, to reduce spam (my current workaround spams multiple comments - not in focus here)
Approach:
- Writing a general comment that only triggers, if at least one of the relevant values is empty using "If: any match" (works)
- Using conditional smart values to show -most Jira fields- (works)
- Results in: "Description is empty"
- {{#if(issue.description.isEmpty)}}
Description is empty
{{/}}
- - Using conditional smart values to show -any custom fields- (problems)
- Results for no value in field and value in field: nothing
- {{#if(issue.customfield_12934.isEmpty)}}
Relevance is empty
{{/}}
- Results for no value in field and value in field: "Relevance is empty"
- {{#if(not(issue.customfield_12934.isEmpty))}}
Relevance is empty
{{/}} - {{#if(not(issue.customfield_12934))}}
Relevance is empty
{{/}}
- Using conditional smart values to show a -specific Jira field: Original Estimate- (errors)
- Assumptions
- The default value for {{issue.fields.timetracking.originalEstimateSeconds}} = 0
- Hence, is.Empty does not work here
- Results in: Error rendering smart-values when executing this rule
- {{#if(equals({{issue.fields.timetracking.originalEstimateSeconds}}, "0"))}}
Original Estimate is empty
{{/}}
- Results for no value in field and value in field: nothing
- {{#if({{issue.fields.timetracking.originalEstimateSeconds.lt(1))}}
Original Estimate is empty
{{/}} - same for .gt(0) instead of .lt(1)
- Results for no value in field and value in field: "Original Estimate is empty"
- {{#if(not({{issue.fields.timetracking.originalEstimateSeconds.lt(1)))}}
Original Estimate is empty
{{/}} - same for .gt(0) instead of .lt(1)
Thank you most kindly!
Timon