Hi,
I've got custom field "QA Status" with values QA verified, QA pending, QA not needed
And I need to automatically set this field to "QA pending" if it is in "QA verified" when issue is reopened.
I try to use something like this:
FormField QAStatus = getFieldByName ("QA Status")
String QAStatusVal = QAStatus.getFormValue()
if(QAStatusVal == "QA verified")
QAStatus.setFormValue ("QA pending")
and
FormField QAStatus = getFieldById ("customFieldId=10800")
String QAStatusVal = (String) QAStatus.getValue()
if(QAStatusVal == "QA verified")
QAStatus.setValue ("QA pending")
But nothing is working for me.
I'm a new one in Behaviours. Please, help.
Thank you!
Hi Valeriya,
Glad to help.
Could you pls. tag this as the best answer to your question if this really helped. Thank you. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could add a Condition to your transition for Reopen (the one with the post function for setting the custom field "QA Status" value to "QA Pending") that it can only be clicked if the value of the custom field is "QA Verified" with the ff. settings :
1. Choose the "Value Field"
2. Field: QA Status
Condition: =
Value: QA verified
Comparison Type: String
Then you could add another transition that will reopen your issue but will not change the custom field "QA Status" value to "QA Pending" with the Condition that this will only be shown if the value of your custom field "QA Status" is not equal to "QA Verified"
1. Choose the "Value Field"
2. Field: QA Status
Condition: !=
Value: QA verified
Comparison Type: String
Since only one transition will be shown you can now reopen an issue and enact your desired post function depending on the custom field "QA Status" 's value.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Valeriya,
You could automatically set the value of your custom field "QA Status" to "QA pending" by adding a post function to the transition that will reopen your issue.
This way, everytime the transition for reopen is clicked, the custom field value will be changed to "QA pending".
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you!
But this could help if only I just need to chenge status on current transition, but before changing it, I need to check current status and if it is "QA verified" then set it to "QA pending". If it wasn't set to "QA verified" (we have 5 more variants) then I don't need to change it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.