Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

[JMWE] Current user Validator (please Help)

RIZKY JTUASIKAL
Contributor
April 21, 2024

There is a condition, where I am the current user, and registered in the User* field.

Part 1.PNG


and I want the following conditions to work, ie:
if I am registered in the User* field, then the User Evidence Url field must be left blank.

Part 2.PNG

how can the above condition be achieved?
because I used the following method, and the condition could not be achieved.

part 3.PNG

4 answers

3 accepted

4 votes
Answer accepted
Neel Mohapatra _Appfire_
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.
April 22, 2024

Hi @RIZKY JTUASIKAL ,

You can make use of a validator like the one shown below and add a condition checking if the current user matches the User field and then check if the field is empty.

Screenshot 2024-04-22 at 1.09.12 PM.png

Let me know if you have any questions or if it helped.

RIZKY JTUASIKAL
Contributor
April 22, 2024

Hi @Neel Mohapatra _Appfire_ ,

I tried using your advice, and it worked!!!

thank you very much for your help, and have a good day

 

Rizky

2 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 21, 2024

Hi @RIZKY JTUASIKAL 

You cannot achieve this with the User validator. You need to use a Build-your-own validator with a script like:

user.accountId != issue.customfield_12345?.accountId || !issue.customfield_12905

 where you need to replace customfield_12345 with the field ID of the User* field 

RIZKY JTUASIKAL
Contributor
April 22, 2024

Hi @David Fischer ,

I thought I could use User Validator to get those results :(

 

thank you so much for your advice, it means a lot to me!

0 votes
Answer accepted
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 21, 2024

Hi @RIZKY JTUASIKAL In such case, you need to create a post function, if User* = currentUser then clear field "User Evidence Url" 

Or with the help of automation you can also do this, set field value to null if User* = currentUser.

 

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 21, 2024

Hi Rizky,

I am not a JMWE expert but it looks like you need to add a condition also to check if the field is Empty (null). So it would be an OR.

Suggest an answer

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

Atlassian Community Events