Is it possible to use a scriptrunner or JWT expression in the following scenario:
I think what I'm after is, when the new request is submitted....
If date/time A of NEW request is between A and B for Equipment = X that already exists then deny the submission?
Hi @James Barratt,
what you're trying to achieve should be perfectly doable with the help of Jira Workflow Toolbox - I guess you're referring to when speaking of JWT.
While the final configuration is extremly dependent on your specific configuration, I'll do my best to provide some hints being as generic as possible:
project = MYPROJECT AND type = MyIssueType AND "Equipment" = "x" AND "Booking Accepted" = "Yes" AND (("Date Picker A" >= "%{nnnnn}" AND "Date Picker A" <= "%{mmmmm}" ) OR ("Date Picker B" >= "%{nnnnn}" AND "Date Picker B" <= "%{mmmmm}"))
This JQL query would search for issues with an accepted booking for equipment x, where one of the dates provided falls in between the timeframe between Date Picker A and B (which means, the equipment would have already been blocked). Field code nnnnn has to match your Date Picker A and mmmmm Date Picker B.
{00058} = 0
This ensures that only if no issues are returned by the JQL, issue creation will be possible.
<strong>Specific date range is already blocked!</strong>
The resulting message within the portal would look like this:
I hope that helps.
Cheers,
Thorsten
@Thorsten Letschert _Decadis AG_ I can never get the message that appears on the customer portal to actually show the message as you did above with
<strong>Specific date range is already blocked!</strong>
No matter what I try to program in the message to show on failure, I only get the standard:
Any tips?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Louis Farmer ,
have you correctly selected the Summary for the Field to show option?
If so and it's still not working - could you please tell me which Jira and JWT version you're on?
Cheers
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I must have tried a million different settings, and I'm pretty sure I tried once the "summary" field to show but must of have something else wrong on that trial to never return to it... It works and its BEAUTIFUL :) . Thank you so much for the rapid response, would have relayed my appreciation earlier but the forum seemed down for me last week. cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.