Degraded performance Customers may experience intermittent errors using Community search. Our platform vendor is investigating.
Is the following possible?
When an issue has a set state and a field has a 0 value then add date stamp anther field.
Ie issue in state ‘Closure’ and ‘Open Orders’ Field goes to 0 date stamp add in ‘project Spend Completed’ field
Any help or ideas would be great.
Yes this is possible, but should it be done? That's the real question.
You can do this two ways:
1. Create a listener
You make a custom listener that registers onIssueUpdated events.
That listener checks the project and issue type relevant to you. If it is you check that the value of your custom field has changed. If it has you check that it's zero, if it's zero you set the timestamp of your other field.
2. Incorporate this behaviour in a scripted field.
You make a scripted field as follows.
Both of this methods are quite heavy on your instance for something that you could do yourself. FE, you can create a REST endpoint that sets a timestamp to a field in an issue. Instead of setting a value to 0, you create a fragment that calls this rest endpoint when clicked.
Same thing, and less performance impacting on your instance.
If you need any help on this let me know.
To be honest, if it's updated manually you need to go about this using listeners, if you want to keep it easy.
The more interesting route would be as follows:
So your account systems at some point is calling the JIRA rest api via a script, I suppose.
If that is the case, you must have a list of the issues, or projects that you are updating. You can put that information in a JSON file.
With that JSON file, you can call another REST endpoint that does the calculation for the field, just after you do the import.
The rest endpoint would take that payload, and only do the calculations for the issues/projects necessary.
That is less performance affecting that anything else that I can think of.
Do you need information on how to go about this?
If so check our REST endpoints documentation:
And this answer of mine might help you craft a rest endpoint with authentifiation and JSON payload.
I hope this helped, if it did, please upvote my answer, and if it solved your problem, accept it so other users know this has been solved.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Atlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs