Forums

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

Behavior to limit character length and value in a custom text field

Scott Federman
Contributor
November 10, 2020

Hey all, 

I'm sure this is pretty easy but I'm pretty clueless with scripting. Could someone help me with a behavior that would only allow 2 characters and values of 0-25? Custom Field ID is 11850.

2 answers

1 vote
Sanjay Pais
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 13, 2014

Hi Nic,

I actually solved the issue. It was there all along. The Workflow transition has a post functions. One of the post functions is Update Custom Field. The variable to use is %%ADD_CURRENT_USER%%

I was using  CURRENT_USER which would replace the value in the field. I tested the transition and it works.

 Thanks

Nic Brough -Adaptavist-
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 Champions.
November 13, 2014

Excellent, I didn't know that had been added to the plugin - I've always known of %%CURRENT_USER%%, that's been there for years, but it's good to see that. Thanks for the update!

0 votes
Nic Brough -Adaptavist-
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 Champions.
November 13, 2014

You need a post-function that can get the current list, append a new user based on current user and then update with the new list (what you're using now simply sets the value, which overwrites the list).  

Although I've done this with my own plugins and the script runner, I don't think there are plugins that can provide this for Cloud

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events