For a multi-project rule, can an action apply on condition if field exists in issue?

Pat Schilling June 12, 2024

What is the syntax for:   IF (fieldname) EXISTS       

Assuming multiple projects have been setup without exact copies of all fields in the various projects.   However,  among the projects, the different issue types have one of the following fields:

  1. End date
  2. End Date
  3. Close date

I would like like to create a rule that sets the date in the field that exists.
Currently, trying on all three, the rule sets the date in the existing field.  But, it also triggers an error to complain about the two fields that don't exist in the particular issue.

Note that being case sensitive, End date is a different field from End Date. 

 

2 answers

1 accepted

0 votes
Answer accepted
Bill Sheboy
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.
June 13, 2024

Hi @Pat Schilling 

First thing, I suggest not having different fields where the display names only vary in capitalization.  This will confuse users and potentially some Jira internal processing.

 

Next, what types of projects are you using: company-managed, team-managed, etc.?

This is relevant because automation rules easily become confused by same-named fields in different projects.  This is worsened by the design of team-managed projects which have distinct field configurations for each project.

 

So, what can be done to solve this situation?  

  • If your fields have the same purpose, perhaps create a single field in the global admin functions and use that with each project.  Team-managed projects can now use global fields and so that mitigates the configuration issue.
  • If your fields have different purposes and your rule is limited to specific projects, perhaps use the issue's project key in rule conditions to select the correct field.
  • And...if your fields are different, have the same names, and are in team-managed projects, you may want to use their custom field values with advanced edit with JSON to prevent update errors.

Kind regards,
Bill

Pat Schilling June 13, 2024

Nice to know the first choice above, creating a single field in global admin functions, is available.   Will try that.

0 votes
Pat Schilling June 12, 2024

Rename the fields to one name:  End date.

The name of the custom field is a project specific and editable name that points to the actual unique index to the field.   The rule uses the field name as a lookup to the pointer to the underlying data field.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events