Validation based on JQL query is not working
Hi,
I am trying to add a validation based on JQL query to avoid issue duplication and it is not working:
JQL query: project = "%{00018" AND cf[11011] = "%{11011}"
It is searching any issue in the same project with same value of custom field 11011
Codition: {00058}=0
I can see folowing jira log output:
FIELD VALUE BEFORE BEING CONVERTED TO STRING OBJECT "Project key" BELONGS TO CLASS "class java.lang.String" AND CONTAINS VALUE "XXX".
CUSTOMFIELD VALUE OBJECT "Carrier" BELONGS TO CLASS "class com.atlassian.jira.issue.customfields.option.LazyLoadedOption" AND CONTAINS VALUE "COL".
FIELD VALUE BEFORE BEING CONVERTED TO STRING OBJECT "Carrier" BELONGS TO CLASS "class com.atlassian.jira.issue.customfields.option.LazyLoadedOption" AND CONTAINS VALUE "COL".
VALUE BEFORE PROCESS TO BE ASSIGNED OBJECT "Ephemeral number 1" BELONGS TO CLASS "class java.lang.Integer" AND CONTAINS VALUE "0".
It means the query returned 0 and according to defined condition, the validation should be True.
out put:
$assertionsDisabled - boolean - true VALUE AFTER PROCESS TO BE ASSIGNED OBJECT "Ephemeral number 1" BELONGS TO CLASS "class java.lang.Double" AND CONTAINS VALUE "0.0".
I understand the log is OK, validation is TRUE.
But I got the Message that validation fails, and I cannot proceed.
I already tried other queries: (hardcoded) project = "XXX" AND "Carrier" = "COL"
same result: 0 issues
but stil not able to proceed.
Please bring me some light on that.
Thanks
Comments (10)
-
repo owner -
Hi Fidel. I'm here in behalf of Flavio.
I figured out that the problem is in the Creation transition.
If I create this validator on another transition, it works perfectly, but on creation, it fails all the time, no matter the expression I put.
I even tried {00058} > 0, and it fails...
Do you have any suggestions?
-
repo owner Hi,
I have found the bug and fixed it in version 2.1.16_beta_4.
Please, tell me if it solves your problem.
Regards.
-
Fixed! When this version is planned to be released? Thank you!
-
repo owner JIRA Workflow Toolbox 2.1.16 will be released not later than 30th April.
-
Sounds great! I am facing the same problem and trying to find workaround until new version of plugin becomes available. In my company it may take time until they update plugin, so could you please give some details on the bug so I could try to find temporarily workaround.
-
repo owner The problem is due to the way "Ephemeral number 1" field is implemented. It needs the issue to be created in order to be used, and since "Create Issue" transition has not been yet executed when validator is used, the issue is not actually created by that moment.
The new version solves the problem, as it allows the field to be used even if the issue has not been created.
The only workaround I can think of is to insert the validator temporarily in another transition, at least you will be able to warn the user that the issue is duplicated, and ask him to delete it.
-
Thank you. In our case it does not make too much sence to do verification during other transitions then Create, so I will wait for the update (2.1.16) come our from Beta phase. Thanks again!
-
repo owner Hi,
I'm really sorry for not having been able to release the new version (2.1.16) of the plugin today. This new version has many important improvements and new features, that require extensive testing to guarantee backwards compatibility, and revision of documentation and interface.
The new due date for the release of version 2.1.16 is monday 5th May.
Regards,
Fidel
-
repo owner - changed status to resolved
Fixed in version 2.1.16.
- Log in to comment
Hi Flavio,
Use the following JQL query: project = "%{00018}" AND cf[11011] ~ "%{11011}"
and the following formula: {00058}=1
You should have a configuration similar to the one shown in the following screenshot:
Some explanation: