1. I have Field
"Project Changes" : Infrastructure, Security, Application
2. I have Jira Group :
- Infra Team, members A, B, C
- Security Team, members D,E
- Aplication Team, members F,G,H
3. I Field "Developer" ( User Picker)
Can we maka error message "Unsuitable developer with Project Change type" if:
Field "Project Changes" = Security
Field "Developer" = H
I have Addon JMWE
you can create a "Build-your-own" Validator, but I cannot write the Jira expression for you as it needs to use issue field IDs which are specific to your instance. However, you can use the "Issue Fields" help tab below the editor to find these IDs.
I'm also not clear on why you mentioned the Jira group, as you don't seem to be referring to it in the validation.
Can you clarify?
what I mean about Jira Group its like this picture
what I want, If user change status, JMWE sends an email notification to the selected person in Field "Developer" ( its clear, I can do that used Post Fungtion used JMWE)
and what I need the status doesn't change ( message error) if the "Developer" field is incorrectly filled (mismatch between "Project Change" field and "Developer" field based on "Jira Group")
Oh, I think I got it. Each value of the "Project Changes" field has a corresponding "group" named after it (or kind of, based on your initially question: Infrastructure => Infra Team, Security => Security Team, Application => Application Team), and you want to force the user selected in the Single-user picker field named "Developer" to belong to the group matching the Project Changes field value. Right?
You can achieve this using a Build-your-own Validator, with the following script:
new User(issue.customfield_12105.accountId).groups.includes(issue.customfield_12345.value + " Team")
Note that you will need to replace customfield_12105 with the field ID of the Developer Single-user Picker custom field, and customfield_12345 with the field ID of the Project Changes single select custom field. You'll find them using the "Issue Fields" help tab below the expression editor.
IT try used it to my transition but its not work
Developer Single-user Picker custom field = 12097
Project Changes single select custom field = 12344
new User(issue.customfield_12097.accountId).groups.includes(issue.customfield_12344.value + " Team")
and I'm inspired and develop your script,
(new User(issue.customfield_12097.accountId).groups.includes("Application Team") && !!issue.customfield_12344 && issue.customfield_12344.value == "Application")
(new User(issue.customfield_12097.accountId).groups.includes("Security Team") && !!issue.customfield_12344 && issue.customfield_12344.value == "Security")
(new User(issue.customfield_12097.accountId).groups.includes("Infra Team") && !!issue.customfield_12344 && issue.customfield_12344.value == "Infrastructure")
Is your script making mine shorter? or what I made exactly what you meant?
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events