Hi,
I am looking to update a custom Date & Time Field based on if a user clicks the "Yes" option in a Checkbox field.
I tried Project Automation but we have the free version and not all features are available.
I thought the alternative may be a scripted custom Date & Time Field that updates when the choice is made?
I have used this code previously when an issue is created but unsure how to modify the code for a checkbox field?
This script shows you how to work with all sorts of custom fields. Note that check-boxes work the same way as multi-select lists!
I think you're probably right about using a scripted field - this would stop the users entering the wrong data into it. With a scripted field, the two tricks you need to know when coding it are 1) Remember to set the output template to the appropriate type - you're calculating a date, so I'd use a date/time template, 2) the value of the scripted field is what the script "returns", you do not have to set a value in the field, just calculate and return it.
Hi @Drishti Maharaj May i know for which event you are trying to update Date Time custom field ?
If you are looking to set field value for Issue Created event then i suggest you use custom Date Time field instead of scripted field and apply scripted post function, it will set value if checkbox is having value "Yes" .
If you are looking to update Date Time field for Issue Updated event then try to apply Scripted Listener, which will set value when user select "Yes" value in checkbox field.
Thanks
V Y
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.