Forums

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

Check a Box with a Postfunction

Renee Olson July 28, 2020

Has anyone had any luck setting up a post function to update a field to check a box if a certain state is selected in a workflow.

 

Example

To

In Progress

Ready for Test

On Hold -  When on hold is selected - a box is checked in the issue screen that says "on hold"

Done

 

Suggestions?

3 answers

1 accepted

0 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.
July 28, 2020

Using JMWE, you can add a Set Field Value post-function to the transition, and configure it as such:

  • Field: your checkboxes field
  • Value type: leave as "Constant or Groovy Template"
  • Value: the name of the checkbox you want to check ("On hold"?)
  • Add source value(s) to destination field option: checked

This will check the "On hold" checkbox (option) of the the checkboxes custom field, leaving other options (checkboxes) of that field untouched, if any.

Renee Olson July 28, 2020

Thank you so much!!!  That worked!

0 votes
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.
July 28, 2020

Hi @Renee Olson  you can achieve this easily using Scripted Post-function if you have a Script Runner plugin.  or you can update issue field using JSU Utility plugin

https://community.atlassian.com/t5/Jira-questions/How-to-set-a-checkbox-field-to-a-value-using-a-post-function/qaq-p/190954

 

https://community.atlassian.com/t5/Jira-questions/Updating-an-existing-checkbox-in-Groovy/qaq-p/1139426

Renee Olson July 28, 2020

We're not using JSU.

Renee Olson July 28, 2020

The script runner option appears to be for a sub-task.  I'm looking to have a field on the main task/issue updated.

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.
July 28, 2020
Renee Olson July 28, 2020

Script runner isn't an option for me.

0 votes
Najjar _Innovura_
Atlassian Partner
July 28, 2020

What addons/apps does your instance have?

Renee Olson July 28, 2020

JMWE is what I use for workflows. I am trying to use the configure field option to tell it to check the box at a specific status in the WF

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events