Behaviours plugin - make Original Estimate field required

Vidic Florjan
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.
January 30, 2015

I'd like to make Original Estimate field required by using Behaviours plugin. What's the proper way to address the Original Estimate field?

My code:

FormField fcompl = getFieldById(fieldChanged)
// FormField foest = getFieldByName("Original Estimate")
FormField foest = getFieldByName("Time Tracking")
String vcompl = (String) fcompl.getFormValue()
if (vcompl == "16340") {
        foest.setRequired(true)
        foest.setHelpText("Required.")
        fcompl.setHelpText("Field Original Estimate is required.")
   }
    else
   {
       foest.setRequired(false)
       foest.setHelpText("Not required.")
       fcompl.setHelpText("Field Original Estimate is not required.")
   }

2 answers

1 accepted

1 vote
Answer accepted
JamieA
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.
January 30, 2015

IIRC it's getFieldById("timetracking")

Vidic Florjan
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.
January 30, 2015

Thanks for tip. I changed the approach by searching id. It's getFieldById("timetracking_originalestimate").

JamieA
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.
January 30, 2015

time tracking stuff is not supported well in behaviours at the moment...

2 votes
Chander Inguva
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.
June 15, 2016
  • For Original Estimate, use getFieldById("timetracking_originalestimate")
  • For Remaining Estimate, use getFieldById("timetracking_remainingestimate")

Suggest an answer

Log in or Sign up to answer