Set Field conditional on Checkbox Values
JIRA Software 7.4.1, JWT 2.2.39
I have a custom field checkbox that can have more than one value. Depending on the checkboxes, I need to update the Description field. I have created Multi-line text boxes with the default value set to the text for each selection. I am copying the value to ephemeral, then using that value to set the Description depending on the selection in the checkbox. Example: Checkbox options, 1, 2, 3 Option 1 will result in Text A being written to description. Option 2 will result in Text B being written to description. Option 3 will result in Text C being written to description. If Option 1 and 2 are chosen, I want A and B written. If 1And/OR 2 AND 3 are chosen, I only want A and/or B written, and NOT C. Basically, I only want C if 3 is the ONLY selection.
Comments (10)
-
repo owner -
reporter - attached Selection_029.png
-
reporter I would like Description to follow the calculated text, and that seems to work, but I can't seem to figure out how to set the conditional arguments.
-
repo owner Is "NCATS Department" the checkbox field?
Which are the exact names of the options of checkbox field?
-
reporter I am close, but an additional issue I have found is that I can't get the strings to create page breaks correctly. First image is the formula, second is how it shows in the Postfunction tab, and third is the actual result in the description field of the created issue.
-
reporter Fidel,
I was able to find a resolution. I simply made the default values of my custom fields begin with an empty line, that way, it would render correctly after running the Post function. Additionally, I found this resolved my conditional issues: Thank you for your quick resonse
-
repo owner Hi @NCATS_Lab,
You can add page breaks using prefix
a
in your setting rules. This prefix forces to evaluate the value part of setting rules in advanced parsing mode. Then you can use\\n
for inserting line breaks in the string expression at the value part.Example:
a((.*CyHy/Dev/RVA.*)(.*Lab.*))%{00061} + %{00062} + "\\n"
-
reporter That is helpful, thank you.
I also would like to create a set of subtasks off this issue, too. I keep getting, "We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file."
Should I start a new ticket for this?
-
repo owner Please, create a new issue and attach your server's log file.
Also attach to the new issue a screenshot of the validation's tab of your Create Issue transition.
-
reporter - changed status to resolved
Issue Successfully resolved
- Log in to comment
Hi @NCATS_Lab,
Do you want Description field to be overwritten with the calculated text you have described, or do you prefer the calculated text to be appended to the original content of the Description field?
Can you, please, attach a screenshot with the post-function's tab of your attempt to implement the described functionality?