Email notifications have been disabled for all projects

srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2012

I updated proejct names via SOAP. After that i found that email notifications have disabled for all projects. Everything else is found working. Any idea about why this has happend?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2012
Hi Srinivas, I agree with Nic that your projects are without any schemes now. I have never used getProjectsNoSchemes, but if i understand the documention correctly it returns a Project object without any scheme information i.e. notificationScheme is null in this object. When you update this object it might write back the null schemes to the project and cause that behaviour. Also not sure if you might see the null schemes only after restarting Jira. So have a closer look at the schemes ...
srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012

Hi Dieter, It is not mentioned in the api that getProjectsNoSchemes method will return array of projects by making the Schemes to null. I also observed that the Default Assignee field is found as Unassigned after updating the projects.

http://docs.atlassian.com/rpc-jira-plugin/4.4/com/atlassian/jira/rpc/soap/JiraSoapService.html#getProjectsNoSchemes(java.lang.String)

So please let me know if there is any better way to fetch all the projects in JIRA for renaming the projects.

Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012
What might help is to get the project once again using getProjectByKey before you call updateProject. This might fix the problems with the schemes but would still leave the problem with default assignee. i'd prefer to write a short Groovy script that loops over all projects and updates them on the server. When you install the Groovy script runner plugin there is already a script skeleton displayed in the text box where you can enter the script. I think it s not possible right now with the existing Apis since i also haven't found a Rest api in 4.4. if for some reason you have to do that remotely you could also write your own webservice module or servlet module that just updates the name.
Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012
Update: sorry it's too early for me. Jcli also does not seem to allowcupdating the project name. So i suggest to go the groovy way
Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012
ok, i forgot the JClI command line tool that CAN do it remotely. not sure, but i think Bob posts the same data as when you edit the project in thevuser interface.
Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012
srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012

Hi Dieter, Thanks for your information. I have one question.. Regarding the updatiion of projects using soap, is it ia known issue from atlassian side or it is an issue with the api?

srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012

If it is not a straight forward approach, that should be mentioned in the api.

Dieter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012

IMHO the RPC plugin definitely has a bug since it does not even try to preserve the default assignee. Look at the source code here:

https://studio.plugins.atlassian.com/source/browse/JRPC/tags/atlassian_jira_4_2_m6/rpc-jira-plugin/src/main/java/com/atlassian/jira/rpc/soap/service/ProjectServiceImpl.java?hb=true

The code simply assumes the assignee is null (last argument) !

// result is used later to update project so there cannot be an assignee
com.atlassian.jira.bc.project.ProjectService.UpdateProjectValidationResult result =
               projectService.validateUpdateProject(user, rProject.getName(), rProject.getKey(), rProject.getDescription(),
                       rProject.getLead(), rProject.getProjectUrl(), null);
 

Also the schemes are definitely set to null if the schemes in rProject are null as they are if you get them using getProjectsNoSchemes like you. There should be a corresponding method updateProjectNoSchemes which simply ignores the schemes and also preserves the default assignee of the project.

I could be wrong and might have looked at an outdated version of the RPC plugin but at least the code i have found explains why you lost the schemes.

srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2012

Thanks for your explaination Dieter!

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2012

Did you accidently removed the notification schemes from the project? It is diffcult to do that 'accidently' via code though!

srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2012

No. I have not touched that. Also observed the Default Assignee field is found as Unassigned.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2012

You might want to check the email server and such.

srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2012

They are also up and running. Please find the below code snippet used for updation.

try {RemoteProject[] remoteProjects = jiraSoapService.getProjectsNoSchemes(authToken);

			for(RemoteProject project : remoteProjects){
				project.setName(project.getKey()+"-"+project.getName());
				jiraSoapService.updateProject(authToken, project);

				System.out.println(project.getName());
			}
		} catch (RemotePermissionException e) {
			System.out.println(e.toString());
		} 

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2012

The above code looks fine to me and I don't think that caused you any issues. It must be something else that you have done!

srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2012

Hi Jobin,

Any update on this please?

-Srinivas

srinivasp
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2012

This is absolutely what i had executed and did nothing else. Any other reasons?

TAGS
AUG Leaders

Atlassian Community Events