Assign issue depending on custom field value and let the project admin maintain the value/assignee pairs

Issue #734 resolved
Karo Salminen created an issue

I need to configure JWT to automatically assign a person depending on a custom field value, let’s say a assignee depending on a department that is set to custom field. I can surely create a post-function "Set a field as a function of other fields”, but I would like that a non-technical project administrator could manage the information related to that. Can you recommend any way to handle this? The custom field value list is not subject to frequent change.

Comments (7)

  1. Fidel Castro Armario repo owner

    Hi @ karosalminen,

    You can create a Project Role for each department, and assign a unique user to this project role.

    Then you can use "Set a field as a function of other fields" post-function with a configuration similar to this one:

    Captura de pantalla 2017-08-14 a las 13.13.02.png

    Setting rules in the example are:

    a(Finance)first(usersInRole("Finance"))
    a(Purchases)first(usersInRole("Purchases"))
    a(Human Resources)first(usersInRole("Human Resources"))
    
  2. Karo Salminen Account Deactivated reporter

    Thanks! This works perfectly for a such information as department, but let's say I wanted to assign a person according to custom field that contains a numeric value and let the project admin to manage that information. For example, amount of euros. Any ideas for that?

  3. Fidel Castro Armario repo owner

    In that case you should use setting rules like these ones:

    a[{nnnnn} < 100]first(usersInRole("Finance"))
    a[{nnnnn} = 100]first(usersInRole("Purchases"))
    a[{nnnnn} > 100]first(usersInRole("Human Resources"))
    

    where nnnnn is field code for a numeric field.

    In this case the value selected in parameter "Field to be checked..." doesn't matter at all, since we are only using type 2 setting rules.

  4. Karo Salminen Account Deactivated reporter

    Thanks, this is what I had in mind, but was thinking if there was a way for project admin to manage the values according which different project roles are assigned.

  5. Fidel Castro Armario repo owner

    You can use a project property in your project's description for each numeric value associated with each role. For example:

    {Finance=10}
    {Purchases=50}
    {Human Resources=100}
    

    And then use the following setting rules:

    a[{nnnnn} < toNumber(projectProperty("Finance"))]first(usersInRole("Finance"))
    a[{nnnnn} = toNumber(projectProperty("Purchases"))]first(usersInRole("Purchases"))
    a[{nnnnn} > toNumber(projectProperty("Human Resources"))]first(usersInRole("Human Resources"))
    
  6. Log in to comment