How to get the Query results using server side Api in validation plugin?
![]() Hi All,
Is there any possibility to get the Query results of a personal query in the server side validation plugin ? If so please let me know what is the API to achieve this?
For better understanding here i am explaining the scenario of this:
We have a custom attribute "EMR NO" in our Task Work Item. Lets say i entered "1" in that . When I am trying to create another "Task" work item it should get automatically pop up with "2" in the "EMR NO" . ie it should auto incremented to the earlier Tasks EMR NO. How can we achieve this ? Kindly help .
Note: we have a personal query in our environment to get the EMR No of the TASKS.
Waiting for your Reply,
Thanks,
Jyothsna.
|
Accepted answer
![]()
Ralph Schoon (62.3k●3●36●43)
| answered May 22 '20, 11:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I would suggest to come up with a different approach to create/store and retrieve the unique number.
Running a query for all work items of a type would be the most terrible approach I could think of. Maybe https://github.com/jazz-community/rtc-workitem-numbering contains an idea, not sure.
I am at a loss why this question has anything to do with a validation plugin.
lakshmi jyothsna selected this answer as the correct answer
Comments
Hi Ralph,
Thanks for the reply. Please let me know is there any way to trigger a plugin when work item is loading or creating ? kindly let me know is there any possibility of getting the auto generated value? Thanks again
-Jyothsna
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As the link I already sent you above suggests, you want to write a follow up action for WorkItem save. See https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ and Especially look at the RTC Extensions Workshop that is referenced.
Hi Ralph,
Thanks alot . Its worked for me.
|