Hi folks, I'm trying to notify my team via Slack about issues stuck in a specific column.
The alert is daily:
The problem is that I define the text for the notification as:
"Today we have {{issueList.size}} issues stuck in the status 'Awaiting Code Review'"
{{#lookupIssues}}
{{url}} | {{summary}} | {{now.diff(issue.status.lastUpdated).days}} dias.
{{/}}
The variables {{issueList.size}} and {{now.diff(issue.status.lastUpdated).days}} are not being displayed.
can your help me please
I noticed a few things in your use of Lookup Issues that might help...
(1) The results of Lookup Issues is a list, and so use the size function to learn how many results there are for the JQL. I recommend this, as it includes a default value of 0
{{lookupIssues.size|0}}
(2) As your lookup could be empty, I recommend adding some conditional logic to handle that case before sending the Slack message.
(3) I do not believe there is a field for the last update to a status which is available. Do you have an add-on for JQL that provides that? If not, you could modify your JQL and smart values to use either the Updated field or change the query to look for issues where the status has not CHANGED within a certain timeframe. For example:
project = myProject AND status = myStatus AND NOT Status CHANGED AFTER -2d
(4) Finally, when a rule is inside of an iterator like for Lookup Issues, you only need to use the field names and not the prefix issue. In fact, inside the other rule information is not visible at that scope. For example:
{{#lookupIssues}}
{{url}} | {{summary}} | {{updated.diff(now).days}} dias.
{{/}}
Please try those things to see how they help.
Kind regards,
Bill
Hi friend, thanks for your help. I made some changes, but why is the diff date the same result in all lines?
{{#lookupIssues}}
{{now}}| {{updated}} |{{now.diff(updated).days}}
{{url}} | {{summary}} | {{now.diff(updated).days}} dias.
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My apologies, as I forgot there is a defect/behavior of the order of dates with diff() when using now...as that cannot be first. Please try this:
{{updated.diff(now).days}}
I updated my earlier post to reflect this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.