In my JSM, if affected user and approvers are the same person, it means this user can approve own request. Does anyone can share some idea with me? How to restrict a user can not approve own request?
The field type of Affected user is assets objects. the field type of approvers is user picker(multiple user)
Hello @Benjamin Zhou
Automate Reporter Assets Field in JSM Cloud | Jira and Jira Service Management | Atlassian Support
This KB Articles should be Informative for you.
You can use the native Exclude approvers from setting on your workflow's approval step, but it only accepts standard Jira User Picker fields, not Assets object attributes.
Create a hidden User Picker field and use Jira Automation to copy the user account out of your Assets object into it. Then, add that new helper field to your workflow's approval exclusion list. Just remember that you'll need global Jira Admin rights to edit workflow approvals, and be sure to set up a fallback routing rule in case the affected user happens to be the only listed approver on the ticket.
Best,
Arkadiusz
@Arkadiusz Wroblewski thank you so much for the link shared. I am sorry I can not change the field type, and also, I can not make the change on "affected user" and "approvers". If so, to restrict a user can not approve own request in JSM, what I should do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Benjamin Zhou You don't need to change either field - you need one extra hidden field that mirrors the Assets object's user, because the native "Exclude approvers" setting only speaks user-picker.
The pattern:
1. Create a new user picker field (call it "Affected person (user)") and keep it off the portal form entirely - requesters never see it.
2. Automation rule: when issue created (or when the Affected user Assets field changes), set "Affected person (user)" from the user attribute of the Assets object. The Atlassian KB "Automate Reporter Assets Field in JSM Cloud" that Arkadiusz linked shows the smart-value syntax for pulling an attribute out of the Assets object.
3. In your workflow's approval step, set Exclude approvers = "Affected person (user)".
Now the person the request is about physically cannot appear as an approver, enforced by the approval step itself rather than by hoping nobody notices. Your existing fields stay untouched - the mirror field is additive, which usually gets past the "we can't change the form" constraint, because you aren't changing anything anyone sees.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Shreyas_Quietmill thank you very much for your reply. I read through your answer, after that I have a concern, please feel free to let me know if my understanding is wrong. I am using cloud, JSM, not JIRA. I want users to get a error notice before they submit a request when Affected user (asset object)= approver. If I use your method, it looks like it will take effect after user submit the request, because automation will run after the request is submitted. Am I right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Benjamin Zhou You're right - the automation runs after submit, and there's no way on JSM Cloud to throw an error before submission. The portal can't compare two fields at submit time, with or without Forms.
Instead, I would add a workflow status, i.e. a stage in the ticket's life (like "To Do → In Progress → Done"). before the approval status (call it "Triage").
The Flow becomes:
You can't show the notice before submit, but you can show it right after: have the same rule drop a comment on the request - something like "since this request is about you, someone else needs to approve it - it's gone to X instead". It lands seconds after they hit submit, so nobody's left wondering why they can't approve their own ticket.
True submit-time validation would need Atlassian to build it :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Shreyas_Quietmill Thank you again for your support! Your answer is very valuable for me. I do appreciate your support!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One quick technical tip: add a Re-fetch issue data action right after populating the hidden user field and before transitioning out of Triage.
Jira Automation uses cached data during execution, so re-fetching ensures the transition evaluates the updated helper field when setting up approvals.
Best,
Arek🤠
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.