Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Make a field mandatory in workflow validator JMWE

I have a workflow that is shared by many projects (60+), but I have 5 projects that the customer is requesting a particular field be required when the other projects don't want that field to be required. I was thinking I could use the JMWE Field Required Validator to make the field required on a transition only when the issue the user is working on is from a particular project. 

I tried this expression:
project == A || project == B || project == C || project == D || project == E
but when I test it on a defect from E it fails on A.

Is what I'm trying to accomplish even possible?

2 answers

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 07, 2023

Hello @Lori Milam 

Looking at the example provided here, I suggest that you try replacing project with issue.project

https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/466226183/Build-your-own+scripted+Validator

Thank you but doing this didn't make a difference. It still fails on A.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 07, 2023
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 07, 2023

I think you also need to have quotes around the values:

issue.project.name == 'First Project Name' || issue.project.name == 'Second Project Name'

Or it seems you could use the project key also:

issue.project.key == 'FPN' || issue.project.key == 'SPN'

Like Ralf Fehling likes this

Yes! This is the final expression that works.


issue.project.key == 'UKBT' || issue.project.key == 'UKAP' || issue.project.key == 'UKPAY' || issue.project.key == 'RULES' || issue.project.key == 'UKIC'

Thank you!

Like # people like this
0 votes
Ralf Fehling
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.
Nov 07, 2023

Hey Lori,

Did you qualify the expression? 

{{issue.project}} - the project this issue is a part of.

Can you show us a screenshot of the postfunction? 

 

Regards

Ralf 

It's not a post function but a Field Required Validator. I didn't wrap with {} but I did qualify.

issue.project == UKBT || issue.project == UKAP || issue.project == UKPAY || issue.project == RULES || issue.project == UKIC

Thank you for responding.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events