conditional content while creation

Adrian.Seiler March 8, 2022

Hi guys,

I've the problem, that we have automatically created tasks (monthly automation routine).
One field in that tasks shall show the current quarter.

I've created an automation job 'when ticket is created', with if else blocks, but it doesn't work.
The ideal solution would be in the field directly.

Is there an possibility to get this work?

 We use Jira Cloud.

Thanks for feedback,
Best regards,

Adrian

2 answers

1 accepted

2 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2022

Hi @Adrian.Seiler  and welcome to the community,

first of all: is that a tricentis/tosca T in your avatar? 😉

 

I would suggest to edit the monthly automation rule to immediatly create/fill that field on creation (as far as I got it right this monthly automation rule already exists). a few quiestions to further specify the requirement:

  • Which field is the quarter supposed to be written?
  • Is that a standard field or a custom field?
  • Which format should it be shown? Q1,2,3 ?
  • you wrote "current quarter": Does that really mean "current"? so always be up to date (which means the field for all those issues would change if quarter changes). Or does it mean: "quarter at time of creation"?

Best
Stefan

Adrian.Seiler March 9, 2022

Hi Stefan,

thanks for your fast reply.

- the field 'quarter' is an custom short text field

- the format supposed to be shown is Q1, Q2 ... etc.

- the current quarter will be taken by if else statement when current date will be compared by formular {{now.format("MMM")}} and given short month format in if else condition "Jan" or "Feb" ... etc.  

Like Benoit Nicolet likes this
Adrian.Seiler March 9, 2022

... and btw. yes it's the old Tosca Tricentis Icon :) 
I'm impressed that you them and the software 

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2022

Is there anything giving more input in the audit log of the automation rule? Does the rule anything or just no result at all?

Did you also consider the .isBefore - .isAfter function for smart values? i guess with this it could be decreased to 3 main-branches of if-conditions.

{{[date1].isBefore([date2])}}

{{[date1].isAfter([date2])}}
 

 

I know the company and the product because I worked there some years ago :)  

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2022

Hi @Adrian.Seiler ,

got aware of another a format option for quarter.

{{now.format("Q")}}

This will give you the number of the quarter of the specific date. 

Best
Stefan

Adrian.Seiler March 10, 2022

Hi Stefan,

I'm impressed. This solution worked like a charm.

It's perfekt. 

Thanks.

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2022

Honestly I was impressed myself. Found this in another discussion here in the community and immediatley thought that would exactly be what you were searching for :) 

So happy it works now.

Please consider to click accept so that this question gets marked solved 🙌🏼

Best
Stefan

1 vote
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2022

Hi @Adrian.Seiler and welcome to the community!

Can you please share a screenshot of the rule so we can have further context to help you?  

Adrian.Seiler March 9, 2022

jira-automation-field_quarter.jpg

Adrian.Seiler March 9, 2022

Hi Mark,

the attached image show the if else statement when the task will be created.
It compare the current date in format {{now.format("MMM")}} with condition of short month 'Jan' or 'Feb' etc.

Adrian.Seiler March 10, 2022

Hi Mark,

the solution from Stefan works perfect.

Thanks for your help.

 

Best,

Adrian

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events