On this page


Features used to implement the example



Example: Changing issue priority depending on issue description

Is it possible to change the workflow to use a string in the issue description to alter the issue priority upon issue creation? Let's say we receive an e-mail with a string like this in it "REPORTEDPRIORITY= 1". Is it somehow possible to use this string from the description to change the issue priority to 1 with a post-function?

It's possible to do it simply by adding a post-function Set a field as a function of other fields in transition "Create Issue", setting field "Priority" depending on whether field "Description" matches one of a set of regular expressions. You can see exactly how to do it in the following two screenshots:


Setting rules used were:

((.|[\r\n])*\bREPORTEDPRIORITY\s*=\s*0\b(.|[\r\n])*)Blocker
((.|[\r\n])*\bREPORTEDPRIORITY\s*=\s*1\b(.|[\r\n])*)Critical
((.|[\r\n])*\bREPORTEDPRIORITY\s*=\s*2\b(.|[\r\n])*)Major
((.|[\r\n])*\bREPORTEDPRIORITY\s*=\s*3\b(.|[\r\n])*)Minor
((.|[\r\n])*\bREPORTEDPRIORITY\s*=\s*4\b(.|[\r\n])*)Trivial

Once configured, the transition looks like this:




Other examples of that function