Jira Automation / Then Action / Custom Fields

ToM
Contributor
November 2, 2024

I have an issue with my project automation.

For ressource planning and due to controlling options, I created a project, where I add a ticket / customer and kind (e. g. Customer A => Retainer Customer ==> Ticket Type Support Customer / Customer B => Project Customer ==> Ticket Type Project Customer / Customer C is Retainer & Project Customer split into two ticket C Support - Support Customer && C Project Project Customer.

Within the tickets I work with custom fields, which are important for the Support Customer (and as well other retainer customers). This are the custom fields:
- Is Retainer customer | Yes/No
- Retainer booked (number field for hours booked / month)
- Retainer left (number field > hours booked/month - hours worked)
- Has one-time credit => Yes / No
- One-Time credit booked => Number field for (support) hours purchased
- One-Time credit left => (One-Time credit booked - hours worked)

I hope this is written in a way that is understandable.

So what I now plan to do is, to have a rule for each month where I like to reset the retainer left hours and set it back to the value of retainer booked.

For this I created an automation
Trigger: "When: schedueled First day of the month at 12:00am"
If "Is Retainer customer" == yes
"Then": Send email:
To: Group Account Management && Assignee
Subject: Retainer used last month - {{issue.key}} -- {{issue.summary}} 
Text: Within last month XX.XX support hours were used, monthly retainer contingent now reset to YY.YY hours.

And here I struggle, as within the "Then" option, I don't have a chance to use the custom fields.
If I open the "Smart Values" menue and click on "Custom fields" I got this message:

No custom fields found
To load custom fields, add components that output ISSUE before the current component.

And I don't get that point. I seek for a solution with google, in this commuity chat and als tried ChatGPT, but without any useful idea.

What is my mistake, what am I missing here?

I am looking forward to your comments and help, thank you in advance

2 answers

1 accepted

5 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2024

Hi @ToM 

For a question like this, context is important for the community to help.  Please post the following:

  • what type of project is this (e.g., company-managed, team-managed, etc.), 
  • an image of your complete automation rule,
  • images of any relevant actions / conditions / branches,
  • an image of the audit log details showing the rule execution, and
  • explain what is not working as expected.

Until we see those...

I hypothesize your Scheduled Trigger does not have any JQL, and so the rule has no issues available yet for the conditions and actions to use.

If each "customer" for whom you want to process only has one issue, adding JQL to the trigger will help.  I recommend writing / testing the JQL standalone outside the rule with Filters > View All Issues.

Kind regards,
Bill

ToM
Contributor
November 2, 2024

Hi Bill

- it is company-managed
- Images just show what is written above, can deliver them but i think not necessary. And what excactly not working is the thing, that I cant choose custom fields within "then" actions, like explained.

It doesn't matter how many issues a customer has, as in my case the customer is the issue I like to work with. Each customer is add as an issue/ticket as explained before, as I use it for ressource management reasons

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 2, 2024

Repeating my earlier hypothesis, does your Scheduled Trigger have a JQL expression?

If not, that is the cause of the error.

Like ToM likes this
ToM
Contributor
November 2, 2024

Ok, I got it, thank you @Bill Sheboy you are right, the JQL was missing, now it is working as expected.

Like # people like this
0 votes
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 2, 2024

Hi @ToM , thanks for your question. 

If you're asking about how to write the syntax for the smart values in the email message for custom fields, there is an explanation here in the documentation - https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#Available-properties 

Is this what you are looking for? Or do you need something else?

Best wishes

ToM
Contributor
November 2, 2024

Looks good to me, I will try it. What I don't understand is, that in if-cases I see the custom fields and can directly choose them, but in Then-actions, I can't.


Will try with manual entered values, let's see

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events