Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JIRA Automation: Problem with Custom Field (Date Picker) that is being ignored

Gonzalo Perez Alonso November 16, 2023

I have set up an automation in JIRA that works as follows:

  1. WHEN: Issue transitions from (in progress, resolved, reopened and/or opened) to (closed).
  2. IF: Issue type is one of (task, sub-task, story and/or bug)
  3. THEN: Edit issue field (Custom field date picker) using the following smart value: {{now.jiraDate}}

When I tested the automation, the custom field wasn't modified. When consulting the audit log, it shows that the issue met the conditions (so steps 1 and 2 are properly programmed) but when performing the edit action (step 3), no edit was made. JIRA suggests 2 possible reasons:

  • No fields or field values to edit for issues (could be due to some field values not existing in a given project) - not the case, as I already checked the custom field is included within the screens of the project. 
  • Unknown fields set during edit, they may be unavailable for the project/type. Check your custom field configuration - neither the case, as this custom field is configured to be available for all projects in our instance.

At this point I'm stuck and I don't know how to proceed - any ideas? Thanks a lot in advance!

1 answer

1 accepted

0 votes
Answer accepted
Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 16, 2023

Hi @Gonzalo Perez Alonso,  welcome to Atlassian Coomunity, nice to see you here.

I'm not able to reproduce this problem, as you see here.

The rule

image.png

The result in history log

image.png

As you see by the yellow markings the My date field was not visibly updated during the rule execution itself (first yellow marking), but it shows changed in the issue itself (second yellow marking).

Just so I understand the exact problem for further investigation. Is the variance mentioned above (rule update ves history update) related to your problem, or is it that the field isn't even updated in the issue history?

It might be helpfull if you are able to attach images of the rule and of the issue history (like in my example above).

TimK.

Gonzalo Perez Alonso November 16, 2023

Hi @Tim Kopperud

Thanks for the quick response. The main problem I'm facing is that my custom field (E2E Close Date) is not being edited as I want to. 

Please find attached screenshots both for the automation and the audit log.

000057.jpg

000056.jpg

Like Pavithra Bathrachalam likes this
Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 16, 2023

Hi @Gonzalo Perez Alonso 

Do you see the field E2E - Close Date on the issue BET-9 itself? Are you able to set the field manually from that issue?

Though a field doesn't actually need to be included in any screens to be set, lack of seeing the field can be an indication of a context problem. Try check your custom field context

  1. Press the Cog icon (upper right corner) and select -> Issues -> Custom fields
  2. Find the field E2E - Close Date
  3. Press the Ellipsis menu to the right and select Context and default value

Confirm that the project BET and the issue types Tasks, Story, Bug and Sub-tasks are included in the applicable context.

If it states Global (all issues) the project BET and the issues types are included (global context is not reccomended though so it might be a narrower scope in your setup). 

The image below shows an example of the global context configuration.

image.png

You might attach an image of your context configuration if you're uncertain. 

TimK.

Like Pavithra Bathrachalam likes this
Gonzalo Perez Alonso November 16, 2023

Hi again,

Thanks for the clarifications but I had already checked that. I even run the "where is my field" diagnosis and everything seems correct (see the screenshot below)

Also, the field is being shown on the test issue. The problem is that the automation is not being done, as it doesn't get updated when I transition to Close status.

000058.jpg

Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 16, 2023

Hi @Gonzalo Perez Alonso.

1:
Have you confirmed that the user executing the rule has Edit permission on the issue?

2:
This is probably not the reason, but can you check if any edit restrictions are set on the Close status in your workflow? If the user executing the rule can manually edit the issue it is not set any edit restrictions.

image.png

 image.png

3:
You might also test if the rule works with another user as the Actor , e.g. yourself.

TimK

Gonzalo Perez Alonso November 16, 2023

Hey @Tim Kopperud

According to your first point, I also checked i had full edit permissions on the issue - please see the screenshot:

000059.jpg

Regarding any possible restrictions, I haven't seen anything particularly noticeable on the transition that goes from Opened to Closed status in the workflow.

 

Gonzalo Perez Alonso November 16, 2023

Here's the screenshot showing the prior restrictions, sorry:

000061.jpg

Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 16, 2023

Hi @Gonzalo Perez Alonso, I was thinking of the Status properties for closed, not the Transition properties. See my first image in my last comment. Select the Closed status and press properties. 

Also, when you say you have full edit permission, does the rule execute as you as the Actor

image.png

TimK

Gonzalo Perez Alonso November 16, 2023

Oh, sorry for the missunderstanding!

Here's the screenshot with the Closed status properties:

000064.jpg

Maybe that jira.issue.editable should be in true, to let the automation work?

And here's the screenshot showing that I'm the actor of the automation:

000063.jpg

Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 16, 2023

Hi @Gonzalo Perez Alonso 

Your status Closed has been locked for editing. That's why the rule won't set the date. 

This image shows that edit is disabled on the status. 

image.png

If jira.issue.editable is set to false no one will be able to edit the issue. 

ONe option is to remove the property, but notice it has been added by a Jira admin on your instance, so the reason for having it should be understood before removing it. 

Or you can add a new property to grant the rule actor edit permissions on the issue and still deny all other users. Have a look at this article

TimK.

Like # people like this
Gonzalo Perez Alonso November 16, 2023

Nice! So we finally got to the root cause.

Thanks a lot! I will have a look at the article and then think about the best solution.

Have a good day!

Gonzalo Perez Alonso November 17, 2023

Hi again @Tim Kopperud

I've tried both changing the jira.issue.editable to "true" and creating a new property called jira.issue.editable.goperez, but none of those are working. 

I've tested the automation with these modifications and still the field is not being updated. 

Any clue on that?

Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 17, 2023

Hi @Gonzalo Perez Alonso, since you have now adjusted existing status properties I might suggest that you start without any permission properties at all. Instead of true for jira.issue.editable, you can delete it. It's easier to start out simpler, and add feature in the next step. 

Have you also confirmed that the rule Actor has been granted edit permissions in the permissions scheme?

TimK.

Gonzalo Perez Alonso November 17, 2023

Sure! Before going for jira.issue.editable=true, I tried as well removing the property and leaving everything blank. Nothing happened. 

According to your 2nd question, the rule actor (myself) has full permissions on edit, I've already checked that.

Gonzalo Perez Alonso November 17, 2023

Hi again,

I finally managed to set the automation. The only thing I changed was the smart value from {{now.jiraDate}} to {{now}} - it's weird because everything worked despite:

  1. That's the initial smart value - {{now}} - I used when I first set up the automation and wasn't working.
  2. The Closed status property remains unchanged - it's still with jira.issue.editable=false.

Everything is working now fine but it's still a mistery how this automation can work, even with a property that doesn't allow to change the issue - maybe the automations get excluded from this properties? Idk.

Anyway, thanks a lot for the support!

Tim Kopperud
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 17, 2023

Hi @Gonzalo Perez Alonso, sorry but it seems I was wrong regarding the field doesn't need to be included on the screen. 

The field need to be on the screen associated with the action. Can you confirm the field is associated with the Edit screen? 

EDIT

Hi @Gonzalo Perez Alonso, great. Good you got it working.

TimK.

Like Gonzalo Perez Alonso likes this
Gonzalo Perez Alonso November 17, 2023

It is - the custom field is within all screens related to my test project. 

EDIT

Thanks a lot for the support @Tim Kopperud - have a good day! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events