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

Use Case Calculate Work Days and copy this information for cloned issues

Thies Uhlenbruch January 19, 2023

Hey,

I try to find a solution or a way to start with for my use cases:

We have issues (100-400) which are regulary bulk copied (Deep Clone) in a year. These issues have a custom date field and of course the due date. For example

  • custom date: 2022-11-01 due date 2022-10-15
  • custom date: 2022-11-01 due date 2022-09-03
  • ....

The first challenge is to calculate the difference between the custom date and the due date per issue on workday basis (sa/so excluded)

We have Script Runner Cloud but I am not very familiar with this.

The next challenge ist to bulk clone these issues and in some way, transfer the information of the calculated days per issue in the copied ones to recalculate the due date from the copied issue.

I hope this makes sense but I will give you an example:

To be copied

  • issue 1 custom date: 2022-11-01, due date: 2022-10-15 / calculated work days 11
  • issue 2 custom date: 2022-11-01, due date: 2022-10-21 / calculated work days 7

Copied issues

  • issue x custom date: 2023-01-15, due date: empty and must calculated backward with 11 days
  • issue x custom date: 2023-01-15, due date: empty and must be calculated backward with 7 days

I hope to find a solution from the community :-)

Cheers,

Thies

2 comments

Comment

Log in or Sign up to comment
Marlene Kegel - codefortynine
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 25, 2023

Hi @Thies Uhlenbruch,

I am Marlene from codefortynine.

Have you found a solution for your Deep Clone for Jira use case? 

It is possible to edit field values dynamically using Jira expressions in the Deep Clone Field Editor. But I am afraid your use case is too complex for that.

Luka Hummel - codefortynine
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
February 14, 2023

Hi @Thies Uhlenbruch,

We from codefortynine did a bit more research and since it appears that your problem has no solution I will post our findings here.

The easiest way to calculate your working days is by using Jira Automation to set a Custom Number Field that represents your working day difference. You don’t need to have it displayed in your issue layout to make use of it. Probably trigger it on changes to your Custom Date Field or whatever fits your use case best. Select Edit issue as an action and use Advanced Field Editing under More options to edit the Custom Number Field.

Your JSON should look something like this:

 Community Workday diff automation.png

Now, with the working days calculated, you can use Deep Clone for Jira to assign the Due Date when cloning the issue. Use our Clone and Edit feature with Jira expressions to calculate and assign the new value.

You can use new Date() to calculate from the time of the cloning or issue.[Any Date Field] to use any other date field value. With .plusDays([Custom Number Field]) you add the precalculated amount of working days.

For example:

Community Field Editor new dte.png

I hope this does help you further along to finding a solution.

Julien Peyrade _ Elements
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
February 8, 2023

Hello @Thies Uhlenbruch 

I hope I'm not too late for a reply.

If you don't mind testing an add-on, Elements Copy & Sync lets you do exactly that.

Full disclosure, I'm the Product Manager of the app.

We have released, just today, the feature you need. It lets you initialize any date field with calculated values.

The "work days" requirement you have can be set up quite easily, as you have the ability to add or remove "weeks" to any date, so your saturdays and sundays can be automatically ignored if needed.

The app is free for 30 days, (and stays free if your instance is under 10 users), so feel free to give it a try, and don't hesitate to tell reach our Support if you have any question.

Kind regards,

Julien

TAGS
AUG Leaders

Atlassian Community Events