You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all master!!
I'm not a developer or programmer but this task assigned for me. I need your good help on his.
Attached is the flowchart for this project. GREEN colored words is can be manually assigned the status. BLUE colored words is to be automatically assigned the status when got decision selection.
Below is my code.
#Check if "Further clarification needed?" AND issue status = Technical Spec Understanding
self.status_id = 37 if (custom_field_value(28) == 'Yes') && @issue.status_id==36
#If Yes, issue status will be set into = Technical Spec Clarification
self.status_id = 38 if (custom_field_value(28) == 'No') && @issue.status_id==36
#If No, issue status will be set into = Pending Development
#Check if "Revise Technical Specification" AND issue status = Technical Spec Clarification
self.status_id = 39 if (custom_field_value(29) == 'Yes') && @issue.status_id==37
#If Yes, issue status will be set into = Technical Specification Revise
self.status_id = 38 if (custom_field_value(29) == 'No') && @issue.status_id==37
#If No, issue status will be set into = Pending Development
#Check if "Resubmission Technical Specification" AND issue status = Technical Specification Revise
self.status_id = 36 if (custom_field_value(24) == 'Yes') && @issue.status_id==39
#If Yes, issue status will be set into = Technical Spec Understanding
#Check if "Approval 1st Level Code Review" AND issue status = Developer Code Review
self.status_id = 44 if (custom_field_value(30) == 'Yes') && @issue.status_id==42
#If Yes, issue status will be set into = Project Team Lead Code Review
self.status_id = 43 if (custom_field_value(30) == 'No') && @issue.status_id==42
#If No, issue status will be set into = Developer Revise Code Review
#Check if ""Approval 2nd Level Code Review" AND issue status = Project Team Lead Code Review
self.status_id = 45 if (custom_field_value(31) == 'Yes') && @issue.status_id==44
#If Yes, issue status will be set into = Check in to SVN
self.status_id = 46 if (custom_field_value(31) == 'No') && @issue.status_id==44
#If No, issue status will be set into = Developer Revise Code Review
My Question:
How to make the custom field value become blank again after the process is back to the previous status so that we can make the decision selection again?
The text was updated successfully, but these errors were encountered:
I am not sure if understand your problem correctly but ActiveModel provides _was methods to access previous value of a filed.
In your case self.status_id_was will be pointing to the previous status.
Wrap it into an if statement:
# Issue status was changed from 45 => 44ifself.status_id_changed? && self.status_id_was == 45 && self.status_id == 44# do smthend
For simplify, I want to set the status automatically when user do the decision "Technical Specification Revise" = Yes or = No. As you can the flowchart below, there are looping. So when the status changed to Technical Spefication Review for 2nd time, the issue will automatically set the status into Technical Specification Revise again as the selection remain "Yes".
Example code.
#set the status into "Technical Specification Revise" if field "Revise Technical Specification = Yes" && current status "Technical Spec Review"
self.status_id = 39 if (custom_field_value(29) == 'Yes') && @issue.status_id==31
#set the status into "Technical Spec Assign" if field "Revise Technical Specification = No" && current status "Technical Spec Review"
self.status_id = 32 if (custom_field_value(29) == 'No') && @issue.status_id==31
Hi all master!!
I'm not a developer or programmer but this task assigned for me. I need your good help on his.
Attached is the flowchart for this project. GREEN colored words is can be manually assigned the status. BLUE colored words is to be automatically assigned the status when got decision selection.
Below is my code.
#Check if "Further clarification needed?" AND issue status = Technical Spec Understanding
self.status_id = 37 if (custom_field_value(28) == 'Yes') && @issue.status_id==36
#If Yes, issue status will be set into = Technical Spec Clarification
self.status_id = 38 if (custom_field_value(28) == 'No') && @issue.status_id==36
#If No, issue status will be set into = Pending Development
#Check if "Revise Technical Specification" AND issue status = Technical Spec Clarification
self.status_id = 39 if (custom_field_value(29) == 'Yes') && @issue.status_id==37
#If Yes, issue status will be set into = Technical Specification Revise
self.status_id = 38 if (custom_field_value(29) == 'No') && @issue.status_id==37
#If No, issue status will be set into = Pending Development
#Check if "Resubmission Technical Specification" AND issue status = Technical Specification Revise
self.status_id = 36 if (custom_field_value(24) == 'Yes') && @issue.status_id==39
#If Yes, issue status will be set into = Technical Spec Understanding
#Check if "Approval 1st Level Code Review" AND issue status = Developer Code Review
self.status_id = 44 if (custom_field_value(30) == 'Yes') && @issue.status_id==42
#If Yes, issue status will be set into = Project Team Lead Code Review
self.status_id = 43 if (custom_field_value(30) == 'No') && @issue.status_id==42
#If No, issue status will be set into = Developer Revise Code Review
#Check if ""Approval 2nd Level Code Review" AND issue status = Project Team Lead Code Review
self.status_id = 45 if (custom_field_value(31) == 'Yes') && @issue.status_id==44
#If Yes, issue status will be set into = Check in to SVN
self.status_id = 46 if (custom_field_value(31) == 'No') && @issue.status_id==44
#If No, issue status will be set into = Developer Revise Code Review
My Question:
The text was updated successfully, but these errors were encountered: