Hi,
Can anyone help me to create a trigger for incompleted ussues in Sprint? So, if I close him with button "Complete sprint" and some tasks incompleted, Jira offers me move them in next Sprint. I need a trigger to raise their priority. Here is my draft:

It works, but now priority changes always. Trigger shouldn't works with issues when I choose sprint for the first time, when I moderate them. I need automatically changes in priority only in sprint closing.
Meanwhile, can you tell about your own ways to control outstanding tasks? Are there any ways to mark incompleted tasks in Details or another fields?