Jelly aborts if "required field" is missing

Stefan Niedermann July 17, 2013

i have a workflow where i use the "required fields"-validator.

if i want to run a jelly script (some auto-transitions), and one field is missing, the whole jellyscript stops and throws an exception.

is there an option that the transition just does not happen, without kicking the whole script off?

regards

4 answers

0 votes
Stephan Bielmann
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2013

Seitens der Ausführung, sehe ich keinen Unterschied zwischen dem JIRA "Permission Validator" und dem "Fields Required" Validator vom Plugin. Wenn ich zum Beispiel die Permission "Close Issues" validiere, und ich als Benutzer die nicht habe, bricht JIRA auf die selbe Weise während der Transition ab.

Stefan Niedermann July 22, 2013

Natürlich, aber ein Jellyscript bricht nicht gleich komplett ab, es vollzieht lediglich diesen Übergang nicht und macht dann weiter.

0 votes
Stephan Bielmann
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 21, 2013

Keine Sorge, ich habe es auch in englisch verstanden. Aber ich kenne mich mit Jelly nicht aus, denke aber das es die Idee hinter dem Ganzen ist, das das Skript eben auch nicht weiter darf, wenn der Workflow nicht tut.

Stefan Niedermann July 21, 2013

Bei von JIRA mitgelieferten Validatoren / Bestätigungen brechen Jellyscripts nicht ab, sondern nehmen nur zur Kenntniss, dass dieser Übergang nicht vollzogen werden darf. Dieses Verhalten kenne ich auch von diversen anderen Plug-Ins.

Da Jelly-Scripte ähnlich wie Cronjobs immer wieder regelmäßig im Hintergrund laufen, muss man sich darauf verlassen können, dass es auch durchläuft. Wenn es immer beim ersten Vorgang abbricht, und nachstehende Aufgaben aufgrund einer Exception nicht weiter ausgeführt werden können, muss ständig im Log-File nachgesehen werden, ob es Probleme gab.

0 votes
Stephan Bielmann
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 18, 2013

Swiss

Stefan Niedermann July 18, 2013

Ok, ich spreche nämlich deutsch ;-)

Meine Erwartung war, dass das Jellyscript den Vorgang überspringt (Er darf den Übergang ja nicht ausführen). Stattdessen bricht aber das komplette Jellyscript ab.

Ich möchte per Jelly automatisiert eine gewisse Anzahl von Vorgängen in einen anderen Status versetzen - wenn es nicht geht, geht es eben nicht, aber das Jellyscript wird beim Ersten Vorgang abgebrochen, das nicht die Bedingungen erfüllt. Alle anderen (die ja die Bedingung erfüllen) werden dann auch ignoriert.

0 votes
Stephan Bielmann
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 18, 2013

The required fields validator makes sure that the fields that are configured as being required are given, else the transition will fail and thus JIRA stops executing it. So from my point of view, your script is aborted for a good reason.

I am no Jelly Script guru, I don't know whether there is a way continue a script when a workflow transition is aborted. But to complete that transition, you will have to provide the required fields.

Stefan Niedermann July 18, 2013

Thanks for reply.

are you german?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events