Our developers are currently trying to add a prefix based on the task category field in our tasks. For example: if the task category is 'Feature', the GitLab string would be automatically updated to feat/ git commit -m "PRD26-65 General PnL Improvements", instead of git commit -m "PRD26-65 General PnL Improvements". Would it be possible to automate this ? Currently, I can only do this manually.
Hello @Joud Dakkuri
Have you Tried Automation ? They Support Conditional Logic.
Automation smart values - conditional logic | Cloud automation Cloud | Atlassian Support
Yes, but it's still not working
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We need more Information, Field Type, some Screenshots from you.
Maybe Screenshot from Automation you tried.
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.
Task Category is a checkbox field type
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When Task Category is a checkbox field, Jira automation treats it as a list of values, not as one plain text value. For multi-checkbox fields, Atlassian’s examples use .value as a list and then methods like .join(...). Text functions only make sense after that list has been turned into a string. Also, the text function is toLowerCase(), not lowerCase.
So I would try this instead:
{{issue.Task Category.value.join("-").toLowerCase()}}/{{issue.key}}
And if your checkbox option labels themselves contain spaces, then this is usually safer:
{{issue.Task Category.value.join("-").toLowerCase().replace(" ","-")}}/{{issue.key}}
If Copy sample Git commit is just a normal text field, I would use Choose fields to set instead of the JSON box. Atlassian only recommends the Additional fields / JSON section when the field cannot be edited through the normal field picker. Your trigger setup itself is fine, because Field value changed supports custom fields and can be limited to the Create work item operation.
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.