Using 'Multi-Level Cascading Select' Field as a source for 'Set a field from a set of rules based on regular expressions' Post-Function

Issue #21 resolved
Grigory Lev created an issue

Hi there. I have a 'Multi-Level Cascading Select' Field (based on Multi-Level Cascading Select plugin - https://marketplace.atlassian.com/plugins/com.sourcesense.jira.plugin.cascadingselect) And I have 2 custom fields: - first is a Multi-Level Cascading Select with 3 levels of options - second is a Number field which I want to be filled automatically based on first 2 levels of Multi-Level Cascading Select. I have created a Post-Function as follows

#!

The following will be processed after the transition occurs

1. Creates the issue originally.
2. The field CitiBank: APPA will be set according to the evaluation of CitiBank: Issue types against the following set of rules: 
(CCC.Ultima.*)125332
(CCC.Credit cards marketing.*)124109
(CCC.Miles&More.*)124632
(CCC.Stockmann.*)125232
(CCC.Credit Сards.*)124352
(CCC.Aeroflot.*)124232
(CCC.MTS.*)124332
(CCC.Neste.*)124432
(CCC.CitiExpress.*)124532
(CCC.CASH BACK.*)124732
(CCC.Megafon.*)124932
(CCC.CORE.*)125132
(CCA.PIL.*)129209
(CCA.CO.*)129998
(CCA.CG.*)127751
(CCA.CPC.*)120386
(CCA.B@W.*)126866
(CCA.Retail Marketing.*)127544
3. Re-index an issue to keep indexes in sync with the database.
4. Fire a Issue Created event that can be processed by the listeners.

As I understand from your Docs this works for standard 2-level Cascading Select, but this does not work for Multi-Level Cascading Select. Can you please help me with the correct usage of Multi-Level Cascading Select in the formulas?

Comments (6)

  1. Fidel Castro Armario repo owner

    Hi Grigoriy,

    Multi-Level Cascading Select custom fields are not currently supported. I will try to give support in next version of the plugin, in two weeks approximately. I will make a beta version available as soon as possible.

    Regards.

  2. Grigory Lev Account Deactivated reporter

    I have found a solution!

    #!
    Creates the issue originally.
    The following parsed text will be copied to Ephemeral string 1: 
    #CitiBank: Issue types#
    The field CitiBank: APPA will be set according to the evaluation of Ephemeral string 1 against the following set of rules: 
    (CCC\, Ultima\,.*)125332
    (CCC\, Credit cards marketing\,.*)124109
    (CCC\, Miles&More\,.*)124632
    (CCC\, Stockmann\,.*)125232
    (CCC\, Credit Сards\,.*)124352
    (CCC\, Aeroflot\,.*)124232
    (CCC\, MTS\,.*)124332
    (CCC\, Neste\,.*)124432
    (CCC\, CitiExpress\,.*)124532
    (CCC\, CASH BACK\,.*)124732
    (CCC\, Megafon\,.*)124932
    (CCC\, CORE\,.*)125132
    (CCA\, PIL\,.*)129209
    (CCA\, CO\,.*)129998
    (CCA\, CG\,.*)127751
    (CCA\, CPC\,.*)120386
    (CCA\, B@W\,.*)126866
    (CCA\, Retail Marketing\,.*)127544
    Re-index an issue to keep indexes in sync with the database.
    Fire a Issue Created event that can be processed by the listeners.
    
  3. Grigory Lev Account Deactivated reporter

    Back slash before comma, and .* after second level - all values from third level are passing this condition perfectly well!

    You can add this to description!

  4. Fidel Castro Armario repo owner

    Added support for Multi-Level Cascading Select in version 2.1.12 of the plugin. Now you can use %{nnnnn.l} to read the value of level l in a custom field of type Multi-Level Cascading Select. Root level is '0'.

  5. Fidel Castro Armario repo owner

    Version 2.1.22 has introduced a bug relative to the Multi-Cascading field support. When referencing levels in a Multi-Cascading Select field use always 2 digits for index part, i.e., use %{nnnnn.ii} instead of %{nnnnn.i}. Example: use %{10001.04} instead of %{10001.4}

    This bug will be solved in version 2.1.23. You can follow #80.

  6. Log in to comment