Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,297,592
Community Members
 
Community Events
165
Community Groups

Script to change the due date color if the due date is passed.which can be usable in script fields

it should  be usable in script fields provided by script runner

1 answer

What is your question? 

Hi Christoph,

I am looking for groovy script, which can be used to change color of due date field on the view issue screen for the condition mentioned below .

3 days before due date- yellow highlighter

Due date or later- red highlighter

would be using this groovy script code in scripted fields provided by script runner

Hi Christoph,

I'm also interested in a groovy script like this for scriptrunner.

Many thanks and best regards
Benny

Hi Benny,

have you checked the Adaptavist Script Library?

There are quite some examples in it.

Unfortunately it is hard for me to post some code example here so I will try posting it in a google doc like this - does it work for you? Link to google doc

Best regards

Christoph

Hi Christoph,

thank you very much for your suggestion!

As far as I can tell, the date inputs for Duration need to be of type LocalDateTime.

I've tried to define a custom scripted field but this seems to be incorrect as we do not want to define a new field but rather overwrite the style of an existing one.

Could you please elaborate on how to connect the style adjustments with the issue detail view shown on the RHS when selecting an issue in active sprint view?

Which is the ScriptRunner category I have to choose an element from?

Many thanks in advance.

Best regards
Benny

Hi Benny,

thank you very much for your reply and you're welcome!

I would say Scriptrunner Fragments should be the thing to look into for this: Fragments documentation 

With web panels you can add custom java script to pages so that you could manipulate the style of an existing field: documentation

Hope this helps?

Best regards

Christoph

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: AppLiger

This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity.    Atlassian:...

378 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you